Deep Linking in React Native iOS 9+

Open website’s link in app (if exist) in react native iOS app

Shyam Verma
Deep Linking in React Native iOS 9+

What changes you need to do on website?

**Step 1:Make sure that your website is running on HTTPSStep 2:**Create a new file named“apple-app-site-association” without.json extension.

  • File should be less than or equal to 128 Kb (iOS 9.3.1 onwards)
  • It should be served as application/json mime type
  • It should be served over Https
  • It should not have any extension
  • File should have valid json with following content -

**Note:**Replace &ltTeamID&gt, &ltBundle-Identifier&gt, &ltWebRoutes&gt with your details.**Step 3:Now either you can place this file directly on your website’s root directory or can create a.well-known folder on your website’s root directory and place here.Step 4:After placing theapple-app-site-associationon website, please test the file using this(AASA) Validator**If it passes all tests on validator then you have configured it correctly.

What changes you need to do in xcode?Step 1:Log into developer.apple.com with your account andEnable Associated Domainsin yourapp identifier.

**Step 2:**Now Launch Xcode and select the Capabilities tab. Enable Associated Domains and add two values.

applinks:YOUR_WEBSITE_DOMAIN

activitycontinuation:YOUR_WEBSITE_DOMAIN**Note:**In both the above values, do not add https:// in YOUR_WEBSITE_DOMAIN.

For example, if you website it https://example.com then it should have values like -
Applinks:example.com &
activitycontinuation:example.comStep 2: Open entitlements file of your project and mark Target Membership checked. See in below screenshot -

(image:2_check-target-membership.jpg)

If you are unable to check on Target Membership then SelectBuild Phasesand addentitlementsunder**Copy Bundle Resources.It allows you to mark checked on Target MembershipStep 3:**Link RCTLinking to your project (if not linked).**Step 4:**Update AppDelegate.m file
Add the following code in the end of AppDelegate.m file:

What changes you need to do in your react-native app?

Add the following code in your react native app for handling deep linking -

That’s it. Now the app should redirect the specified website’s links to the correct route in app.

Shyam Verma

Shyam Verma

Full Stack Developer & Founder

Shyam Verma is a seasoned full stack developer and the founder of Ready Bytes Software Labs. With over 13 years of experience in software development, he specializes in building scalable web applications using modern technologies like React, Next.js, Node.js, and cloud platforms. His passion for technology extends beyond coding—he's committed to sharing knowledge through blog posts, mentoring junior developers, and contributing to open-source projects.