5

I tried almost everything, but I'm unable to get Universal Links to work. I'm testing with Xcode 9.3 on physical device with iOS 11.3.

On my server I installed the apple-app-site-association File, the AASA validator (https://branch.io/resources/aasa-validator/) has no issues with it.

File content:

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "TEAMID.bundle-identifier",
        "paths": [ "*", "/" ]
      }
    ]
  }
}

AASA result: AASA result

Also I tripple checked TeamID and BundleIdentifier. The Entitlements in Xcode contains the right values: enter image description here

But still any link redirects to Safari, Open In.. from the long-press menu is not available. From my server-logs, it seems the apple-app-site-association file is never downloaded.

Update

apple-app-site-association file is without file extension. I tried with installing over Xcode as well as over TestFlight.

Here the Associated Domains from Xcode: enter image description here

Kevin Flachsmann
  • 466
  • 1
  • 4
  • 17
  • Have you appended `.json` with the `apple-app-site-association` file as `apple-app-site-association.json` by mistake? – nayem May 25 '18 at 15:58
  • I have only ever got this working on an Enterprise or Release build, never Debug/Dev Signed. The trust chain needs to be complete. If you examine the console logs the device spits out you might see a security failure at app launch which would indicate that failure. – Warren Burton May 25 '18 at 16:10
  • You should also see the hits from the client via Charles Proxy or similar to the apple-app-site-association if things are working. – Mark Thormann May 25 '18 at 16:27
  • You may also double-check that you can see the domain properly in the Capabilities tab with the switch set to ON there. If there's a formatting error in Entitlements or something, that might flush it out. – Mark Thormann May 25 '18 at 16:30
  • see updated question – Kevin Flachsmann May 26 '18 at 11:18
  • Check this: https://stackoverflow.com/questions/32751225/ios-universal-links-are-not-opening-in-app/66353132#66353132 – Sagar Sukode Feb 24 '21 at 14:43

4 Answers4

3

I believe it should be applinks: not applink: in the Entitlements file

Mark Thormann
  • 2,522
  • 1
  • 21
  • 23
3

The problem was the same as described in this blog-post https://blog.branch.io/notice-inconsistent-universal-link-behavior-on-ios-11-2/

I uninstalled, restarted and installed it for 3 times, then it started working.

Kevin Flachsmann
  • 466
  • 1
  • 4
  • 17
1

Please replace the appId(TEAMID.bundle-identifier) with application identifier. We will get it simply from your App Store account from provisioning profile.

0

Another (unusual) way this can happen.

I was banging my head against the wall trying to get my links to work in same situation. On device the links open in my hosted site, but don't transition to open my app, instead they opened the App Store and complained that my app wasn't found. Eventually I realized I had never uploaded my app to the App Store (even though I had create an App record for it in my account). Once I uploaded an actual binary, my links started working perfectly.

SafeFastExpressive
  • 3,637
  • 2
  • 32
  • 39