Short answer: iOS devices fetch the apple-app-site-association file from Apple's CDN, not your server. Apple says the CDN requests your file within 24 hours and devices check for updates about once a week after install. There is no way to invalidate the CDN, so reinstall the app on test devices and use ?mode=developer while iterating.
What is happening
Apple's associated domains CDN: an Apple-managed cache that, since iOS 14 and macOS 11, fetches your apple-app-site-association file and serves it to devices in place of your web server.
Apple documents three timings that explain stale rules:
- "Apple's content delivery network requests the apple-app-site-association file for your domain within 24 hours."
- "Devices check for updates approximately once per week after app installation."
- "When your app is installed, devices download the file from the CDN immediately ... There is no direct CDN invalidation option."
So a change can take a day to reach the CDN and up to a week more to reach an installed app.
Why does this happen?
The cache protects your server and makes link handling fast, but it means edits are not instant. Most "my fix did not work" reports are really the old file still in use.
- CDN not refreshed yet: the edit was made in the last 24 hours.
- Device not refreshed: the app was installed before the change and the weekly check has not run.
- CDN cannot fetch: a redirect or block means the CDN keeps an old copy or none. See AASA redirect or blocked.
How to confirm it
- Compare your live file with
curl -s https://example.com/.well-known/apple-app-site-association. - Compare with the CDN copy:
curl -i https://app-site-association.cdn-apple.com/a/v1/example.com. Check theCache-Controlheader and whether the body matches. This URL is widely used but not documented by Apple. - On a test device, capture a sysdiagnose and open
swcutil_show.txt. ReadLast CheckedandNext Checkfor your domain.
How to fix it
- Wait up to 24 hours for the CDN to refetch, then check the CDN copy again.
- Delete and reinstall the app on test devices, which downloads the current CDN copy immediately.
- While testing, add an alternate mode to the entitlement:
applinks:example.com?mode=developer. Apple says this bypasses the CDN and "pulls your AASA directly from your domain". - Turn on Settings > Developer > Universal Links > Associated Domains Development on the device. Developer mode needs a development-signed app, and the file must be in
/.well-known/. - Remove
?mode=developerbefore shipping, since it only works on opted-in devices.
Associated Domains entitlement while testing:
applinks:example.com?mode=developer
applinks:www.example.com?mode=developer
Check the file before each deploy with curl -I https://example.com/.well-known/apple-app-site-association and sudo swcutil verify on a Mac, so you are not waiting a day to discover a typo. The universal links setup guide lists the device steps.