Im working on universal link to open the application while tap the url. I am using https server and done all the steps from apple (Apple Doc). But the apple universal link validator show below error,
Your file's 'content-type' header was not found or was not recognized.
The apple-app-site-association file successfully uploaded to server and the file be like below,
{
"applinks": {
"apps": [],
"details": [
{
"appID": "J2HBF9A3PZ.com.aors.speaku",
"paths": ["*","/"]
}
]
}
}
And apple said no need to sign the apple-app-site-association
file whether the domain has https.
If the file is unsigned, it should have a Content-Type of application/json. Otherwise, it should be application/pkcs7-mime.
So my query is how to mention the content type (application/json
) in this apple-app-site-association
file???
please help me on this. i don't know what it mean exactly.
TEST THE UNIVERSAL LINKS Run the application on the simulator once to make sure the application is installed and running fine. 2. Keep the same simulator launched and running. Go to your simulator browser and open type the ngrok domain address i.e., https://1bd39880fbad.ngrok.io in my case.
Universal linking is Apple's method of launching apps on iOS when linked from a website. Universal Links are a particular protocol for deep linking that are exclusive to Apple devices (available in iOS version 9 and above).
By definition, Universal Links do not work when they are redirected from another URL. This limit is meant as a security measure, preventing a website from opening apps without explicit user intention.
I just solved this issue myself. I had to logon to my server and go to the directory where the apple-app-site-association
file was. In this directory, I had a .htaccess
file which I modified to include the following lines:
<Files "apple-app-site-association">
ForceType 'application/json'
</Files>
After doing this, the validation service stopped complaining about the Content-Type
.
NOTES:
.htaccess
file, you can just create one..htaccess
file should be in the root of your site directory (which is where you would most likely have placed your apple-app-site-association
file.Wordpress website. Pasting this at the end of .htaccess actually worked for me:
Header set Content-type "application/pkcs7-mime"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With