How to verify that Apple's CDN has picked up newer version of the apple-app-site-association file?

We updated the file ~2 days ago and the feature we are working on seemingly does not work - web links never open in the app, always end up at the browser.

I set up new test site, added the file there and linked it up with the app. Tapping the link opens in the app.

So my conclusion is that Apple's CDN is not updated. But how I can verify that?

Answered by Engineer in 702875022

The system will check approximately once a week for an updated AASA.

You can read more here:

https://developer.apple.com/documentation/xcode/supporting-associated-domains

If you trigger a sysdiagnose, in the swcutil_show.txt file you can look for your domain and find information about when the "last check" was, and when the next check will be.

If you are iterating at a fast pace, you can use developer mode, and directly pull the AASA from your web server. 

To trigger a download you still need to delete the app and reinstall via Xcode (TF and App Store do not work for developer mode.)

Accepted Answer

The system will check approximately once a week for an updated AASA.

You can read more here:

https://developer.apple.com/documentation/xcode/supporting-associated-domains

If you trigger a sysdiagnose, in the swcutil_show.txt file you can look for your domain and find information about when the "last check" was, and when the next check will be.

If you are iterating at a fast pace, you can use developer mode, and directly pull the AASA from your web server. 

To trigger a download you still need to delete the app and reinstall via Xcode (TF and App Store do not work for developer mode.)

I am trying with developer alternate mode. Adjusted to this:

applinks:mydomain.com?mode=developer

and verified in .entitlements file that it's changed.

Deleted the app from device and build&run from Xcode, directly to my device. I had Proxyman running on iPhone to see will it actually fetch the AASA file from our server and it did not. The universal links thus still did not work. What am I missing here..?

Also, not sure this means:

As an additional precaution, only apps that you sign with a development profile can use developer mode, and users must opt-in on any device they use.

Where are users supposed to opt-in on the device..?

Thanks for the sysdiagnose pointer (this should be added to the documentation page). I found this:

Service:              applinks
App ID:               TeamId.bundle.id
App Version:          510.0
App PI:               <LSPersistentIdentifier 0x104622ac0> { v = 0, t = 0x8, u = 0x8a4, db = 284B9176-578F-42D3-A1D7-9F82DA98D040, {length = 8, bytes = 0xa408000000000000} }
Domain:               mydomain.com
User Approval:        unspecified
Site/Fmwk Approval:   unspecified
Flags:                
Last Checked:         2022-01-27 20:20:37 +0000
Next Check:           2022-01-27 23:55:10 +0000
Error:                Error Domain=SWCErrorDomain Code=7 "SWCERR00101 Bad HTTP Response: 503 Service Unavailable -- {"status":"503 Service Temporarily Unavailable"}" UserInfo={Line=274, Function=-[SWCDownloader URLSession:dataTask:didReceiveResponse:completionHandler:], NSDebugDescription=SWCERR00101 Bad HTTP Response: 503 Service Unavailable -- {"status":"503 Service Temporarily Unavailable"}, UnderlyingError=Error Domain=HTTP Code=404 "(null)" UserInfo={Line=274, Function=-[SWCDownloader URLSession:dataTask:didReceiveResponse:completionHandler:]}}
Retries:              1

This 503 error could be because of geo-restrictions on the site itself, I'll try to fix/check this with sysadmins.

To anyone having trouble with this, here's an additional test – do a GET for this https://app-site-association.cdn-apple.com/a/v1/YOURDOMAIN

Replace YOURDOMAIN with whatever domain you put after applinks:. It should return the file version from AASA CDN. If it returns blank, then it means your AASA file or entire domain is not accessible to AASA-Bot and you should investigate that.

Thanks. This is a really good information!!

How to verify that Apple's CDN has picked up newer version of the apple-app-site-association file?
 
 
Q