I’m implementing universal links for react native.
I followed this instructions : https://reactnavigation.org/docs/deep-linking/ and for android it’s works well.
When i trying to do for iOS (Associated Domains i have some issues)
For this i followed this instructions : https://developer.apple.com/documentation/xcode/supporting-associated-domains?language=objc
- Create Associated Domain on xCode
- Create apple-app-site-association on .well-known folder (https://dev-bytel-suiviconso.azurewebsites.net/.well-known/apple-app-site-association)
"applinks": {
"details": [
{
"appIDs": [
"ABCDE12345.com.example.app",
"ABCDE12345.com.example.app2"
],
"components": [
{
"#": "no_universal_links",
"exclude": true,
"comment": "Matches any URL with a fragment that equals no_universal_links and instructs the system not to open it as a universal link."
},
{
"/": "/buy/*",
"comment": "Matches any URL with a path that starts with /buy/."
},
{
"/": "/help/website/*",
"exclude": true,
"comment": "Matches any URL with a path that starts with /help/website/ and instructs the system not to open it as a universal link."
},
{
"/": "/help/*",
"?": {
"articleNumber": "????"
},
"comment": "Matches any URL with a path that starts with /help/ and that has a query item with name 'articleNumber' and a value of exactly four characters."
}
]
}
]
},
"webcredentials": {
"apps": [
"ABCDE12345.com.example.app"
]
},
"appclips": {
"apps": [
"ABCED12345.com.example.MyApp.Clip"
]
}
}
- I checked my files is correct on this sites
- https://branch.io/resources/aasa-validator/#resultsbox
- https://search.developer.apple.com/appsearch-validation-tool
but when i’m checking for ubereats.com or facebook
https://app-site-association.cdn-apple.com/a/v1/ubereats.com
the format for apple-app-site-association is different, they are using format defined here : https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW1
{
"applinks": {
"apps": [],
"details": [
{
"appID": "9JA89QQLNQ.com.apple.wwdc",
"paths": [ "/wwdc/news/", "/videos/wwdc/2015/*"]
},
{
"appID": "ABCD1234.com.apple.wwdc",
"paths": [ "*" ]
}
]
}
}
So which format i should use or where i have wrong ?
It’s finally work on simulator but not on real device
2
Answers
Based on the format that is being used by sites like UberEats and Facebook, you should use the format defined in the Universal Links documentation by Apple.
The format should look like this:
The appID key should contain your bundle ID, and the paths key should specify the desired path of your Universal Link. The apps key should be empty.
If it’s not working on a real device, check if you have enabled Associated Domains on Xcode, and if you have the correct Bundle ID set in your Apple Developer account. It’s also important to check if the
file is hosted on a secure server (HTTPS) and is accessible to your device.
iOS will not open Universal Links with apps if the user types the url directly into the browser. Only when the user clicks a link, will iOS open the associated app.
So, in order to test the setup, do not enter the link in Safari, but rather use:
Alternatively, create a reminder on the device (using the Reminders app) containing the link, and click it.