I have some problem in creating apple-app-site-association file.I don't know how to create json file without json extentsion and have content type application/json
for the same file.I want to use this file without any signing as it doesn't need in IOS 9 but I couldn't able to create the valid apple-app-site-association file.
I have setup everything on my app like associated domains,app delegate method,provisioning profiles.
Here is my code on the backend side:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "teamID.bundleID",
"paths": [ "*" ]
}
]
}
}
Using the AppStore.com URL shortener, you can quickly and easily share a direct link to an app without having to launch the App Store to find it.
Another method is to use file match to match exactly your file and to enforce the required content-type:
add following lines to your .htaccess
file:
<FilesMatch "^apple-app-site-association$">
ForceType application/json
</FilesMatch>
this worked for me.
Open your terminal and type
cd desktop
press return key and then type
touch apple-app-site-association
press return
a file is created without any extension
I added the following to the .htaccess file in the root folder. This is a bit rough, but it worked for me to return the file in application/json
RewriteRule ^apple-app-site-association$ - [env=apple:1]
Header set Content-type application/json env=apple
I was not able to make Universal Link work with iOS9 serving application/json yet. Let me know if you made i work.
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