ios: Universal links not working on iOS 10

meteors picture meteors · Feb 26, 2017 · Viewed 7.6k times · Source

I'm trying to integrate universal links in my iOS app. So whenever someone taps on <myapp>.herokuapp.com/content gets redirected directly to app. I followed this guide for setup. I did the following setup but cannot get it working. I also checked other threads on stackoverflow but none of them solved the issue.

  • Added Associated Domains in Capabilities Tab on my app's target. Added two domains: activitycontinuation:<myapp>.herokuapp.com and applinks:<myapp>.herokuapp.com.
  • In Build Phases > Copy Bundle Resources added the file .entitlements.
  • Got teamId from https://developer.apple.com/account/#/membership
  • On my website added a route for apple-app-site-association at https://<myapp>.herokuapp.com/apple-app-site-association which returns the following json:

    {
        "applinks": {
            "apps": [],
            "details": [
                {
                    "appID": "<teamId>.<bundleId>.dev",
                    "paths": [ "*" ]
                },
                {
                    "appID": "<teamId>.<bundleId>",
                    "paths": [ "*" ]
                }
            ]
        },
        "activitycontinuation": {
            "apps": [
                "<teamId>.<bundleId>.dev",
                "<teamId>.<bundleId>"
            ]
        }
    }
    
  • Installed app from Xcode to iPhone 6s Plus (physical device) with bundle id <bundleId>.dev and copied link https://<myapp>.herokuapp.com/content to Notes but it opens in Safari.

Answer

meteors picture meteors · Mar 1, 2017

Fixed the issue. The problem was that I was testing with Debug configuration. When I tried with Release build everything is now working fine.