Modifying the SDK

ARway Unity SDK allows you to create and customize deep links for your augmented reality (AR) experiences. Deep links can be used to direct users to specific content within your AR app. By default, the ARway SDK uses the URL 'anchor.arway.ai', but you may want to use your custom domain URL for branding purposes.

By default, the Sample App can scan QR codes with the custom domain you have set, but there are a few changes that should be made for Android and iOS for deep linking.

Update the DomainHandler in the Dashboard-SDK scene

  1. Open the Dashboard-SDK scene located at /Assets/ARway/ViewerMode/0_Scene.

  2. Select the DomainHandler object.

  3. In the Inspector window, edit the DOMAIN under the Domain Handler (Script) to your custom domain URL.

Modify the SDK Files

To change the URL from 'anchor.arway.ai' to your custom domain URL 'www.yourdomain.com', you need to modify the following files in the ARway Unity SDK:

  1. Android: AndroidManifest.xml

  2. iOS: entitlements fille

iOS

Modifying the entitlements file

  1. Open your project in Xcode.

  2. Choose your target, in this case it is Unity-iPhone.

  3. Access the "Capabilities" tab.

  4. Scroll down to "Associated Domains".

  5. Click the Add button (+) to insert a service-domain placeholder.

  6. Add your domain link, like applinks:www.yourdomain.com.

  7. Save your changes and build your app.

For more information view this link from the Apple docs:

Android

Modifying AndroidManifest.xml

Path: Assets/ARwayKitSDK/Plugins/Android/AndroidManifest.xml

  1. Open the 'AndroidManifest.xml' file in a text editor or within Unity's editor.

  2. Locate the deep link URL in the file, which should look like this:

    <data android:host="anchor.arway.ai" />
  3. Replace the existing URL with your custom domain URL 'www.yourdomain.com':

    <data android:host="qr.yourdomain.com" />

Rebuild the App

After making the necessary modifications to the SDK files, follow these steps to rebuild the app on your device:

  1. Save all the modified files.

  2. In Unity, go to 'File' > 'Build Settings'.

  3. Select your target platform (e.g., Android / iOS).

  4. Click on 'Build and Run' to rebuild the app with your custom deep link URLs.

Last updated