I have a react-native app with multiple environments.
Dev, prod, ... Which means that I have multiple 'copies' of the app installed on the phone App Dev, App Prod.
These are under a different bundle identifier:
- com.myapp.dev
- com.myapp.prod
I use deep links to open the app, this works perfect on Android because it asks with which app you want to open it, but on iOS it just opens the first app that founds installed and i can't find the way to, for example:
- Launch
develop-app://whatever/1
and open it in the Dev app - Launch
prod-app://whatever/1
and open it in the Prod app
What am i missing?
This are my defined url types:
Also the apple-app-site-association
file looks like this:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "1234.com.myapp.dev",
"paths": ["*"]
},
{
"appID": "1234.com.myapp.prod",
"paths": ["*"]
}
]
}
}
Update
- The first problem that i found was that the
apple-app-site-association
wasn't using aContent-Type
header, so, the app could not recognize the file. - The paths that each environment should recognize should be defined:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "1234.com.myapp.dev",
"paths": ["/dev/*"]
},
{
"appID": "1234.com.myapp.prod",
"paths": ["/prod/*"]
}
]
}
}
- Now i'm able to see the banner on the top of the website
Open with App Dev
as expected