Search code examples
ios9deep-linking

applinks in iOS 9 not working


I don't get applinks: in iOS not working, whenever I open a link like https://www.example.com/something on my iOS 9 device, it gets opened in Safari.

I'm running the app via debug provisioning profile, on my server there is a file called apple-app-site-association.

There are two different formats I found:

{
  "applinks": {
    "apps": [],
    "details": {
      "AB1CDEFGHI.com.mydomain.myapp": {
        "paths": ["*"]
      }
    }
  }
}

as well as

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

so that's the first thing I'm not sure which one to use.

The second is the 'AB1CDEFGHI'-part; the "Team-ID" of the app? Is it the stuff that's included in the appid or really the team id of the developer account?

So is it this one completely blacked out?

enter image description here

or is it this one here (again, the part completely blacked out)?

enter image description here

EDIT

I just tried setting it up in another app, worked the first time without any problems - really don't know the difference.

  • AppId includes entitlements
  • apple-app-site-association is the same
  • associated domains added in app
  • - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler implemented

what could I probably be missing?

EDIT 2

I just saw a difference in both apps (the one that's working and the one that doesn't): the working app has an AppId in the developer portal with a prefix matching the TeamID, the not-working app has a prefix which is different from the TeamID. I already tried using the prefix from the AppID in the apple-association-file, but it doesn't work either...


Solution

  • I found the error on my side: I had to use the App IDs prefix in the apple-app-site-association file which was different than the TeamID for this specific app.

    I didn't find a documentation where it says something other than TeamID, that's why it took me so long. Only after I compared with two apps I found the only difference and now it's working.