Apple association files are a great way to make your app more rich and dynamic by capturing web requests on controlled URLs and taking your original intent to an in-app experience if you already have it downloaded.
But as it sometimes happens with development on Apple platform, the path to getting something done ends up being much harder than it should be because of a lack of canonical documentation.
I have faced the issues listed below when working on the app, and wanted to share some solutions.
This piece of troubleshooting will sound obvious in retrospect, but as the deep-links are often only meant to be used at precise moments of a journey we might inadvertently make them unavailable to non search-related robots when applying a sledgehammer approach via the directives in robots.txt
.
Make sure that Applebot can reach your URL. By adding this as part of the file before any catch-all directive.
User-agent: Applebot
Allow: /
/
could be replaced by a list of targeted URLs, but I cannot I see a case where that would be useful.
Once changed, allow for up to 48 hours for Apple to update its views on your permissions.
The next piece of troubleshooting is related to a change to the schema of the apple-app-site-association
brought in 2019 with the release of iOS 13.
The best piece of documentation for that change is hidden in a WWDC video
Looking at mixed-configurations used by Skycanner’s or The Economist was all of a sudden a lot more clear.
At the end, I have chosen the direction of not supporting iOS 12 or below because of Apple’s 3 year cycles and the low-impact that deeplinks not opening in the app would cause in our use cases.
Thankfully, the rest of the configuration was straightforward enough. Feel free to reach to me if you are struggling.
Some useful tool: https://search.developer.apple.com/appsearch-validation-tool https://branch.io/resources/aasa-validator/