adjust-icon

Resolve short branded links

Adjust’s link shortener solution converts your complex and long links into cleaner and shorter links. The shortened links retain deep link and campaign information, and route users to the app store, if they don’t have your app installed.

Use the method described in this section to resolve your short links.

Set up deep linking in the Adjust SDK

In the Adjust SDK, add support for the following:

Method signature
+ (void)processDeeplink:(nonnull NSURL *)deeplink
completionHandler:(void (^_Nonnull)(NSString * _Nonnull resolvedLink))completionHandler;

Call the processDeeplink:completionHandler: method from your AppDelegate to resolve a short Adjust link URL that deep linked users into your app.

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> *restorableObjects))restorationHandler {
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
// Pass deep link URL to Adjust in order to potentially reattribute the user
// and to get the URL resolved if it’s a shortened one.
[Adjust processDeeplink:[userActivity webpageURL]
completionHandler:^(NSString * _Nonnull resolvedLink) {
// resolvedLink contains either resolved URL (if it was unshortened)
// or just echoed URL if it was not shortened
}];
}
return YES;
}

In case the link you sent to processDeeplink:completionHandler: method was shortened, resolvedLink returns the extended original link. In case the link you passed to the method wasn’t shortened, then resolvedLink contains the same link you have passed.