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.
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 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.
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.
Next, go to your AppsFlyer OneLink Configuration page and perform the following:
You must complete these steps before continuing to the Associated Domains stage.
- Enable Universal Links
- Enter your App ID Prefix
Preparing Your App
Follow the steps below to continue the process.
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:
2. You must generate your provisioning files for your app, download them and double-click to install them on Xcode.
Configuring Your App
You must complete the OneLink Configuration before continuing with the next steps.
- Go to Xcode and select your app target.
- In the Capabilities section, enable Associate Domains.
- Add you app's OneLink domain as configured on the OneLink configuration. It must be prefixed by applinks. For example: applinks:mydomain.onelink.me
- The sub-domain (“mydomain” in the example) is your sub-domain on OneLink.
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 deeplink into your app when installed.
It 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.
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.
- If you have configured Universal Deeplinking for iOS9 the Shorten Link button on the AppsFlyer dashboard is grayed 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.