I have a few apps associated with the same domain. They are listed in the apple-app-site-association file in a specific order to make sure each universal link is opened by the most suitable app installed on the device. This works fine on iOS 14 and older devices. On iOS 15 that order is no longer respected and the links are opened not by the first but by the last app, that matches the link's path.
Here is my apple-app-site-association file:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "AAAAA.com.mydomain.BurritoApp",
"paths": [ "/burritos/*" ]
},
{
"appID": "AAAAA.com.mydomain.FoodApp",
"paths": [ "/burritos/*", "/tacos/*", "/deli/*" ]
},
{
"appID": "AAAAA.com.mydomain.OrderAnythingApp",
"paths": [ "/*" ]
}
]
}
}
On iOS 14 the BurritoApp handles burrito links as expected.
When I install all 3 apps on a device with iOS 15 and tap on a burrito link, OrderAnythingApp handles the link. If I remove the OrderAnythingApp section from the above association file, then FoodApp starts handling the burrito links.
I searched through the documentation, I watched WWDC videos related to universal links from 2020 and 2019, I tried with the new association file format with components instead of paths. I still have no clue what causes this and how to fix it.