From df483c8a12c4be7b2706b713f87f9d7d84cb765e Mon Sep 17 00:00:00 2001 From: benguedj <71835422+benguedj@users.noreply.github.com> Date: Mon, 24 Jan 2022 16:14:30 +0100 Subject: [PATCH] feat: Ajoute la config pour les "deepLinks" (iOS et Android) (#52) * feat: ajoute la config pour les deeplinks * feat: redirige les erreurs 404 vers la home * fix: deepLinks for iOS * fix: deepLinks iOS (appID) Co-authored-by: Benjamin Guedj --- pages/404.js | 12 ++++++++++++ public/.well-known/apple-app-site-association | 9 +++++++++ public/.well-known/assetlinks.json | 11 +++++++++++ 3 files changed, 32 insertions(+) create mode 100644 pages/404.js create mode 100644 public/.well-known/apple-app-site-association create mode 100644 public/.well-known/assetlinks.json diff --git a/pages/404.js b/pages/404.js new file mode 100644 index 0000000..5125d2d --- /dev/null +++ b/pages/404.js @@ -0,0 +1,12 @@ +import { useEffect } from "react"; +import { useRouter } from "next/router"; + +export default function Custom404() { + const router = useRouter(); + + useEffect(() => { + router.replace("/"); + }); + + return null; +} diff --git a/public/.well-known/apple-app-site-association b/public/.well-known/apple-app-site-association new file mode 100644 index 0000000..24f725d --- /dev/null +++ b/public/.well-known/apple-app-site-association @@ -0,0 +1,9 @@ +{ + "applinks": { + "apps": [], + "details": [{ + "appID": "76GBKHVK25.com.fabrique.millejours", + "paths": ["/app-millejours"] + }] + } +} \ No newline at end of file diff --git a/public/.well-known/assetlinks.json b/public/.well-known/assetlinks.json new file mode 100644 index 0000000..2ce212e --- /dev/null +++ b/public/.well-known/assetlinks.json @@ -0,0 +1,11 @@ +[ + { + "relation": ["delegate_permission/common.handle_all_urls"], + "target": { + "namespace": "android_app", + "package_name": "com.fabrique.millejours", + "sha256_cert_fingerprints": + ["4C:3E:47:E2:DB:74:CC:99:77:9E:3E:3F:3C:3C:60:D2:62:65:70:8C:1D:B6:95:72:D5:FC:57:56:2E:7B:9F:3A"] + } + } +] \ No newline at end of file