Deep Linking

Universal Links, also known as Deep Links, allow links to open directly within your app instead of a mobile browser when clicked in emails, SMS messages, or websites. When configured correctly, they provide a smooth, native experience that drives engagement and retention.

You may enable Universal Links (Deep Linking) by configuring Universal Links or URL Schemes in your App Studio. When universal links are enabled, and a user clicks a http:// or https:// link on their device matching a domain specified, the link will be opened within your app rather than in the mobile browser.

πŸ‘

Developer Demo

Display our demo page in your app to test during development https://median.dev/deep-linking/

After setup, validate your implementation using the Deep Linking Validator.

How Deep Linking Works

To enable deep linking, you must configure Universal Links (iOS) or App Links (Android) within the Median App Studio. Once configured, links that match your specified domains will open in the app instead of a browser.

πŸ’‘

Best Practice

Add both your root domain and the 'www' version (e.g., median.co and www.median.co) to ensure full coverage.

Android: App Links Configuration

On Android, clicking a deep link may display a disambiguation dialog prompting users to choose between your app and a browser.

You may optionally enable App Link Verification for Android devices to bypass the prompt and open links directly in your app. You will need to add a configuration file to your website at /.well-known/assetlinks.json to prove you control the referenced domain. Learn more at Android Documentation.

It is important that your assetlinks.json is hosted properly before publishing your app to avoid verification failures. To confirm your assetlinks.json file is configured correctly, visit Google’s Statement List Generator and Tester, enter your app package name and the sha256 fingerprint found in assetlinks.json, and then click Test Statement. You will need to repeat this process for each hostname you intend to include below.

Example: assetlinks.json

/* Example - Android assetlinks.json */
[
  {
    "relation":["delegate_permission/common.handle_all_urls"],
    "target":
    {
     "namespace":"android_app",
     "package_name":"co.median.android.padzoa",
     "sha256_cert_fingerprints":["ED:30:0F:A9:AB:9D:00:34:9D:48:B0:91:69:83:D7:C9:FE:0A:95:FE:F2:E0:38:25:C9:97:37:D8:F3:16:0B:E0"]
    }
  }
]

iOS: Universal Links Configuration

In iOS, the user will always be presented with a confirmation screen to open a Universal Link in your app. In all cases you need to add a configuration file to your website at /apple-app-site-association or /.well-known/apple-app-site-association to prove you control the referenced domain. Learn more at Apple Documentation .

To enable universal links in iOS, please follow the three requirements below:

  • You must create an explicit app ID in your Apple Developer Account for your app's bundle ID.
  • In your provisioning profile associated with that app ID, you must add "Associated domains" under App Services.
  • You will need to add the app ID to your /.well-known/apple-app-site-association verification file including your TEAMID as obtained your Apple Developer account.

Example: apple-app-site-association

/* Example - /apple-app-site-association */
{
    "applinks": {
        "apps": [],
        "details": [{
            "appID": "TEAMID.co.median.example",
            "paths": ["*"]
        }]
    }
}

🚧

iOS Tips

Deep Links on iOS will not work unless a PATH is specified as part of the URL. For example, http://example.com will NOT work, but http://example.com/PATH will work.

If your site uses multiple subdomains (such as example.com, www.example.com, and support.example.com), EACH requires its own entry in the Associated Domains Entitlement, and each must serve its own /apple-app-site-association file.

You must host the /apple-app-site-association file with a Content-Type: application/json HTTP header, using https:// with a valid SSL certificate, and with a 200 HTTP Status Code with no redirects.

Learn more in Apple's Documentation for Universal Links and Associated Domains.

Test your association file once deployed using https://branch.io/resources/aasa-validator/.