I recently noticed that users on iOS 12 were not able to follow our Branch links (company.app.link) to our app. Upon further investigation I found this error in the iOS 12 device logs:
### Download URL 'https://company.app.link/.well-known/apple-app-site-association' failed: -6756/0xFFFFE59C kTypeErr
After researching error -6756/0xFFFFE59C
it seems that the AASA file automatically hosted and generated by Branch is not using a correct a schema for iOS 12 devices:
{
"applinks": {
"apps": [],
"details": [
{
"appIDs": ["ABC123.com.company.app", "ABC123.com.company.app"],
"components": [
{
"/": "*",
"?": {
"$web_only": "true"
},
"exclude": true,
"comment": "Matches any URL whose path is * and which has a query item with name '$web_only' and value 'true' and instructs the system NOT to open it as a Universal link"
},
{
"/": "*",
"?": {
"%24web_only": "true"
},
"exclude": true,
"comment": "Matches any URL whose path is * and which has a query item with name '%24web_only' and value 'true' and instructs the system NOT to open it as a Universal link"
},
{
"/": "/e/*",
"exclude": true,
"comment": "Matches any URL whose path is /e/* and instructs the system NOT to open it as a Universal link"
},
{
"/": "*",
"comment": "Matches any URL whose path is * and instructs the system to open it as a Universal link"
},
{
"/": "/",
"comment": "Matches any URL whose path is / and instructs the system to open it as a Universal link"
}
]
}
]
}
}
I've been in touch with Branch support and have provided a fix that I have verified to work with iOS 12 and newer iOS versions - but unfortunately they haven't been very helpful. I don't think this is related to a bad configuration as I can confirm that the issue affects other high profile Branch.io customers.
The fix I found was to combine the old and new AASA formats into a single file (by adding the appId
and path
keys back into the file). I've tested this on iOS 12, 15 and 16 devices and can confirm that the domains are correctly associated with our app and that deep linking works as expected (but I'm not sure how technically correct this solution is):
{
"applinks": {
"apps": [],
"details": [
{
"appIDs": ["ABC123.com.company.app", "ABC123.com.company.app"],
"appID": "ABC123.com.company.app",
"components": [
{
"/": "*",
"?": {
"$web_only": "true"
},
"exclude": true,
"comment": "Matches any URL whose path is * and which has a query item with name '$web_only' and value 'true' and instructs the system NOT to open it as a Universal link"
},
{
"/": "*",
"?": {
"%24web_only": "true"
},
"exclude": true,
"comment": "Matches any URL whose path is * and which has a query item with name '%24web_only' and value 'true' and instructs the system NOT to open it as a Universal link"
},
{
"/": "/e/*",
"exclude": true,
"comment": "Matches any URL whose path is /e/* and instructs the system NOT to open it as a Universal link"
},
{
"/": "*",
"comment": "Matches any URL whose path is * and instructs the system to open it as a Universal link"
},
{
"/": "/",
"comment": "Matches any URL whose path is / and instructs the system to open it as a Universal link"
}
],
"paths": ["*"]
}
]
}
}
Can anyone shed some more light on this issue or perhaps comment on the validity of combining the old and new AASA formats into one? Or perhaps point me in the right direction - I couldn't find much information on supporting associated domains on both iOS 12 and newer iOS versions at the same time.