Note: You can skip this part if your server uses HTTPS
to serve content and jump to Application Setup guide.
If your app targets iOS 9 and your server uses HTTPS
to serve content, you don’t need to sign the file. If not (e.g. when supporting Handoff on iOS 8), it has to be signed using a SSL
certificate from a recognized certificate authority.
Note: This is not the certificate provided by Apple to submit your app to the App Store. It should be provided by a third-party, and it’s recommended to use the same certificate you use for your HTTPS
server (although it’s not required).
To sign the file, first create and save a simple .txt version of it. Next, in the terminal, run the following command:
cat <unsigned_file>.txt | openssl smime -sign -inkey example.com.key -signer example.com.pem -certfile intermediate.pem -noattr -nodetach -outform DER > apple-app-site-association
This will output the signed file in the current directory. The example.com.key
, example.com.pem
, and intermediate.pem
are the files that would made available to you by your Certifying Authority.
Note: If the file is unsigned, it should have a Content-Type
of application/json
. Otherwise, it should be application/pkcs7-mime
.
Validate your Server with Apple App search validation tool
Test your webpage for iOS 9 Search APIs. Enter a URL and Applebot will crawl your webpage and show how you can optimize for best results
https://search.developer.apple.com/appsearch-validation-tool/