How I fixed apple-app-site-association not updating

App developers targeting iOS 9.0 and newer can support Apple’s Universal Links feature, which allows iOS users to tap a link to your website and get seamlessly redirected to your installed app without going through Safari. If your app isn’t installed, tapping a link to your website opens your website in Safari.

This is a better alternative to Deep Linking, in which your app registers a custom url prefix like “myapp://”. Deep linking won’t work if your app is not installed, and can’t be opened on other platforms like Android and desktop. Users are also less familiar with custom URL schemes.

Universal Links immediately open the app without going through Safari, and they fall back to Safari if the app is not installed, resulting in a streamlined experience for your users. Universal Links also cannot be claimed by other apps.

Following Apple’s instructions to set up Universal Links, we learn that a file named apple-app-site-association must be added to your root domain or the .well-known subdirectory. This file declares which apps correspond to different URL paths and is mandatory. Here is a sample apple-app-site-association file provided by Apple:

This article addresses an issue I experienced where the apple-app-site-association file wasn’t updating even though I changed it in my website. Even after closing and reopening the app and loading the website in Safari, the phone did not recognize the changed rules.

I fixed this problem by deleting and reinstalling the app. This worked because Apple checks for the apple-app-site-association file when the app is installed, not when the link is clicked or when the app is opened. So, to update the apple-app-site-association file, delete and reinstall the app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aryan Mittal

High school student with a passion for coding and helping others with my knowledge.