If you have both an Android and iOS app and want this link to be the same for both platforms, it is important to chose a (sub)domain which is different from your public facing websites'. This is because on iOS, when a user visits your website using Safari, Safari will load all links (including universal ones) that belong to the same domain.
You need to configure the app to be able to handle deep/app links to your chosen (sub)domain in the
<activity android:name=”activity”> <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="https" android:host="(sub)domain" /> </intent-filter> </activity>
Add a verification file
assetlinks.json to the
.well-known directory of your chosen (sub)domain, see instructions here. Also configure the app to verify the (sub)domain for the app links:
You need to associate your app with the chosen (sub)domain by adding a
com.apple.developer.associated-domains entitlement to your app: see instructions here.
You need to add a verification file
apple-app-site-association to the
.well-known directory of your chosen (sub)domain, see instructions here.
Verify your Universal Links
When the domains are live, collect a
sysdiagnose on an iOS 13 device and inspect
swcutil_show.txt to verify that the
apple-app-site-association file was retrieved and parsed correctly. You can find additional information about collection a sysdiagnose here and some additional guidance on Universal Link debugging in the following blog post.