Error cannot parse app site association

I have been trying for about two weeks to get Universal links to work in my app VineCrawl. For some reason it always tells me
that it cannot parse the association file. However, other tools for testing the association file have no problem. I didn’t sign it since I am targeting iOS 11 and later. A long time ago, I read somewhere that it could be the https cipher that I use, but now I can’t find anything on that. My file is vinecrawl.com/.well-known/apple-app-site-association

Replies

Consider this:

Code Block
% curl -D /dev/stderr https://vinecrawl.com/.well-known/apple-app-site-association
Content-Type: application/pkcs7-mime; charset=utf-8
{
"applinks": {
… elided …
}
}


Your server is returning JSON but the Content-Type header says it’s CMS )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thanks for your help. I changed it back to Content-Type: application/json(I was trying different types based on other people's AASA), but I am getting the same error message.
It seems like a bug on Apple's end. because I found the older version of the AASA format and it worked, but only if I take out the newer keys and values, appIDs and components.

It has to be something trivial in the headers. If you look, snapchat.com fails, facebook.com succeeds.

If you look at

curl -v https://facebook.com/.well-known/apple-app-site-association

Snippet of headers from facebook

< HTTP/2 200 
< content-disposition: inline;filename=apple-app-site-association
< content-type: application/json

Snippet of my own headers (failing), you can see my load balancer is also injecting charset in content-type

< HTTP/2 200 
< server: awselb/2.0
< date: Wed, 15 Sep 2021 21:54:35 GMT
< content-type: application/json; charset=utf-8

Snap's content-type is just wrong

< HTTP/2 200 
< date: Wed, 15 Sep 2021 21:58:09 GMT
< expires: Sun, 14 Nov 2021 21:58:09 GMT
< cache-control: public, max-age=5184000
< etag: "AHj-xA"
< x-cloud-trace-context: 90deb7ca85c66e719276245d1263ea3a
< content-type: application/octet-stream
< server: Google Frontend

Reddit is passing with

< HTTP/2 200 
< retry-after: 0
< content-type: application/json

It would be great if Apple could give a precise Content-Type recommendation for the apple-app-site-association file. The documentation here no longer defines any Content-Type: https://developer.apple.com/documentation/xcode/supporting-associated-domains.

As such, everyone now has to guess.

Also, since the validator tool is missing in action (i.e. 503 service unavailable) https://search.developer.apple.com/appsearch-validation-tool/, it's hard to know if the content or Content-Type is valid.

By contrast, Google gives a precise recommendation: https://developers.google.com/digital-asset-links/v1/create-statement

Thanks for listening

It seems that this info got dropped when the docs moved to the new system. The archived App Search Programming Guide says:

If your app runs in iOS 9 or later and you use HTTPS to serve the apple-app-site-association file, you can create a plain text file that uses the application/json MIME type and you don’t need to sign it.

which is the droid you’re looking for. I’d appreciate you filing a bug against the new doc to get this added back in.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"