Universal Links & Android App Links (platform-hosted)
Detour automatically hosts the required association files (/.well-known/apple-app-site-association and /.well-known/assetlinks.json) for every app you configure in the platform. That means when you create an App in the Detour dashboard and supply the required app identifiers (package name and signing fingerprint / Apple Team ID and Bundle ID), Detour will serve the correct apple-app-site-association and assetlinks.json on your organization subdomain (for example your-org.godetour.link).
This page explains:
- the difference between deferred links and Universal/App Links,
- what Detour auto-hosts for you,
- what you must supply in the dashboard and in your app
Deferred links vs Universal / App Links — what’s the difference?
Deferred links (Detour)
- Purpose: preserve click context when the user does not yet have your app installed.
- Flow: user clicks
https://your-org.godetour.link/app-hash/campaign; Detour records a click and redirects to the store; after install the SDK asks Detour for the original link and — if matched — navigates the user into the app. - Trigger: works when the app is not installed at click time. Matching happens after install/first-open (deterministic via Play referrer on Android, or probabilistic fingerprinting otherwise).
Universal Links (iOS) / Android App Links
- Purpose: open your app directly when a user clicks a link and the app is already installed. They avoid the browser and deep-link straight into the app.
- Flow: when the link is clicked, the OS checks the domain association files to verify the domain is associated with your app; if verified, it opens the app immediately (with the URL) instead of loading a web page.
- Trigger: works only when the app is already installed and the domain is verified on the device.
Key point: Universal/App Links are about direct in-app opening when installed. Deferred links are about preserving link context through install flow.
What Detour hosts for you
When you configure an App in a Detour organization, the platform will serve:
https://<org-subdomain>.godetour.link/.well-known/assetlinks.json(Android)https://<org-subdomain>.godetour.link/.well-known/apple-app-site-association(iOS)
Detour will generate file contents using values you provide (bundle id, team id, package name, SHA256 fingerprints). The files are served from the same subdomain used for your deferred links so automatic OS verification works.
What you must provide in the Detour dashboard
To let Detour generate correct association files, add this data to your App settings:
-
iOS
- Bundle ID (e.g.
com.example.myapp) - Apple Team ID (from Apple Developer account) — used to generate
TEAMID.bundleIdentries in the AASAappIDsarray
- Bundle ID (e.g.
-
Android
- Package name (e.g.
com.example.android) - SHA-256 signing certificate fingerprint(s) — use the release keystore fingerprint or Google Play Signing fingerprint if Play App Signing is enabled
- Package name (e.g.
What you need to update in your app
Detour after you complete platform configuration step will give you ready to use code snippets to update your app. Depending on whether you use Expo or bare React Native you will need to update different files. Snippets with filled data can be found on your app page on platform.
iOS
- Expo
- Native
Inside your app.json add associatedDomains key under ios config:
{
"expo": {
// ... other top-level expo keys ...
"ios": {
// ... other iOS-specific config ...
"associatedDomains": ["applinks:<your-org>.godetour.link"]
}
}
}
Add to your <app>.entitlements
<key>com.apple.developer.associated-domains</key>
<array>
<string><your-org>.godetour.link</string>
</array>
Handle deep links in AppDelegate
#import <React/RCTLinkingManager.h>
- (BOOL)application:(UIApplication _)application
openURL:(NSURL _)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> \*)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}
- (BOOL)application:(UIApplication _)application continueUserActivity:(nonnull NSUserActivity _)userActivity
restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> \* \_Nullable))restorationHandler
{
return [RCTLinkingManager application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}
Android
- Expo
- Native
Inside your app.json add intentFilters key under android config:
{
"expo": {
// ... other top-level expo keys ...
"android": {
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "https",
"host": "<your-org>.godetour.link",
"pathPrefix": "/<hash-included-in-link>"
}
],
"category": ["BROWSABLE", "DEFAULT"]
}
]
}
}
}
AndroidManifest.xml
<activity
android:name=".MainActivity"
android:exported="true">
<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" />
<data android:host="<your-org>.godetour.link" />
<data android:pathPrefix="/<hash-included-in-link>" />
</intent-filter>
</activity>
How verification works
After Detour hosts the files, devices perform automatic verification:
- iOS will fetch the AASA file and verify
appIDsandpaths. Once verified, Universal Links for matching paths will open the app. - Android will fetch
assetlinks.jsonand verify thepackage_name+sha256_cert_fingerprints. If verified, intent filters withautoVerify="true"will cause App Links to open the app.
Universal and App Links used directly in browser won't redirect you to the app (Safari might show you banner to open link in app). To test the behavior click link in some messages or notes application.
How to handle Universal and App Links in your app
You can handle universal and app links yourself using your preferred navigation and linking library. However, Detour is smart enough to return the route for such a link in the same way it returns deferred links. For more details, please see the SDK usage page.
Note for expo-router users: When expo-router detects a Universal or App Link, it automatically navigates to the corresponding screen before the Detour SDK can process the link. To handle this behavior, you should either manage the route manually or implement a catch-all mechanism to redirect unmatched routes to your initial view. For more information on handling deep linking in your mobile app with Expo, see the Expo linking documentation.