Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create apple-app-site-association file for Universal Linking in IOS 9?

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": [ "*" ]
          }
      ]
   }
 }
like image 538
Abilash Bansal Avatar asked Jan 22 '16 11:01

Abilash Bansal


People also ask

How do I create an iOS app link?

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.


3 Answers

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.

like image 69
hhamm Avatar answered Nov 15 '22 19:11

hhamm


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

like image 30
Shourob Datta Avatar answered Nov 15 '22 19:11

Shourob Datta


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.

like image 40
Daigo Sato Avatar answered Nov 15 '22 19:11

Daigo Sato