Before you begin
SDK v5로 업데이트하기 전에 다음을 수행하시기 바랍니다.
- SDK v5는 SDK Signature(SDK 서명) 인증을 기본적으로 지원합니다. 현재 SDK 서명 라이브러리를 사용하는 경우 먼저 이것을 삭제해야 합니다.
- 앱이 다음보다 낮은 버전의 API를 대상으로 하는 경우 SDK v5를 사용하려면 앱을 업데이트해야 합니다.
- iOS: 12.0
- tvOS: 12.0
Install the beta SDK
SDK v5를 사용하려면 XCode 프로젝트에서 디펜던시로 추가해야 합니다. 다음을 수행하시기 바랍니다.
-
현재
Podfile
에 있는 이전 버전의 SDK를 모두 제거합니다. -
Podfile
에 다음 줄을 추가합니다.Podfile pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :branch => 'v5' -
pod install
을 실행하여 디펜던시를 설치합니다.
Changes
v5 SDK를 설치한 후에는 새로운 API를 사용할 수 있도록 기존의 Adjust 코드를 업데이트해야 합니다.
Initialization method
SDK v4에서는 ADJConfig
객체를 구성하고 이를 [Adjust appDidLaunch]
메서드에 전달하는 방식으로 SDK를 초기화합니다.
let yourAppToken = "{YourAppToken}"let environment = ADJEnvironmentSandbox as? Stringlet adjustConfig = ADJConfig( appToken: yourAppToken, environment: environment)
Adjust.appDidLaunch(adjustConfig)
#import "Adjust.h"
NSString *yourAppToken = @"{YourAppToken}";NSString *environment = ADJEnvironmentSandbox;*adjustConfig = [ADJConfig configWithAppToken:yourAppToken; environment:environment];
[Adjust appDidLaunch:adjustConfig];
SDK v5에서는 이 메서드의 이름이 [Adjust initSdk]
로 변경되었습니다.
let yourAppToken = "{YourAppToken}"let environment = ADJEnvironmentSandbox as? Stringlet adjustConfig = ADJConfig( appToken: yourAppToken, environment: environment)
Adjust.initSdk(adjustConfig)
#import "Adjust.h"
NSString *yourAppToken = @"{YourAppToken}";NSString *environment = ADJEnvironmentSandbox;ADJConfig *adjustConfig = [[ADJConfig alloc] initWithAppToken:yourAppToken environment:environment];
[Adjust initSdk:adjustConfig];
Signature setup
SDK v5는 SDK Signature 라이브러리 를 포함합니다. 이를 테스트하려면 Signature 라이브러리 연동 가이드 에 나온 테스트 단계를 수행하시기 바랍니다.
서명 보호는 기본 설정에 따라 비활성화되어 있습니다. 이를 활성화하려면 서명 검증을 시행 해야 합니다.
Configuration
이 섹션에서는 SDK 구성의 변경 사항을 다룹니다.
Disable and enable the SDK
SDK v4에서는 BOOL
값과 함께 [Adjust setEnabled]
를 호출하여 SDK를 활성화 및 비활성화할 수 있습니다.
- SDK를 비활성화하려면
[Adjust setEnabled:NO]
를 호출합니다. - SDK를 활성화하려면
[Adjust setEnabled:YES]
를 호출합니다.
Adjust.setEnabled(false) //disable SDKAdjust.setEnabled(true) //enable SDK
[Adjust setEnabled:NO]; // disable SDK[Adjust setEnabled:YES]; // enable SDK
SDK v5에서는 명확성을 위해 이 기능이 별도의 명령으로 분리되었습니다.
- SDK를 비활성화하려면
[Adjust disable]
를 호출합니다. - SDK를 활성화하려면
[Adjust enable]
를 호출합니다.
Adjust.disable() //disable SDKAdjust.enable() //enable SDK
[Adjust disable]; // disable SDK[Adjust enable]; // enable SDK
Send information in background
SDK v4에서는 true
인수와 함께 [ADJConfig setSendInBackground]
메서드를 호출하여 앱이 백그라운드에서 실행 중일 때 SDK가 Adjust에 정보를 전달하도록 설정할 수 있습니다.
adjustConfig.setSendInBackground(true)
[adjustConfig setSendInBackground:YES];
SDK v5에서는 앱이 백그라운드에서 실행 중일 때 SDK가 Adjust에 정보를 전송할 수 있게 하려면 인수 없이 [ADJConfig enableSendingInBackground]
메서드를 호출해야 합니다.
adjustConfig.enableSendingInBackground()
[adjustConfig enableSendingInBackground];
Disable AdServices information reading
SDK v4에서는 false
인수와 함께 [ADJConfig setAllowAdServicesInfoReading]
메서드를 호출하여 Adjust SDK가 AdServices 정보를 읽는 것을 방지할 수 있습니다.
adjustConfig.setAllowAdServicesInfoReading(false)
[adjustConfig setAllowAdServicesInfoReading:NO];
SDK v5에서는 Adjust SDK가 AdServices 정보를 읽는 것을 방지하려면 인수 없이 disableAdServices
메서드를 호출해야 합니다.
adjustConfig.disableAdServices()
[adjustConfig disableAdServices];
Disable IDFA reading
SDK v4에서는 false
인수와 함께 [ADJConfig setAllowIdfaReading]
메서드를 호출하여 Adjust SDK가 기기의 IDFA를 읽는 것을 방지할 수 있습니다.
adjustConfig.setAllowIdfaReading(false)
[adjustConfig setAllowIdfaReading:NO];
SDK v5에서는 Adjust SDK가 기기의 IDFA를 읽는 것을 방지하려면 인수 없이 disableIdfaReading
메서드를 호출해야 합니다.
adjustConfig.disableIdfaReading()
[adjustConfig disableIdfaReading];
Enable cost data in attribution
SDK v4에서는 true
인수와 함께 [ADJConfig setNeedsCost]
메서드를 호출하여 기기의 어트리뷰션 정보에서 비용 데이터를 활성화할 수 있습니다.
adjustConfig.setNeedsCost(true)
[adjustConfig setNeedsCost:YES];
SDK v5에서는 인수 없이 [ADJConfig enableCostDataInAttribution]
메서드를 호출해야 합니다.
adjustConfig.enableCostDataInAttribution()
[adjustConfig enableCostDataInAttribution];
Enable LinkMe
SDK v4에서는 true
인수와 함께 [ADJConfig setLinkMeEnabled]
메서드를 호출하여 Adjust LinkMe를 활성화할 수 있습니다.
adjustConfig.setLinkMeEnabled(true)
[adjustConfig setLinkMeEnabled:YES];
SDK v5에서는 인수 없이 [ADJConfig enableLinkMe]
메서드를 호출해야 합니다.
adjustConfig.enableLinkMe()
[adjustConfig enableLinkMe];
Only read device IDs once
SDK v4에서는 true
인수와 함께 [ADJConfig setReadDeviceInfoOnceEnabled]
메서드를 호출하여 SDK가 기기 식별자를 앱 시작 시 한 번만 읽도록 설정할 수 있습니다.
adjustConfig.setReadDeviceInfoOnceEnabled(true)
[adjustConfig setReadDeviceInfoOnceEnabled:YES];
SDK v5에서는 인수 없이 [ADJConfig enableDeviceIdsReadingOnce]
메서드를 호출해야 합니다.
adjustConfig.enableDeviceIdsReadingOnce()
[adjustConfig enableDeviceIdsReadingOnce];
Offline mode
SDK v4에서는 BOOL
인수와 함께 [Adjust setOfflineMode]
를 호출하여 SDK의 오프라인 모드를 활성화 및 비활성화할 수 있습니다.
Adjust.setOfflineMode(true) // put the SDK in offline modeAdjust.setOfflineMode(false) // put the SDK back in online mode
[Adjust setOfflineMode:YES]; // put the SDK in offline mode[Adjust setOfflineMode:NO]; // put the SDK back in online mode
SDK v5에서는 명확성을 위해 이 기능이 별도의 명령으로 분리되었습니다.
- SDK를 오프라인 모드로 설정하려면
[Adjust switchToOfflineMode]
를 호출합니다. - SDK를 온라인 모드로 전환하려면
[Adjust switchBackToOnlineMode]
를 호출합니다.
Adjust.switchToOfflineMode() // put the SDK in offline modeAdjust.switchBackToOnlineMode() // put the SDK back in online mode
[Adjust switchToOfflineMode]; // put the SDK in offline mode[Adjust switchBackToOnlineMode]; // put the SDK back in online mode
Push tokens
SDK v4에서는 [Adjust setDeviceToken]
메서드를 사용하여 푸시 토큰을 설정할 수 있습니다.
func application(_ app: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { Adjust.setDeviceToken(deviceToken)}
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { [Adjust setDeviceToken:deviceToken];}
이 메서드는 SDK v5에서 이름이 [Adjust setPushToken]
으로 변경되었습니다.
func application(_ app: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken pushToken: Data) { Adjust.setPushToken(pushToken)}
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)pushToken { [Adjust setPushToken:pushToken];}
Event buffering
SDK v4는 이벤트 버퍼링을 지원합니다. 이 기능은 요청 이벤트, 광고 매출, 푸시 토큰 및 기타 정보를 로컬 버퍼에 저장하여 나중에 전송할 수 있게 해줍니다.
Adjust.setEventBufferingEnabled(true)
[adjustConfig setEventBufferingEnabled:YES];
이 설정은 SDK v5에서 제거되었습니다.
Custom user agent string
SDK v4는 사용자 에이전트 문자열과 함께 [AdjustConfig setUserAgent]
를 호출하여 사용자 지정 사용자 에이전트를 설정하는 기능을 지원합니다.
adjustConfig.setUserAgent("user_agent_value")
[adjustConfig setUserAgent:@"user_agent_value"];
이 설정은 SDK v5에서 제거되었습니다.
Set an App Secret
SDK v4 supports setting an App Secret by calling setAppSecret
method on your ADJConfig
instance to sign the SDK traffic with.
adjustConfig.setAppSecret(secretId, info1: info1, info2: info2, info3: info3, info4: info4)
[adjustConfig setAppSecret:secretId info1:info1 info2:info2 info3:info3 info4:info4];
이 설정은 SDK v5에서 제거되었습니다.
Set whether a device is known
SDK v4에서는 [AdjustConfig setIsDeviceKnown];
메서드를 호출하여 알려진 기기인지 여부를 수동으로 SDK에 알릴 수 있습니다.
adjustConfig.setIsDeviceKnown(true)
[adjustConfig setIsDeviceKnown:YES];
이 설정은 SDK v5에서 제거되었습니다.
Delay SDK start
SDK v4는 [AdjustConfig setDelayStart];
를 호출하여 SDK 작동 시작을 최대 10초 간 지연하는 기능을 지원합니다.
adjustConfig.setDelayStart(10)
[adjustConfig setDelayStart:10];
이 설정은 SDK v5에서 제거되었습니다.
Recording features
이 섹션에서는 Adjust로 정보를 전송하는 기능의 변경 사항을 다룹니다.
Session callback parameters
SDK v4에서는 키-값 쌍을 [Adjust addSessionCallbackParameter]
메서드에 전달하여 세션 파라미터를 추가하고, [Adjust removeSessionCallbackParameter]
메서드를 사용하여 개별 파라미터를 제거할 수 있습니다.
Adjust.addSessionCallbackParameter("foo", value: "bar")Adjust.removeSessionCallbackParameter("foo")Adjust.resetSessionCallbackParameters()
[Adjust addSessionCallbackParameter:@"foo" value:@"bar"];[Adjust removeSessionCallbackParameter:@"foo"];[Adjust resetSessionCallbackParameters];
SDK v5에서는 세션 파라미터가 글로벌 파라미터로 이름이 변경되었습니다. 키와 값을 위치 인수로 할당하는 대신 SDK v5는 forKey
인스턴스 메서드를 사용하여 값을 키에 할당합니다.
Adjust.addGlobalCallbackParameter("bar", forKey: "foo")Adjust.removeGlobalCallbackParameter(forKey: "foo")Adjust.removeGlobalCallbackParameters()
[Adjust addGlobalCallbackParameter:@"bar" forKey:@"foo"];[Adjust removeGlobalCallbackParameterForKey:@"foo"];[Adjust removeGlobalCallbackParameters];
Session partner parameters
SDK v4에서는 키-값 쌍을 [Adjust addSessionPartnerParameter]
메서드에 전달하여 파트너 파라미터를 추가하고, [Adjust removeSessionPartnerParameter]
메서드를 사용하여 개별 파라미터를 제거할 수 있습니다.
Adjust.addSessionPartnerParameter("foo", value: "bar")Adjust.removeSessionPartnerParameter("foo")Adjust.resetSessionPartnerParameters()
[Adjust addSessionPartnerParameter:@"foo" value:@"bar"];[Adjust removeSessionPartnerParameter:@"foo"];[Adjust resetSessionPartnerParameters];
SDK v5에서는 세션 파트너 파라미터가 글로벌 파트너 파라미터로 이름이 변경되었습니다. 키와 값을 위치 인수로 할당하는 대신 SDK v5는 forKey
인스턴스 메서드를 사용하여 값을 키에 할당합니다.
Adjust.addGlobalPartnerParameter("bar", forKey: "foo")Adjust.removeGlobalPartnerParameter(forKey: "foo")Adjust.removeGlobalPartnerParameters()
[Adjust addGlobalPartnerParameter:@"bar" forKey:@"foo"];[Adjust removeGlobalPartnerParameterForKey:@"foo"];[Adjust removeGlobalPartnerParameters];
Send subscription information
SDK v4에서는 ADJSubscription
클래스를 사용하여 Adjust에 전송할 구독 정보의 페이로드를 생성할 수 있습니다.
let subscription = ADJSubscription( price: price, currency: currency, transactionId: transactionId, andReceipt: receipt)
ADJSubscription *subscription = [[ADJSubscription alloc] initWithPrice:price currency:currency transactionId:transactionId];
이 클래스는 명확성을 위해 SDK v5에서 이름이 ADJAppStoreSubscription
으로 변경되었습니다.
let subscription = ADJAppStoreSubscription( price: price, currency: currency, transactionId: transactionId)
ADJAppStoreSubscription *subscription = [[ADJAppStoreSubscription alloc] initWithPrice:price currency:currency transactionId:transactionId];
Event deduplication
SDK v4에서는 이벤트 중복 제거가 이벤트 transaction ID
와 결합되어 있으며 최대 10개의 고유 ID로 제한됩니다.
let event = ADJEvent(eventToken: "eventToken")event.setTransactionId("deduplication_id")Adjust.trackEvent(event)
ADJEvent *event = [ADJEvent eventWithEventToken:@"event_token"];[event setTransactionId:@"deduplication_id"];[Adjust trackEvent:event];
SDK v5에서는 이 기능이 transaction ID
와 분리되었습니다. 이벤트 중복 제거를 위해 deduplicationId
라는 새로운 ID 필드가 추가되었습니다. 사용자는 중복 이벤트를 식별하기 위해 목록에 추가할 수 있는 deduplicationId
수의 사용자 지정 한도를 설정할 수 있습니다. 기본 설정에 따라 한도는 10 으로 설정되어 있습니다.
let yourAppToken = "{YourAppToken}"let environment = ADJEnvironmentSandbox as? Stringlet adjustConfig = ADJConfig( appToken: yourAppToken, environment: environment)
adjustConfig.setEventDeduplicationIdsMaxSize(20)Adjust.initSdk(adjustConfig)
let event = ADJEvent(eventToken: "event_token")event.setDeduplicationId("deduplication_id")Adjust.trackEvent(event)
NSString *yourAppToken = @"{YourAppToken}";NSString *environment = ADJEnvironmentSandbox;ADJConfig *adjustConfig = [[ADJConfig alloc] initWithAppToken:yourAppToken environment:environment];
[adjustConfig setEventDeduplicationIdsMaxSize:20];[Adjust initSdk:adjustConfig];
ADJEvent *event = [[ADJEvent alloc] initWithEventToken:kEventToken3];[event setDeduplicationId:@"deduplication_id"];[Adjust trackEvent:event];
AdjustAttribution class
SDK v4에서는 AdjustAttribution
호출에 adid
라는 속성이 있습니다. SDK v5에서는 adid
속성이 AdjustAttribution
클래스에서 제거되었습니다. [Adjust adidWithCompletionHandler]
게터 메서드를 사용하여 기기의 ADID를 조회할 수 있습니다.
Deep linking
Reattribution using deep links
SDK v4에서는 딥링크 정보를 [Adjust appWillOpenUrl]
메서드에 전달할 수 있습니다.
func application( _ app: UIApplication, open incomingURL: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:] ) -> Bool {
// add your code below to handle deep link // (for example, open deep link content) // incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers Adjust.appWillOpen(incomingURL)
return true}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)incomingURL options:(NSDictionary *)options {
// add your code below to handle deep link // (for example, open deep link content) // incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers [Adjust appWillOpenUrl:incomingURL];
return YES;}
SDK v5에서는 명확성을 위해 이름이 [Adjust processDeeplink]
로 변경되었습니다.
func application( _ app: UIApplication, open incomingURL: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:] ) -> Bool {
// add your code below to handle deep link // (for example, open deep link content) // incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers Adjust.processDeeplink(ADJDeeplink(deeplink: incomingURL))
return true}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)incomingURL options:(NSDictionary *)options {
// add your code below to handle deep link // (for example, open deep link content) // incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers [Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:incomingURL]];
return YES;}
Deferred deep linking callback
SDK v4에서는 adjustDeepLinkResponse
메서드를 호출하여 디퍼드 딥링크 콜백을 처리할 수 있습니다.
func adjustDeeplinkResponse(_ deeplink: URL?) -> Bool { print("Deferred deep link callback called!") print(String(format: "Deferred deep link URL: %@", deeplink.absoluteString))
// Allow Adjust SDK to open received deferred deep link. // If you don't want it to open it, return false instead. return true}
- (BOOL)adjustDeeplinkResponse:(NSURL *)deeplink { NSLog(@"Deferred deep link callback called!"); NSLog(@"Deferred deep link URL: %@", [deeplink absoluteString]);
// Allow Adjust SDK to open received deferred deep link. // If you don't want it to open it, return NO; instead. return YES;}
SDK v5에서는 명확성을 위해 이 메서드의 이름이 adjustDeferredDeeplinkReceived
로 변경되었습니다. 모든 인수는 동일합니다.
func adjustDeferredDeeplinkReceived(_ deeplink: URL?) -> Bool { print("Deferred deep link callback called!") print(String(format: "Deferred deep link URL: %@", deeplink.absoluteString))
// Allow Adjust SDK to open received deferred deep link. // If you don't want it to open it, return false instead. return true}
- (BOOL)adjustDeferredDeeplinkReceived:(NSURL *)deeplink { NSLog(@"Deferred deep link callback called!"); NSLog(@"Deferred deep link URL: %@", [deeplink absoluteString]);
// Allow Adjust SDK to open received deferred deep link. // If you don't want it to open it, return NO; instead. return YES;}
Privacy features
이 섹션에서는 Adjust SDK에서 프라이버시 기능의 변경 사항을 다룹니다.
COPPA compliance
SDK v4에서는 부울 값과 함께 ADJConfig
인스턴스의 setCoppaCompliantEnabled
메서드를 호출하여 앱을 COPPA 준수로 표시할 수 있습니다.
adjustConfig.setCoppaCompliantEnabled(true)
[adjustConfig setCoppaCompliantEnabled:YES];
SDK v5에서는 명확성을 위해 이 메서드의 이름이 enableCoppaCompliance
로 변경되었습니다. 이 메서드는 인수를 사용하지 않습니다.
adjustConfig?.enableCoppaCompliance()
[adjustConfig enableCoppaCompliance];
Send ad revenue from a specific source
SDK v4에서는 광고 매출 소스가 ADJConfig
클래스의 상수로 정의됩니다. SDK v5에서는 광고 매출 소스를 문자열로 전달해야 합니다.
let adRevenue = ADJAdRevenue(source: ADJAdRevenueSourceAppLovinMAX); //v4let adRevenue = ADJAdRevenue(source: "applovin_max_sdk") //v5
ADJAdRevenue *revenue = [[ADJAdRevenue alloc] initWithSource:ADJAdRevenueSourceAppLovinMAX]; // v4ADJAdRevenue *adRevenue = [[ADJAdRevenue alloc] initWithSource:@"applovin_max_sdk"]; // v5
v4 | v5 |
---|---|
ADJAdRevenueSourceAppLovinMAX | "applovin_max_sdk" |
ADJAdRevenueSourceAdMob | "admob_sdk" |
ADJAdRevenueSourceIronSource | "ironsource_sdk" |
ADJAdRevenueSourceAdMost | "admost_sdk" |
ADJAdRevenueSourceUnity | "unity_sdk" |
ADJAdRevenueSourceHeliumChartboost | "helium_chartboost_sdk" |
ADJAdRevenueSourceADX | "adx_sdk" |
ADJAdRevenueSourcePublisher | "publisher_sdk" |
ADJAdRevenueSourceTradplus | "tradplus_sdk" |
ADJAdRevenueSourceTopOn | "topon_sdk" |
ADJAdRevenueSourceMopub | "mopub" |
Set data residency and URL strategy
SDK v4에서는 URL 전략 및 데이터 레지던시 도메인이 ADJConfig
클래스의 상수로 정의됩니다.
[adjustConfig setUrlStrategy:ADJDataResidencyEU];
SDK v5에서는 선택한 도메인을 배열로 전달해야 합니다. 또한 다음 항목을 설정할 수 있습니다.
useSubdomains
(BOOL
): 도메인을 Adjust 도메인으로 취급할지 여부.true
인 경우, SDK는 도메인의 접두사로 Adjust에 특화된 하위 도메인을 사용합니다.false
인 경우 SDK는 접두사를 추가하지 않고 제공된 도메인을 그대로 사용합니다.isDataResidency
(BOOL
): 도메인을 데이터 레지던시에 사용해야 하는지 여부.
NSArray *domain = [];[adjustConfig setUrlStrategy:domain useSubdomains:YES isDataResidency:YES];
아래 표를 보고 SDK v5에서 URL 전략을 구성하는 방법을 확인하시기 바랍니다.
v4 | v5 - 메인 및 폴백 도메인 | v5 - 하위 도메인 사용 | v5 - 데이터 레지던시 여부 |
---|---|---|---|
ADJDataResidencyEU | "eu.adjust.com" | true | true |
ADJDataResidencyTR | "tr.adjust.com" | true | true |
ADJDataResidencyUS | "us.adjust.com" | true | true |
ADJUrlStrategyChina | "adjust.world" , "adjust.com" | true | false |
ADJUrlStrategyCn | "adjust.cn" , "adjust.com" | true | false |
ADJUrlStrategyCnOnly | "adjust.cn" | true | false |
ADJUrlStrategyIndia | "adjust.net.in" , "adjust.com" | true | false |
Examples
let domain = ["adjust.net.in", "adjust.com"]adjustConfig.setUrlStrategy(domain, useSubdomains: true, isDataResidency: false)
let domain = ["adjust.world", "adjust.com"]adjustConfig.setUrlStrategy(domain, useSubdomains: true, isDataResidency: false)
let domain = ["adjust.cn"]adjustConfig.setUrlStrategy(domain, useSubdomains: true, isDataResidency: false)
let domain = ["eu.adjust.com"]adjustConfig.setUrlStrategy(domain, useSubdomains: true, isDataResidency: true)
let domain = ["tr.adjust.com"]adjustConfig.setUrlStrategy(domain, useSubdomains: true, isDataResidency: true)
let domain = ["us.adjust.com"]adjustConfig.setUrlStrategy(domain, useSubdomains: true, isDataResidency: true)
NSArray *domain = [[NSArray alloc] initWithObjects:@"adjust.net.in", @"adjust.com", nil];[adjustConfig setUrlStrategy:domain useSubdomains:YES isDataResidency:NO];
NSArray *domain = [[NSArray alloc] initWithObjects:@"adjust.world", @"adjust.com", nil];[adjustConfig setUrlStrategy:domain useSubdomains:YES isDataResidency:NO];
NSArray *domain = [[NSArray alloc] initWithObjects:@"adjust.cn", nil];[adjustConfig setUrlStrategy:domain useSubdomains:YES isDataResidency:NO];
NSArray *domain = [[NSArray alloc] initWithObjects:@"eu.adjust.com", nil];[adjustConfig setUrlStrategy:domain useSubdomains:YES isDataResidency:YES];
NSArray *domain = [[NSArray alloc] initWithObjects:@"tr.adjust.com", nil];[adjustConfig setUrlStrategy:domain useSubdomains:YES isDataResidency:YES];
NSArray *domain = [[NSArray alloc] initWithObjects:@"us.adjust.com", nil];[adjustConfig setUrlStrategy:domain useSubdomains:YES isDataResidency:YES];
Disable third party sharing globally
SDK v4에서는 Adjust.disableThirdPartySharing()
메서드를 호출하여 전 세계에서 서드파티와의 정보 공유를 비활성화할 수 있습니다.
Adjust.disableThirdPartySharing()
[Adjust disableThirdPartySharing];
이 기능은 SDK v5에서 제거되었습니다. SDK v5에서는 [Adjust trackThirdPartySharing]
메서드를 사용하여 서드파티 공유를 활성화 또는 비활성화합니다.
let adjustThirdPartySharing = ADJThirdPartySharing.initWithIsEnabled(false)Adjust.trackThirdPartySharing(adjustThirdPartySharing)
ADJThirdPartySharing *adjustThirdPartySharing = [[ADJThirdPartySharing alloc] initWithIsEnabled:@NO];[Adjust trackThirdPartySharing:adjustThirdPartySharing];
SKAdNetwork and ATT
이 섹션에서는 SDK v5의 SKAdNetwork 및 App Tracking Transparency(ATT) 기능의 변경 사항을 다룹니다.
Disable SKAdNetwork communication
SDK v4에서는 [ADJConfig deactivateSKAdNetworkHandling]
메서드를 호출하여 SDK가 SKAdNetwork와 통신하는 것을 방지할 수 있습니다.
let yourAppToken = "{YourAppToken}"let environment = ADJEnvironmentSandbox as? Stringlet adjustConfig = ADJConfig( appToken: yourAppToken, environment: environment)
adjustConfig.deactivateSKAdNetworkHandling()
ADJConfig *adjustConfig = [[ADJConfig alloc] initWithAppToken:@"{YourAppToken}" environment:ADJEnvironmentSandbox];
[adjustConfig deactivateSKAdNetworkHandling];
SDK v5에서는 명확성을 위해 이 메서드의 이름이 [ADJConfig disableSkanAttribution]
로 변경되었습니다.
let yourAppToken = "{YourAppToken}"let environment = ADJEnvironmentSandbox as? Stringlet adjustConfig = ADJConfig( appToken: yourAppToken, environment: environment)
adjustConfig.disableSkanAttribution()
ADJConfig *adjustConfig = [[ADJConfig alloc] initWithAppToken:@"{YourAppToken}" environment:ADJEnvironmentSandbox];
[adjustConfig disableSkanAttribution];
Check for authorization status change
SDK v4에서는 [Adjust checkForNewAttStatus]
메서드를 사용하여 SDK가 사용자의 ATT 상태를 읽고 해당 정보를 Adjust 서버에 전달하도록 설정할 수 있습니다.
Adjust.checkForNewAttStatus()
[Adjust checkForNewAttStatus];
이 메서드는 SDK v5에서 제거되었습니다.
Listen for conversion value updates
SDK v4에서는 adjustConversionValueUpdated
메서드를 사용하여 SKAdNetwork 업데이트를 수신할 수 있습니다.
func adjustConversionValueUpdated(_ conversionValue: NSNumber) { print("Conversion value updated callback called!") print(String(format: "Conversion value: %@", conversionValue))}
func adjustConversionValueUpdated(_ fineValue: NSNumber, coarseValue: String, lockWindow: NSNumber) { print("Conversion value updated callback called!") print(String(format: "Conversion value: %@", fineValue)) print(String(format: "Coarse value: %@", coarseValue)) print(String(format: "Lock window: %@", lockWindow))}
- (void)adjustConversionValueUpdated:(NSNumber *)conversionValue { NSLog(@"Conversion value updated callback called!"); NSLog(@"Conversion value: %@", conversionValue);}
- (void)adjustConversionValueUpdated:(NSNumber *)fineValue coarseValue:(NSString *)coarseValue lockWindow:(NSNumber *)lockWindow { NSLog(@"Conversion value updated callback called!"); NSLog(@"Conversion value: %@", conversionValue); NSLog(@"Coarse value: %@", coarseValue); NSLog(@"Lock window: %@", lockWindow);}
SDK v5에서는 이 두 메서드가 단일 adjustSkanUpdatedWithConversionData
메서드로 교체되었으며 이 메서드는 유형이 지정되지 않은 딕셔너리를 반환합니다. 현재 지원되는 키는 다음과 같습니다.
conversion_value
: The updated conversion value.coarse_value
: The updated coarse conversion valuelock_window
: Whether to send the postback before the conversion window endserror
: Any error message returned by the update.
func adjustSkanUpdated(withConversionData data: [String: String]) { print("Conversion value updated callback called!") print(String(format: "Conversion value dictionary: \n%@", data.description))}
- (void)adjustSkanUpdatedWithConversionData:(NSDictionary<NSString *, NSString *> *)data { NSLog(@"Conversion value updated callback called!"); NSLog(@"Conversion value dictionary: \n%@", data.description);}
Update conversion values
SDK v4에서는 updateConversionValue
메서드를 사용하여 Adjust에 업데이트된 전환값을 전송할 수 있습니다. 이 메서드는 Apple의 지원 종료된 updateConversionValue
메서드를 래핑하며 SDK v5에서는 제거되었습니다.
SDK v5에서는 다음 인수와 함께 [Adjust updateSkanConversionValue]
메서드를 사용하여 전환값을 업데이트할 수 있습니다.
conversionValue
(NSInteger
): 업데이트된 전환값coarseValue
(NSString
): 업데이트된 coarse 전환값lockWindow
(BOOL
): 전환값 윈도우가 종료되기 전에 포스트백을 전송할지 여부
Adjust.updateSkanConversionValue( 1, coarseValue: SKAdNetwork.CoarseConversionValue.low, lockWindow: false) { error in if let error { print(String(format: "An error occurred during completion: %@", error)) }}
[Adjust updateSkanConversionValue:1 coarseValue:SKAdNetworkCoarseConversionValueLow lockWindow:NO withCompletionHandler:^(NSError *_Nullable error) { NSLog(@"An error occurred during completion: %@", error);}];
App Tracking Transparency authorization wrapper
SDK v4에서는 [Adjust requestTrackingAuthorizationWithCompletionHandler]
메서드를 사용하여 사용자의 ATT 승인 상태 변경 사항을 처리할 수 있습니다.
Adjust.requestTrackingAuthorization() { status in switch status { case 0: // ATTrackingManagerAuthorizationStatusNotDetermined case break case 1: // ATTrackingManagerAuthorizationStatusRestricted case break case 2: // ATTrackingManagerAuthorizationStatusDenied case break case 3: // ATTrackingManagerAuthorizationStatusAuthorized case break default: break }}
[Adjust requestTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) { switch (status) { case 0: // ATTrackingManagerAuthorizationStatusNotDetermined case break; case 1: // ATTrackingManagerAuthorizationStatusRestricted case break; case 2: // ATTrackingManagerAuthorizationStatusDenied case break; case 3: // ATTrackingManagerAuthorizationStatusAuthorized case break; }}];
명확성을 위해 SDK v5에서 이름이 [Adjust requestAppTrackingAuthorizationWithCompletionHandler]
으로 변경되었습니다.
Adjust.requestAppTrackingAuthorization { status in switch status { case 0: // ATTrackingManagerAuthorizationStatusNotDetermined case break case 1: // ATTrackingManagerAuthorizationStatusRestricted case break case 2: // ATTrackingManagerAuthorizationStatusDenied case break case 3: // ATTrackingManagerAuthorizationStatusAuthorized case break default: break }}
[Adjust requestAppTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) { switch (status) { case 0: // ATTrackingManagerAuthorizationStatusNotDetermined case break; case 1: // ATTrackingManagerAuthorizationStatusRestricted case break; case 2: // ATTrackingManagerAuthorizationStatusDenied case break; case 3: // ATTrackingManagerAuthorizationStatusAuthorized case break; }}];
Get device information
SDK v4에서는 모든 기기 정보 게터 메서드가 동기적으로 실행됩니다. SDK v5에서는 이러한 메서드가 비동기적으로 실행되도록 변경되었습니다. 비동기 프로세스가 완료되면 콜백 기능을 추가하여 해당 정보를 처리할 수 있습니다.
Adjust.adid() { adid in // add your completion handler};
Adjust.idfa() { idfa in // add your completion handler};
Adjust.idfv() { idfv in // add your completion handler};
Adjust.sdkVersion() { sdkVersion in // add your completion handler};
Adjust.isEnabled() { isEnabled in // add your completion handler};
Adjust.attribution() { attribution in // add your completion handler}
[Adjust adidWithCompletionHandler:^(NSString * _Nullable adid) { // add your completion handler}];
[Adjust idfaWithCompletionHandler:^(NSString * _Nullable idfa) { // add your completion handler}];
[Adjust idfvWithCompletionHandler:^(NSString * _Nullable idfv) { // add your completion handler}];
[Adjust sdkVersionWithCompletionHandler:^(NSString * _Nullable sdkVersion) { // add your completion handler}];
[Adjust isEnabledWithCompletionHandler:^(BOOL isEnabled) { // add your completion handler}];
[Adjust attributionWithCompletionHandler:^(ADJAttribution * _Nullable attribution) { // add your completion handler}
Plugins
Adjust SDK는 기능 확장을 위한 플러그인을 지원합니다. 이 섹션에서는 SDK v5에서 플러그인의 변경 사항을 다룹니다.
Removed plugins
다음 플러그인은 SDK v5에서 제거되었습니다.
- Criteo
- Trademob
- Sociomantic