We’re trying to set up an association file for a website that didn’t have it before.
We’ve uploaded the file to https://www.our-website.com/.well-known/apple-app-site-association
(as suggested in the documentation). Unfortunately, it didn’t work, the links still open in the browser instead of our app and we can’t seem to figure out why.
We tried querying the Apple CDN, and for some reason it returns 404:
$ curl -v https://app-site-association.cdn-apple.com/a/v1/www.our-website.com
>
< HTTP/2 404
< apple-failure-details: {"cause":"invalid character 'u003c' looking for beginning of value"}
< apple-failure-reason: SWCERR00401 Bad JSON content
< apple-from: https://www.our-website.com/.well-known/apple-app-site-association
< apple-try-direct: false
< cache-control: max-age=3600,public
< content-type: text/plain; charset=utf-8
< via: https/1.1 dkvib1-3p-pst-001.ts.apple.com (acdn/153.14426), http/1.1 dkvib1-3p-pac-001.ts.apple.com (acdn/153.14426), https/1.1 dkvib1-3p-pfe-002.ts.apple.com (acdn/153.14426), 1.1 varnish
< cdnuuid: 1741f0c3-efb3-42fa-b574-ae3bfebb13f6-333001418
< expires: Fri, 24 May 2024 10:43:27 GMT
< accept-ranges: bytes
< age: 1693
< date: Fri, 24 May 2024 11:11:25 GMT
< x-cdn: fsly
< x-served-by: cache-bma1670-BMA
< x-cache: hit-stale, hit-fresh, hit-stale, HIT
< x-cache-hits: 0
< x-timer: S1716549085.460891,VS0,VE1
< content-length: 10
<
Not Found
Requesting the association file directly returns 200 though (we tried from different networks, all works fine):
$ https://www.our-website.com/.well-known/apple-app-site-association
< HTTP/2 200
< date: Fri, 24 May 2024 11:03:15 GMT
< content-type: application/json; charset=utf-8
< content-length: 200
< cache-control: no-store
< x-varnish-director: sports_web_pro
< vary: Accept-Encoding,User-Agent
< x-cache: MISS
< x-age: 0
< age: 0
< accept-ranges: bytes
<
(json content here)
According to AASA validator, all is good:
It’s been several days already, so this probably isn’t a caching issue. Previously we also tried hosting the file at https://www.our-website.com/apple-app-site-association
but the result was the same.
Strangely, the diagnostic tool on iPhone (in Settings > Developer) reports that all is A-OK:
This is all thoroughly confusing, especially the failure message: {"cause":"invalid character 'u003c' looking for beginning of value"}
. Is the CDN bot trying to parse the body even after receiving 404?
Anyone has any ideas?