r/iOSProgramming • u/Vast_Journalist1415 • 10d ago
Question Universal Links always open Safari instead of my app, but one link path works. Apple CDN seems to be serving a stale AASA?
Universal Links always open Safari instead of my app, but one link path works. Apple CDN seems to be serving a stale AASA?
Setup:
Universal Links with an AASA file hosted at the standard /.well-known/ location
Associated Domains entitlement is set up correctly
The app is live on the App Store
Problem:
The invite-a-friend link (/invite/...) opens the app correctly
My other link paths always open the web page in Safari instead of the app, even after reinstalling
What I've already checked:
The AASA file is served over HTTPS with a 200 status, no redirects, and Content-Type: application/json
I validated it with an online AASA validator and an AI-assisted audit. The JSON is valid, and the Team ID + Bundle ID are correct
The paths/components entries include the failing paths
I tested by pasting the link in Notes and long-pressing it (it doesn't show "Open in [App]"), and also from Messages
Any experience or tips would be really appreciated. Thanks!
2
u/Needle_In_Red 9d ago
worth checking https://app-site-association.cdn-apple.com/a/v1/yourdomain.com to see what apples cdn actually has cached, if its the old file you just gotta wait it out (can take a day or so)
2
u/shurco 9d ago
since /invite opens the app, association and team id are already fine. diff apple's cached aasa with your origin file, because a pattern miss looks exactly like a stale cdn.
4
u/unpluggedcord 10d ago
add
?mode=developerTo your app links in Xcode , this should unlock until the CDN is updated.4
u/Artuplabs 9d ago
besides the CDN delay, two things make universal links look broken when they're not. tapping a link to the same domain from a page already on that domain in Safari never opens the app, and if you ever long pressed a link and picked "Open in Safari", iOS remembers that per domain until you long press again and pick "Open in [app]". so test by tapping from Notes or Messages. on iOS 16+ there's also Settings > Developer > Universal Links > Diagnostics where you can paste a link and see what the system thinks about it, that's quicker than guessing from the validator.
1
u/InteractionWrong4029 9d ago
Check Apple's own copy of the file before touching the app: Apple serves AASA from app-site-association.cdn-apple.com/a/v1/yourdomain, and that cached copy can lag your origin by up to a day. If the working path is in the CDN copy and the newer paths are not, nothing on the device will fix it — a reinstall just pulls the same stale file again.
Two other things that produce exactly this "one path works" pattern: links tapped inside Safari never open the app by design, so test from Notes/Messages only; and
componentsentries are matched in order, so a broader entry placed above your failing paths swallows them.Diff the CDN copy against your origin first. It is one request and it separates a cache problem from a config problem immediately.
0
u/gilgoomesh 10d ago
Apple's CDN takes about a week to update.
https://developer.apple.com/documentation/technotes/tn3155-debugging-universal-links
1
u/[deleted] 10d ago
[removed] — view removed comment
1
u/[deleted] 9d ago
[removed] — view removed comment
0
u/[deleted] 10d ago
[removed] — view removed comment