1

In order to make the connection between a website and an iOS app, I am trying to set Universal Links. But I am facing some issues. At this point I am using this tool to check that things are OK.

The URL I am checking looks like this:

http://www.example.net/MyApp/

And the results I get look like this:

Title         Passed         .....

Description     Recommended  .....

Image           Passed  https://....../rock.jpg     

Touch Icon      Passed  http://......./custom_icon.png  

Link to Application     Action required

                    Could not extract required information
                    for application links. Learn how to
                    implement the recommended Universal Links.

                          Error cannot fetch app site association

As one can see, the problem is the "Link to Application" not working. But I have set a file apple-app-site-association inside .well-known/ under the root directory of the website.

And the apple-app-site-association file looks like this:

{
  "applinks": {
      "details": [
           {
             "appIDs": ["1122..8899.mybundle.example.MyApp"]    ,
         "paths": [ "*" ]
           }
       ]
   },
   "webcredentials": {
      "apps": ["1122..8899.mybundle.example.MyApp"]
   }
}

Is there something in what is above looking wrong or suspicious.

I have never really used Universal Links before, so I am not confident that I am doing the right thing.

Asperi
  • 228,894
  • 20
  • 464
  • 690
Michel
  • 10,303
  • 17
  • 82
  • 179
  • @ Eric Aya; I have tried your second suggestion, it doesn't make any difference. I don't understand what you mean in your first comment. – Michel Aug 08 '20 at 10:49
  • I tried your suggestion and I get this error: "Error cannot parse app site association" instead of this one: "Error cannot fetch app site association" – Michel Aug 08 '20 at 11:04
  • Well then I don't know. Looks like there's good informations at https://gist.github.com/anhar/6d50c023f442fb2437e1 Have a look, maybe it could help you clear things up. – Eric Aya Aug 08 '20 at 11:11

1 Answers1

0

There are two things that need to be done for universal links.

  1. Setting up the apple-app-site-association in the .well-known/ under the root directory.

  2. Add your domain www.example.com inside your xcode project settings as capabilities.

The second step tells that the app has to consider this (www.example.com) as the base URL and the paths which you provide in the apple-app-site-association file will be appended to this base URL (EG: "www.example.com/*")

To do this go to project settings -> Signing and Capabilities -> Associated Domains -> Hit + and add you website as a domain like this (applinks:example.com)

Swami Nathan
  • 411
  • 2
  • 8
  • By the way, here is a question: what should be set in the associated domain? webcredentials:example.com or applinks:example.com – Michel Aug 08 '20 at 10:55
  • applinks:example.com – Swami Nathan Aug 08 '20 at 10:55
  • OK, I'll try, I have seen both in various documents. – Michel Aug 08 '20 at 11:05
  • I tried and it makes no difference. As a matter of fact, I think the tool I am using now is only taking care of the correctness of the server side (i.e. apple-app-site-association file. Am I wrong? – Michel Aug 08 '20 at 11:21
  • Yeah i understood. I think the key is just appID and not appIDs – Swami Nathan Aug 08 '20 at 11:25
  • I am now getting: Error no apps with domain entitlements The entitlement data used to verify deep link dual authentication is from the current released version of your app. This data may take 48 hours to update. – Michel Aug 08 '20 at 11:47
  • 1
    I checked with google.com in the apple tool and it throws error for that website as well. If the email link opens your app then I think it is good to go. I personally use branch.io for AASA validation. There is a similar question already which you can refer as well - https://stackoverflow.com/questions/40087119/no-apps-with-domain-entitlements – Swami Nathan Aug 08 '20 at 12:10
  • OK. I will take a look then. Thanks. – Michel Aug 08 '20 at 12:19