Reputation: 1389
I am working on an iOS app that has multiple environments (Dev, QA and Prod) and for testing purposes I need to support universal linking on the 3 of them. That means when a user taps on www.mywebsite.com from the iPhone it should open the installed app (one of the 3).
How can I achieve this in the AASA file?
Is there a way to have the 3 apps installed and that the link will open only the correct app?
Upvotes: 3
Views: 946
Reputation: 1389
At first I tried to host the AASA file on the DEV and QA websites, so qa.mywebsite.com will open the QA app, and same for DEV. But both websites require password to access, so it didn't work.
I found a workaround to support the 3 environments but works with one app installed at a time. When tapping on the universal link it will open the installed app.
Basically added the 3 envs bundle ID as different apps, like this:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "ABC.com.app.prod",
"paths": [
"*"
]
},
{
"appID": "ABC.com.app.qa",
"paths": [
"*"
]
},
{
"appID": "ABC.com.app.dev",
"paths": [
"*"
]
}
]
}
}
Upvotes: 1