Deep linking methods

Use the methods in this article to configure deep linking in your app.

appWillOpenUrl

Check a deep link URL for attribution data and send it to the Adjust backend for reattribution.

+ (void)appWillOpenUrl:(nonnull NSURL *)url;
Swift
Objective-C
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
    // url object contains your deep link content

    Adjust.appWillOpen(url)

    // Apply your logic to determine the return value of this method
    return true
    // or
    // return false
}

resolveLinkWithUrl

Enables the Adjust SDK to follow redirects to resolve email campaign links. This method follows up to 10 redirects and returns either the final domain or the 10th domain returned depending on which comes first.

Swift
Objective-C
ADJLinkResolution.resolveLink(
    withUrl: url,
    resolveUrlSuffixArray: ["example.com"],
    callback: { resolvedLink in
        Adjust.appWillOpen(resolvedLink)
    })

setLinkMeEnabled

Enable Adjust's LinkMe solution for deep linking.

@property (nonatomic, assign) BOOL linkMeEnabled;
Swift
Objective-C
Javascript
let yourAppToken = "{YourAppToken}"
let environment = ADJEnvironmentSandbox as? String
let adjustConfig = ADJConfig(
    appToken: yourAppToken,
    environment: environment)
//...
adjustConfig?.linkMeEnabled = true
//...
Adjust.appDidLaunch(adjustConfig)