skip to Main Content

I try to activate deeplinking for my iOS app, but I have issues to do so.

As said in the official IOS tutorial :

1) I uploaded on my own website the following content :

{
  "applinks": {
      "apps": [],
      "details": [
      {
        "appID": "xxx.com.myapp.app",
        "paths": ["*"]
      }
    ]
  }
  
}

I uploaded this on a link : https://myapp.web.app/apple-app-site-association

2) I filled XCode with the following informations
[See what i did on xcode]

However, when i click on a link who’s supposed to open my app, this is not working…
Do you see something I did wrong or I could have missed?

Thank you for your help on this

2

Answers


  1. You need to be sure the file is servered as a JSON file.
    If you are using firebase hosting for example you need to add into your firebase.json this:

    {
      "hosting": {
        "headers": [
          {
            "source": "/.well-known/apple-app-site-association",
            "headers": [{"key": "Content-Type", "value": "application/json"}]
          }
        ]
      }
    }
    

    Or add .htaccess with

    <FilesMatch "apple-app-site-association">
        ForceType application/json
    </FilesMatch>
    
    Login or Signup to reply.
  2. You need to make sure that the file type is served as JSON by your server.
    In Nginx you can do it by adding the following block to your server configuration

    location ~* ^/(.well-known/)?apple-app-site-association {
        default_type 'application/json';
    }
    

    You can also do this in Firebase with a firebase.json file containing :

    {
      "hosting": {
        "headers": [
          {
            "source": "/.well-known/apple-app-site-association",
            "headers": [{"key": "Content-Type", "value": "application/json"}]
          }
        ]
      }
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search