ARwayKit SDK
❱ HOMEPAGE⚎ DEVELOPER PORTAL
  • Introduction
  • Change Log
  • FAQ
  • ARWAY SDK
    • Getting Started
    • Building from the Source Code
    • Integrating the Unity Package
    • Managing App Localizations
      • Enabling Right-to-Left (RTL) Text
    • Sample Scenes
      • Dashboard
      • AR Map Session
    • Branding the Sample App
      • Replacing ARway Logos in the Sample App
    • Third Party
    • SDK Upgrade Guide
      • 3.1.0 -> 3.1.4
      • 3.0.1 -> 3.1.0
      • 3.0.0 -> 3.0.1
      • 2.5.1 -> 3.0.0
      • 2.3.1 -> 2.5.1
      • 2.3 -> 2.3.1
    • Enhancing the Sample App
      • Instant Location Pin Navigation
      • Customizing the Default Navigation Arrow
      • Initializing AR Using an IAP
  • Maps Studio
    • Overview
    • Maps Studio
      • Creating a Map
      • Editing Map Details
      • Uploading Content
      • QR Codes
      • Image Access Points (IAPs)
      • Floorplans
      • Using the Editor
      • Occlusion
      • Analytics
  • ARwayKit SDK Integrations
    • Flutter
      • Quickstart in Flutter
    • React Native
      • Quickstart in React Native
    • Android Kotlin
      • Quickstart in Android Kotlin
    • Android Java
      • Quickstart in Android Java
    • iOS Swift
      • Quickstart in iOS Swift
  • Deep Linking
    • What is Deep Linking?
    • Creator Portal Changes
    • Modifying the SDK
    • Configuring Server Files
  • DEVELOPER FEEDBACK
    • Support
Powered by GitBook
On this page
  • Apple App Site Association (apple-app-site-association)
  • Android Digital Asset Links (assetlinks.json)
  • Redirecting to the Apple App Store & Google Play Store (redirection.html)
  • Additional Path Parameters
  • Verifying Deep Link Setup
  1. Deep Linking

Configuring Server Files

Configuring apple-app-site-association, assetlinks.json, and the redirection.html files

Mobile app deep linking enables seamless navigation between web pages and app content, enhancing the user experience and engagement. To implement deep linking on iOS (using apple-app-site-association), Android (using assetlinks.json) and the app redirect (using redirection.html), follow the instructions below.

Apple App Site Association (apple-app-site-association)

1. Create the File:

  • Create a JSON file named apple-app-site-association (with no file extension) using a text editor.

2. JSON Structure:

  • The apple-app-site-association file should contain a JSON object with the following structure:

apple-app-site-association
{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "<TeamID>.<BundleID>",,
        "paths": [
          "*"
        ]
      }
    ]
  }
}
  • Replace <TeamID> with your Apple Team ID and <BundleID> with your app's Bundle ID.

3. Specify Associated Domains:

  • In your Xcode project, go to the "Signing & Capabilities" tab.

  • Enable the "Associated Domains" capability.

  • Add the domain(s) and paths that you want to associate with your app using the applinks:<domain> format.

4. Add the File to the Server:

  • Place the apple-app-site-association file at the root of your domain (e.g., https://www.yourdomain.com/.well-known/apple-app-site-association).

5. Test Universal Links:

  • Deploy your app on a testing device through TestFlight or other testing methods.

  • Ensure the app is associated with the correct domain and paths.

  • Open a link that matches the specified domain and path on your testing device. It should open the app directly to the specified content.

Android Digital Asset Links (assetlinks.json)

1. Create the File:

  • Create a JSON file named assetlinks.json using a text editor.

2. JSON Structure:

  • The assetlinks.json file should contain a JSON array with the following structure:

assetlinks.json
[
  {
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
      "namespace": "android_app",
      "package_name": "your.app.package",
      "sha256_cert_fingerprints": ["<SHA256_Fingerprint>"]
    }
  }
]
  • Replace your.app.package with your Android app's package name.

  • Obtain the <SHA256_Fingerprint> by running the following command:

  • keytool -list -v -keystore your_keystore.keystore

3. Add the File to the Server:

  • Place the assetlinks.json file at the root of your domain (e.g., https://www.yourdomain.com/.well-known/assetlinks.json).

Redirecting to the Apple App Store & Google Play Store (redirection.html)

1. Create the File:

  • Create a JSON file named redirection.htmlusing a text editor.

2. HTML Structure:

  • The redirection.html file should contain the following structure:

redirection.html
<html>
<head>
   <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
</head>
<body>

<script>
    const getMobileOS = () => {
        const ua = navigator.userAgent;
        let redirectUrl;
        
        const androidUrl = "https://play.app.goo.gl/?link=https://play.google.com/store/apps/details?id=your.app.package";
        const iOSUrl = "https://apps.apple.com/us/app/your-app-name/id123456789";
        const nonMobileUrl = "https://www.arway.ai/";
        
        if (/android/i.test(ua)) {
            redirectUrl = androidUrl;
        } else if (/iPad|iPhone|iPod/.test(ua)) {
            redirectUrl = iOSUrl;
        } else {
            redirectUrl = nonMobileUrl;
        }
        
        setTimeout(() => {
            window.location.href = redirectUrl;
        }, 3000);
    };
    
    getMobileOS();
</script>

</body>
</html>
  • Replace the variables androidUrl and iOSUrl with your own app store links.

  • Replace the variable nonMobileUrl with a fallback link in the case that someone is opening the link from a non-mobile device.

3. Add the File to the Server:

To achieve the desired behavior where any URL in the format of https://qr.yourdomain.com/{*} is redirected to the "redirection.html" file, you need to set up server configuration rules.

Keep in mind that the implementation specifics may vary depending on the web server you are using (e.g., Apache, Nginx) and the server-side scripting language (e.g., PHP, Node.js) you have at your disposal. The redirection can be achieved through server configuration files or using server-side code to handle the redirection logic.

Additional Path Parameters

Path parameters in deep linking simplify user access by directing them to specific content or features within apps, aiding personalization and tracking. They enhance sharing and engagement, offering a seamless experience.

Include paths in the Deeplink Domain on the 'For Developers' page of the Creator Portal if you want to add these extra path parameters.

More information on path parameters for deep links can be found below.

Verifying Deep Link Setup

PreviousModifying the SDKNextSupport

Last updated 1 year ago

To verify that your deep link setup is working correctly, you can use Branch's to test your apple-site-association file and follow this for your assetslinks.json file.

"Associated Domains" validation tool
developer guide
Allowing apps and websites to link to your content | Apple Developer DocumentationApple Developer Documentation
iOS allowing apps and websites to link to your content
Logo
Create a deep link for a destination  |  Android DevelopersAndroid Developers
Android deep linking
Logo