Setting Deeplinking in iOS9 (and above) using iOS Universal Links

The following article describes the process for using Deeplinking in iOS9 and above and iOS Universal Links.  It is important that you configure both for it to work successfully.  

Follow these steps:

Configuring OneLink

iOS requires a secure connection between the app to its associated domains. To establish this secure connection between your app and your OneLink’s domain, AppsFlyer automatically creates and places a file called apple-app-site-association on this domain with the Bundle Identifier and App ID Prefix of your app.

The App ID Prefix appears by going to Identifiers >> App IDs on Apple's Developer Portal. Universal_Links_Prefix.png

The Bundle ID appears on the app’s target -> General on Xcode and also as the app identifier in the Apple developer center. AppsFlyer automatically fetches it from the App Store, unless your app is not yet in the store and then you are required to set it manually using the OneLink configuration.

Go to your AppsFlyer OneLink Configuration page:

OneLink_Config_page_new.png

NOTE:  You must complete these three steps before continuing to the Associated Domains stage.

  1. Enable Universal Links

    Enable_UL.png
  2. Enter your App ID Prefix

    App_ID_Prefix.png
  3. Click Save & Close

Preparing Your App

Creating a Provisioning Profile

Provided your app is already registered on Apple’s Developer Center, you must enable Associated Domains on your app’s Identifier.

Enabling Associated Domains:

1.  Go to Identifiers >> App IDs and select your app and enable Associate Domains

1.png

2.  You must generate your provisioning files for your app, download them and double-click to install them on Xcode. 

Configuring Your App

NOTE:  You must complete the OneLink Configuration before continuing with the next steps.

  1. Go to Xcode and select your app target.
  2. In the Capabilities section, enable Associate Domains.
  3. Add you app's OneLink domain as configured on the OneLink configuration. It must be prefixed by applinks. For example: applinks:mydomain.onelink.me

    2.png
  4. The sub-domain (“mydomain” in the example) is your sub-domain on OneLink.
    Onelink_additional_configuration.png

Testing

Now your app and configuration are set, you can generate a OneLink URL through Media Source Configuration >> Integrated Partners and use it to deeplink into your app.

As long as OneLink is enabled, the links generated have your selected domain (example: myapp.onelink.me) which deeplinks into your app when installed.

NOTEIt is only possible to test a deeplink on a real device. Make sure you delete the app from the device before running it with the Associate Domain changes.

Using iOS Test App

If you are using an iOS test app and have already set up Universal Links, you can configure the live app's OneLink URL to debug your iOS app. Clicking on OneLink on a device that contains the debug app opens up the debug app with Universal links, providing the debug app is installed on the device and the live app isn't.

Setup:

  1. On the OneLink Configuration page set the Enable Universal Links for deeplinking toggle button to On.
  2. Set the Add test apps configuration toggle button to On.
  3. Enter the test app's App ID prefix and the iOS App Bundle ID, repeat this process for each app you want to test.

    Universal_Deep_Links.png

However, if you don't have an iOS test app, should you build it or not?  

Troubleshooting

If Safari opens, instead of the app - try to delete the app and run it again. If the problem persists, try to add another row on the Associate Domains (so it is changed). Then, delete the app and repeat the process.

Make sure your OneLink has the same domain as set on the app. 

Limitations

  • If you have configured Universal Deeplinking for iOS9 the Shorten Link button on the AppsFlyer dashboard is greyed out and cannot be used.
  • Due to an iOS limitation universal links do not open apps when they are set into the browser address bar, including Safari.
  • Apple requires that Universal Links be tapped on directly by the end user. This means that OneLink can't be wrapped for click tracking, be redirected to or be triggered programmatically.

 

Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request
Powered by Zendesk