This documentation covers @apliko/react-native-deep-link 0.3.0.
Platform Setup
This setup ensures reliable delivery of iOS Universal Links, Android App Links, and custom deep link schemes. These are the standard React Native Linking steps that let your app receive links; the SDK adds no extra manual native setup on React Native 0.60 and later (deferred linking's native module is linked automatically; on older versions link it manually, see Installation). In the examples, replace <your-subdomain> with your project's domain prefix (as in <your-subdomain>.nvgt.link; sandbox projects use <your-subdomain>.sandbox.nvgt.link, see your project in the Hub) and myapp with your own scheme.
Using Expo? Skip to Expo.
Before you start: your project in the Hub
Universal Links and App Links only open your app when your link domain says your app may open it. Apliko hosts those files for you, built from the app details you enter in the Hub. Do this once per environment.
1. Create a project
Create a project in the Sandbox Hub while developing and in the Production Hub for your released app. Each project has its own deep link subdomain, app settings and keys. The subdomain is permanent: every link you create uses it.
- Production links:
https://<your-subdomain>.nvgt.link/… - Sandbox links:
https://<your-subdomain>.sandbox.nvgt.link/…
Use the exact host of the environment a build talks to in your app's Associated Domains and intent filter. A build that should open both sandbox and production links lists both hosts.
2. Add your apps to the project
| Platform | Field | Required | Notes |
|---|---|---|---|
| iOS | Bundle ID | Yes | For example com.example.app. |
| iOS | Team ID | Yes | 10 characters, under Membership in your Apple Developer account. |
| iOS | App Store ID | No | The number in your App Store link (apps.apple.com/…/id123456789). Recommended: it sends iPhone users without your app straight to your App Store page. Without it, they may go to your website instead. |
| Android | Application ID | Yes | Your package name, for example com.example.app. |
| Android | SHA-256 fingerprints | At least one | For apps installed from Google Play, add the Play App Signing key's fingerprint (Play Console › Test and release › App integrity); without it, links stop opening your app after release. Add your upload key too, and your debug key for local builds. |
| Project | Fallback URL | No | Where people go when they open a link without your app and it does not send them to a store, unless the link has a web address of its own. |
Already have an apple-app-site-association or assetlinks.json file, for example from Firebase Dynamic Links? You can import it in the Hub instead of typing the details (up to 64 KB); Apliko then serves it as you saved it.
Changing the Bundle ID, Team ID or fingerprints of an app that is already connected changes whether every existing link opens it, so the Hub asks you to confirm first. Adding a fingerprint is always safe.
3. Check the hosted files
Once you add an app, these files are available on your link host:
https://<your-subdomain>.nvgt.link/.well-known/apple-app-site-associationhttps://<your-subdomain>.nvgt.link/.well-known/assetlinks.json
Open them in a browser or with curl to check your IDs and fingerprints. iOS fetches the file through Apple's own CDN when the app is installed, so a change can take a while to reach devices; reinstall the app to pick it up. On Android 12 and later, check verification with adb shell pm get-app-links com.example.app.
4. What a link does without your app
By default, a link opened on a phone without your app sends the user to the store, so a deferred link can reach your app after the install:
- Android: the link opens your app if it is installed; otherwise Google Play opens with the full link as the install referrer, which the SDK reads on first launch.
- iOS: the link page shows a short prompt; the user's tap copies the link and opens the App Store, so the Paste button can offer it on first launch (if you turn iOS deferred linking on).
- Without a store page for the platform, or for a link set not to go to the store, the user goes to the link's own web address or your fallback URL.
5. Get your client key
On the API keys page of the Hub, create a key for the project and use its client key in your app: cl_test_… from the Sandbox Hub, cl_live_… from the Production Hub. The server key (sv_…) is for your backend only.
iOS Integration
1. Modify AppDelegate
Handle custom schemes and Universal Links by adding the following to your AppDelegate file. In a Swift AppDelegate, add these methods inside the AppDelegate class. If it subclasses RCTAppDelegate (the React Native 0.77 template), mark them override where the superclass already defines them. From React Native 0.78 the template declares class AppDelegate: UIResponder, UIApplicationDelegate and uses RCTReactNativeFactory, so add them without override.
// Objective-C
#import <React/RCTLinkingManager.h>
// Handle custom schemes like myapp://path
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
return [RCTLinkingManager application:app openURL:url options:options];
}
// Handle Universal Links like https://<your-subdomain>.nvgt.link/path
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler {
return [RCTLinkingManager application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}// Swift
import React
// Handle custom schemes like myapp://path
func application(_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return RCTLinkingManager.application(app, open: url, options: options)
}
// Handle Universal Links like https://<your-subdomain>.nvgt.link/path
func application(_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([any UIUserActivityRestoring]?) -> Void) -> Bool {
return RCTLinkingManager.application(application,
continue: userActivity,
restorationHandler: restorationHandler)
}Apps with a SceneDelegate
Apps that use a SceneDelegate (the React Native 0.88+ template, and any app built with Xcode 27) receive links in the scene delegate instead. Forward them to React Native:
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
RCTLinkingManager.scene(scene, openURLContexts: URLContexts)
}
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
RCTLinkingManager.scene(scene, continue: userActivity)
}Also pass the connectionOptions from scene(_:willConnectTo:options:) to startReactNative(withModuleName:in:connectionOptions:), so a link that cold-starts the app reaches the SDK. The React Native 0.88 template already does all of this.
2. Configure in Xcode
- Custom URL Schemes: Go to Info -> URL Types -> Add your scheme (e.g.,
myapp). - Universal Links: Go to Signing & Capabilities -> Associated Domains -> Add
applinks:<your-subdomain>.nvgt.link.
Android Integration
1. Add intent filters to AndroidManifest.xml
Add the following intent filters to your .MainActivity activity tag.
<activity
android:name=".MainActivity"
android:launchMode="singleTask"
... >
<!-- Handle custom schemes like myapp://path -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="myapp" android:host="example" />
</intent-filter>
<!-- Handle HTTPS app links -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="<your-subdomain>.nvgt.link" />
</intent-filter>
</activity>launchMode="singleTask" is required so that links opened while your app is running reach the existing activity. No changes to MainActivity code or Gradle files are needed. The android:host of a custom-scheme filter must match the links you open (myapp://example/… matches the filter above, myapp://other/… does not); omit android:host to accept any host.
Android also handles reopening the app from Back or Recents: a link that already opened the app is not delivered again. This needs the SDK's native part, so rebuild the app after installing.
Expo
The SDK works in Expo development builds and prebuilt projects. Universal Links and App Links don't work in Expo Go, because they need your own app's configuration. Add the equivalent settings to app.json, then create a new development build (or run npx expo prebuild):
{
"expo": {
"scheme": "myapp",
"ios": {
"associatedDomains": ["applinks:<your-subdomain>.nvgt.link"]
},
"android": {
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [{ "scheme": "https", "host": "<your-subdomain>.nvgt.link" }],
"category": ["BROWSABLE", "DEFAULT"]
}
]
}
}
}Web
No platform setup is needed. Opening a link on the web is a page load, so the SDK delivers the page URL as the 'initial' link on every load. When the browser hands a link to an already-open installed PWA window, it arrives as a 'runtime' link. Browser back/forward and hash changes are not reported unless you set webRuntimeLinks: true; if you do, don't navigate in response to them, or the Back button keeps returning the user to the same page.
Custom domains
Your links live on your Apliko subdomain, such as https://<your-subdomain>.nvgt.link/…, and need no further configuration. Custom domains (for example links.brand.com) are not supported yet: links on them still reach your listeners, but without Apliko data, and they are not accepted as deferred links.