Reputation: 1328
We have multiple flavors of our app which is pointing to the exactly same server; We can’t differentiate different apps from looking into the domain urls and their paths.
For Example, from any of the app, if we request Forgot your Password then the link received for Reset Password in email will be same for both the apps. So, if we tap on the link, it will open any of the app instead of asking user which app should be open by showing menu with all available apps. Actually its opening the first app which Bundle ID matches in apple-app-site-association file placed on server.
Domain Registration in App Associated Domains section: applinks:example.com
Content in apple-app-site-association file placed at server:
{
"applinks": {
"apps": [
],
"details": [{
"appID": "XXXXXXXXXX.com.example.FirstApp",
"paths": [
"NOT /sample/activate/*",
"*"
]
},
{
"appID": "XXXXXXXXXX.com.example.SecondApp",
"paths": [
"NOT /sample/activate/*",
"*"
]
}
]
}
}
Actual Behavior: If both apps installed on device, by taping on link in browser, it will open FirstApp OR SecondApp
Expected Behavior: If both apps installed on device, then by taping on link, iOS should give choice to user, which app he/she wants to open.
Any way to achieve expected behavior with above explained scenario?
Upvotes: 1
Views: 1004
Reputation: 2818
According to Apple's documentation on AASA files, the device will always register the first app with a matching URL.
The value of the details key is an array of dictionaries, one dictionary per app that your website supports. The order of the dictionaries in the array determines the order the system follows when looking for a match, so you can specify an app to handle a particular part of your website.
Unfortunately, there does not seem to be a work around since this occurs at the OS level of the device. Your best bet is to distinguish the URLs somehow. Sorry, I know that's probably not the answer you wanted to hear.
Upvotes: 1