DEV Community

Al-Amin Islam
Al-Amin Islam

Posted on • Edited on

5

Deep Linking for Android and Apple in React.js

Today I will discuss about how to create Android & Apple Deeplinking.

For Android

  1. You have assetlinks.json file .
  2. Create "assetlinks.json" file. Include the file inside public/.well-known folder .
  3. The route is --> domainname/.well-known/assetlinks.json .

For Apple

Unable to host static file apple-app-site-association from the react project root in locally .

Solutions :

Need two file and paste this json on this file:

  1. public/.well-known/apple-app-site-association.
  2. public/.well-known/apple-app-site-association.json
{
  "applinks": {
    "apps": [

    ],
    "details": [
      {
        "appID": "xxxxxxxx-xxxxxxxx",
        "paths": [
          "*",
          "/"
        ]
      }
    ]
  }
}

Enter fullscreen mode Exit fullscreen mode

Using
1 . AWS Amplify
I added the following to the top of my redirects on amplify

{
    "source": "/.well-known/apple-app-site-association",
    "target": "/.well-known/apple-app-site-association.json",
    "status": "200",
    "condition": null
},
Enter fullscreen mode Exit fullscreen mode

Image description

Add a redirect

Finally, Apple expects this file to exist at the exact path yourdomain.com/.well-known/apple-app-site-association.

Test your app

First, you'll need to make sure you publish your website on the domain you used.

Thanks for reading

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay