adjust-icon

숏 브랜드 링크 해석

Adjust의 링크 단축 솔루션은 복잡하고 긴 링크를 간결한 링크로 만들어줍니다. 숏 링크는 딥링크와 캠페인 정보를 유지하며, 사용자가 아직 앱을 설치하지 않은 경우 앱 스토어로 라우팅합니다.

이 섹션에서 설명된 방법을 사용하여 숏 링크를 해석하시기 바랍니다.

Adjust SDK에서 딥링크 설정

Adjust SDK에서 다음에 대한 지원을 추가합니다.

메서드 서명
+ (void)processDeeplink:(nonnull NSURL *)deeplink
completionHandler:(void (^_Nonnull)(NSString * _Nonnull resolvedLink))completionHandler;

AppDelegate 에서 processDeeplink:completionHandler: 메서드를 호출하여 사용자를 앱으로 딥링크한 숏 Adjust 링크 URL을 확인합니다.

- (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;
}

processDeeplink:completionHandler: 메서드로 전송된 링크가 단축된 경우, resolvedLink 는 단축 이전 원본 링크를 반환합니다. 메서드에 전달한 링크가 단축되지 않은 경우 resolvedLink 에는 전달한 링크와 동일한 링크가 포함됩니다.