Short answer: A single syntax error, such as a trailing comma or a missing quote, makes the whole apple-app-site-association (AASA) file unreadable. iOS then has no rules for your domain and opens every link in the browser. Run the file through a JSON parser such as jq to see the exact line and column.
What is happening
Invalid AASA JSON: an apple-app-site-association file that a JSON parser rejects, which leaves iOS with no universal link rules for the domain.
The file is either read in full or not at all. There is no partial parsing, so a typo on line 40 disables the rules on line 2 as well. Apple's debugging technote (TN3155) lists invalid JSON as one of the reasons links never open the app.
- Every universal link on the domain falls back to Safari.
- The long-press menu in Notes shows no "Open in app" option.
- Nothing in the app crashes or logs an error, which makes this easy to miss.
Why does this happen?
Most invalid files are hand-edited, and JSON is stricter than JavaScript or most config formats. Common culprits are trailing commas, single quotes, comments, smart quotes pasted from a document, and an HTML error page served in place of the file.
- Trailing comma: a comma after the last item in an array or object.
- Comments: JSON has no comment syntax. Apple's format has a
commentkey for notes instead. - Smart quotes: curly quotes copied from a word processor or chat tool.
- Wrong body: a server or CDN returning an HTML page (for example a login or error page) at the AASA URL.
- Mixed formats: Apple warns that mixing the legacy
pathsformat withcomponents"may result in unexpected behavior", even when the JSON itself parses.
How to confirm it
- Fetch the live file exactly as Apple would:
curl -v https://example.com/.well-known/apple-app-site-association. - Check the body starts with
{and is not HTML. - Run the body through a JSON parser, for example
curl -s https://example.com/.well-known/apple-app-site-association | jq .. It reports the line and column of the first syntax error. - On a Mac, run
sudo swcutil dl -d example.comto confirm the file downloads, thensudo swcutil verify -d example.com -j apple-app-site-association -u https://example.com/your/pathto test a URL against it. - Optionally, compare against the copy on Apple's CDN with
curl -i https://app-site-association.cdn-apple.com/a/v1/example.com. This URL is widely used for debugging but is not on an Apple documentation page.
How to fix it
- Correct the syntax error the parser reports, then parse again until the file is clean.
- Replace any comments with
"comment"keys insidecomponentsentries. - Use one format only:
appIDspluscomponentsfor current iOS versions. - Deploy the file to
/.well-known/apple-app-site-association, served over HTTPS with a 200 and no redirect. - Reinstall the app on a test device. Apple says devices download the file when the app is installed and check for updates roughly once a week after that.
A minimal valid file looks like this:
{
"applinks": {
"details": [
{
"appIDs": ["ABCDE12345.com.example.app"],
"components": [
{ "/": "/help/website/*", "exclude": true, "comment": "Keep on the web" },
{ "/": "/buy/*" }
]
}
]
}
}
If you would rather not hand-write JSON, start from the example in the universal links setup guide, and for the next likely problem after a syntax fix, see wrong app ID.