From e0d97996e082265a1325c3009efd6dd3c5c6cf29 Mon Sep 17 00:00:00 2001 From: Tomoko Goto <42029374+tomokogoto1@users.noreply.github.com> Date: Tue, 5 Jan 2021 17:18:36 +0100 Subject: [PATCH 01/42] Update README.md --- doc/japanese/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/japanese/README.md b/doc/japanese/README.md index c9242521f..9b894c234 100644 --- a/doc/japanese/README.md +++ b/doc/japanese/README.md @@ -707,7 +707,7 @@ NSString *idfa = [Adjust idfa]; } ``` -#### プレインストールのトラッカー +#### プリインストールトラッカー すでにアプリをインストールしたことのあるユーザーをadjust SDKを使って識別したい場合は、次の手順で設定を行ってください。 @@ -773,7 +773,7 @@ iOS 8以前の端末でのディープリンキングはカスタムURLスキー これで、iOS 8以前の端末へのディープリンクの設定は完了です。 -##### iOS 9以前でのディープリンキング +##### iOS 9以降でのディープリンキング iOS 9以降の端末へディープリンクを対応させるためには、Appleのユニバーサルリンクを有効化させる必要があります。 ユニバーサルリンクについて、それらの設定については[こちら][universal-links]をご確認ください。 From 6adf90dfb7091269a26400850dac7292b62ea883 Mon Sep 17 00:00:00 2001 From: rabc Date: Wed, 18 Nov 2020 21:31:39 +0100 Subject: [PATCH 02/42] Add AdServices attribution token --- Adjust/ADJAdditions/UIDevice+ADJAdditions.m | 47 ++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m index 29a8aff6d..fa4bb2b28 100644 --- a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m +++ b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m @@ -349,9 +349,12 @@ - (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_que } [logger debug:@"iAd framework successfully found in user's app"]; + + NSString *adSrvToken = [self adServicesAttributionToken]; BOOL iAdInformationAvailable = [self setiAdWithDetails:activityHandler adcClientSharedInstance:ADClientSharedClientInstance + adServicesToken:adSrvToken queue:queue]; if (!iAdInformationAvailable) { @@ -362,8 +365,44 @@ - (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_que #endif } +- (NSString *)adServicesAttributionToken { + id logger = [ADJAdjustFactory logger]; + + // [AAAttribution attributionTokenWithError:...] + Class attributionClass = NSClassFromString(@"AAAttribution"); + if (attributionClass == nil) { + [logger warn:@"AdServices framework not found in user's app (AAAttribution not found)"]; + return nil; + } + + SEL attributionTokenSelector = NSSelectorFromString(@"attributionTokenWithError:"); + if (![attributionClass respondsToSelector:attributionTokenSelector]) { + return nil; + } + + NSMethodSignature *attributionTokenMethodSignature = [attributionClass methodSignatureForSelector:attributionTokenSelector]; + NSInvocation *tokenInvocation = [NSInvocation invocationWithMethodSignature:attributionTokenMethodSignature]; + [tokenInvocation setSelector:attributionTokenSelector]; + [tokenInvocation setTarget:attributionClass]; + + NSError *error = nil; + [tokenInvocation setArgument:&error atIndex:2]; + [tokenInvocation invoke]; + + if (error) { + [logger error:@"Error while retrieving AdServices attribution token: %@", error]; + return nil; + } + + NSString *token = nil; + [tokenInvocation getReturnValue:&token]; + + return token; +} + - (BOOL)setiAdWithDetails:(ADJActivityHandler *)activityHandler adcClientSharedInstance:(id)ADClientSharedClientInstance + adServicesToken:(NSString *)adServicesToken queue:(dispatch_queue_t)queue { SEL iAdDetailsSelector = NSSelectorFromString(@"requestAttributionDetailsWithBlock:"); if (![ADClientSharedClientInstance respondsToSelector:iAdDetailsSelector]) { @@ -386,7 +425,13 @@ - (BOOL)setiAdWithDetails:(ADJActivityHandler *)activityHandler } } - [activityHandler setAttributionDetails:attributionDetails + NSMutableDictionary *mutableAttributionDetails = [attributionDetails mutableCopy]; + + if (adServicesToken) { + [mutableAttributionDetails setObject:adServicesToken forKey:@"adServicesAttributionToken"]; + } + + [activityHandler setAttributionDetails:mutableAttributionDetails error:error]; }]; #pragma clang diagnostic pop From 7715fb8d7446bc312653abbf55771e5ef2f8118f Mon Sep 17 00:00:00 2001 From: rabc Date: Fri, 20 Nov 2020 13:18:39 +0100 Subject: [PATCH 03/42] Use error pointer --- Adjust/ADJAdditions/UIDevice+ADJAdditions.m | 5 +++-- .../AdjustExample-Swift.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m index fa4bb2b28..ceef30657 100644 --- a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m +++ b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m @@ -385,8 +385,9 @@ - (NSString *)adServicesAttributionToken { [tokenInvocation setSelector:attributionTokenSelector]; [tokenInvocation setTarget:attributionClass]; - NSError *error = nil; - [tokenInvocation setArgument:&error atIndex:2]; + __autoreleasing NSError *error; + __autoreleasing NSError **errorPointer = &error; + [tokenInvocation setArgument:&errorPointer atIndex:2]; [tokenInvocation invoke]; if (error) { diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj index 7610e048e..02597c8e9 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj @@ -51,6 +51,7 @@ 9DFB04C41D745B28006D48FC /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DFB04C31D745B28006D48FC /* AdSupport.framework */; }; D71BFB7024CAD74A00878F3E /* AppTrackingTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D71BFB6F24CAD74A00878F3E /* AppTrackingTransparency.framework */; }; D731B41524DAAB5C0036F619 /* LoadProductController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D731B41424DAAB5C0036F619 /* LoadProductController.swift */; }; + D758F83A2567BD3700F885BD /* AdServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D758F8392567BD3700F885BD /* AdServices.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -137,6 +138,7 @@ 9DFB04C31D745B28006D48FC /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; D71BFB6F24CAD74A00878F3E /* AppTrackingTransparency.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppTrackingTransparency.framework; path = System/Library/Frameworks/AppTrackingTransparency.framework; sourceTree = SDKROOT; }; D731B41424DAAB5C0036F619 /* LoadProductController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadProductController.swift; sourceTree = ""; }; + D758F8392567BD3700F885BD /* AdServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdServices.framework; path = System/Library/Frameworks/AdServices.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -145,6 +147,7 @@ buildActionMask = 2147483647; files = ( D71BFB7024CAD74A00878F3E /* AppTrackingTransparency.framework in Frameworks */, + D758F83A2567BD3700F885BD /* AdServices.framework in Frameworks */, 9DFB04C21D745B22006D48FC /* iAd.framework in Frameworks */, 9DFB04C41D745B28006D48FC /* AdSupport.framework in Frameworks */, ); @@ -286,6 +289,7 @@ D71BFB6E24CAD74A00878F3E /* Frameworks */ = { isa = PBXGroup; children = ( + D758F8392567BD3700F885BD /* AdServices.framework */, D71BFB6F24CAD74A00878F3E /* AppTrackingTransparency.framework */, ); name = Frameworks; From d459d7ea8e9c4255b52d76e60d1f875de8de48e5 Mon Sep 17 00:00:00 2001 From: rabc Date: Fri, 20 Nov 2020 14:13:09 +0100 Subject: [PATCH 04/42] Send as a separate sdk_click package --- Adjust/ADJActivityHandler.h | 1 + Adjust/ADJActivityHandler.m | 19 +++++++++++++++- Adjust/ADJAdditions/UIDevice+ADJAdditions.h | 1 + Adjust/ADJAdditions/UIDevice+ADJAdditions.m | 25 ++++++++++----------- 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/Adjust/ADJActivityHandler.h b/Adjust/ADJActivityHandler.h index c22609d8d..bbf8a1f75 100644 --- a/Adjust/ADJActivityHandler.h +++ b/Adjust/ADJActivityHandler.h @@ -86,6 +86,7 @@ - (BOOL)updateAttributionI:(id)selfI attribution:(ADJAttribution *)attribution; - (void)setAttributionDetails:(NSDictionary *)attributionDetails error:(NSError *)error; +- (void)setAdServicesAttributionToken:(NSString *)token; - (void)setOfflineMode:(BOOL)offline; - (void)sendFirstPackages; diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 69569dcea..203e058f4 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -23,6 +23,7 @@ #import "ADJUrlStrategy.h" NSString * const ADJiAdPackageKey = @"iad3"; +NSString * const ADJAdServicesPackageKey = @"adServices"; typedef void (^activityHandlerBlockI)(ADJActivityHandler * activityHandler); @@ -400,6 +401,9 @@ - (void)setTrackingStateOptedOut { }]; } +- (void)setAdServicesAttributionToken:(NSString *)token { + [self sendAppleAdClickPackage:self attributionDetails:@{@"adServicesAttributionToken": token} isAdServices:YES]; +} - (void)setAttributionDetails:(NSDictionary *)attributionDetails error:(NSError *)error @@ -516,7 +520,13 @@ - (void)saveiAdErrorCode:(NSInteger)code { } - (void)sendIad3ClickPackage:(ADJActivityHandler *)selfI + attributionDetails:(NSDictionary *)attributionDetails { + [self sendAppleAdClickPackage:selfI attributionDetails:attributionDetails isAdServices:NO]; +} + +- (void)sendAppleAdClickPackage:(ADJActivityHandler *)selfI attributionDetails:(NSDictionary *)attributionDetails + isAdServices:(BOOL)isAdServices { if (![selfI isEnabledI:selfI]) { return; @@ -545,7 +555,8 @@ - (void)sendIad3ClickPackage:(ADJActivityHandler *)selfI clickBuilder.attributionDetails = attributionDetails; - ADJActivityPackage *clickPackage = [clickBuilder buildClickPackage:ADJiAdPackageKey]; + NSString *source = (isAdServices ? ADJAdServicesPackageKey : ADJiAdPackageKey); + ADJActivityPackage *clickPackage = [clickBuilder buildClickPackage:source]; [selfI.sdkClickHandler sendSdkClick:clickPackage]; } @@ -902,6 +913,8 @@ - (void)initI:(ADJActivityHandler *)selfI if (selfI.adjustConfig.allowiAdInfoReading == YES) { [selfI checkForiAdI:selfI]; } + + [selfI checkForAdServicesAttribution:selfI]; [selfI.trackingStatusManager checkForNewAttStatus]; @@ -1500,6 +1513,10 @@ - (void)checkForiAdI:(ADJActivityHandler *)selfI { [[UIDevice currentDevice] adjCheckForiAd:selfI queue:selfI.internalQueue]; } +- (void)checkForAdServicesAttribution:(ADJActivityHandler *)selfI { + [[UIDevice currentDevice] adjCheckForAdSericesAttribution:selfI]; +} + - (void)setOfflineModeI:(ADJActivityHandler *)selfI offline:(BOOL)offline { // compare with the internal state diff --git a/Adjust/ADJAdditions/UIDevice+ADJAdditions.h b/Adjust/ADJAdditions/UIDevice+ADJAdditions.h index f47fbb56b..5c2134441 100644 --- a/Adjust/ADJAdditions/UIDevice+ADJAdditions.h +++ b/Adjust/ADJAdditions/UIDevice+ADJAdditions.h @@ -23,6 +23,7 @@ - (NSString *)adjVendorId; - (NSString *)adjDeviceId:(ADJDeviceInfo *)deviceInfo; - (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_queue_t)queue; +- (void)adjCheckForAdSericesAttribution:(ADJActivityHandler *)activityHandler; - (void)requestTrackingAuthorizationWithCompletionHandler:(void (^)(NSUInteger status))completion; diff --git a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m index ceef30657..af372f641 100644 --- a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m +++ b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m @@ -319,6 +319,14 @@ - (NSString *)adjDeviceId:(ADJDeviceInfo *)deviceInfo { return mParameter; } +- (void)adjCheckForAdSericesAttribution:(ADJActivityHandler *)activityHandler { + NSString *attributionToken = [self adServicesAttributionToken]; + + if (attributionToken) { + [activityHandler setAdServicesAttributionToken:attributionToken]; + } +} + - (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_queue_t)queue { // if no tries for iad v3 left, stop trying id logger = [ADJAdjustFactory logger]; @@ -350,11 +358,8 @@ - (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_que [logger debug:@"iAd framework successfully found in user's app"]; - NSString *adSrvToken = [self adServicesAttributionToken]; - BOOL iAdInformationAvailable = [self setiAdWithDetails:activityHandler adcClientSharedInstance:ADClientSharedClientInstance - adServicesToken:adSrvToken queue:queue]; if (!iAdInformationAvailable) { @@ -395,15 +400,15 @@ - (NSString *)adServicesAttributionToken { return nil; } - NSString *token = nil; - [tokenInvocation getReturnValue:&token]; + NSString * __unsafe_unretained tmpToken = nil; + [tokenInvocation getReturnValue:&tmpToken]; + NSString *token = tmpToken; return token; } - (BOOL)setiAdWithDetails:(ADJActivityHandler *)activityHandler adcClientSharedInstance:(id)ADClientSharedClientInstance - adServicesToken:(NSString *)adServicesToken queue:(dispatch_queue_t)queue { SEL iAdDetailsSelector = NSSelectorFromString(@"requestAttributionDetailsWithBlock:"); if (![ADClientSharedClientInstance respondsToSelector:iAdDetailsSelector]) { @@ -426,13 +431,7 @@ - (BOOL)setiAdWithDetails:(ADJActivityHandler *)activityHandler } } - NSMutableDictionary *mutableAttributionDetails = [attributionDetails mutableCopy]; - - if (adServicesToken) { - [mutableAttributionDetails setObject:adServicesToken forKey:@"adServicesAttributionToken"]; - } - - [activityHandler setAttributionDetails:mutableAttributionDetails + [activityHandler setAttributionDetails:attributionDetails error:error]; }]; #pragma clang diagnostic pop From 771b8f08a5c171d6591fabbfd0a03bc7c7fb88f6 Mon Sep 17 00:00:00 2001 From: ugi Date: Thu, 19 Nov 2020 14:39:42 +0100 Subject: [PATCH 05/42] clean log messages a bit --- Adjust/ADJRequestHandler.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adjust/ADJRequestHandler.m b/Adjust/ADJRequestHandler.m index c71e6b6c1..c29431937 100644 --- a/Adjust/ADJRequestHandler.m +++ b/Adjust/ADJRequestHandler.m @@ -345,7 +345,7 @@ - (void)handleResponseWithData:(NSData *)data NSString *urlString = [NSString stringWithFormat:@"%@%@%@", urlHostString, self.urlStrategy.extraPath, path]; - [self.logger verbose:@"Sending request to endpoint: %@", urlString]; + [self.logger verbose:@"Makig request to endpoint: %@", urlString]; NSURL *url = [NSURL URLWithString:urlString]; //NSURL *url = [baseUrl URLByAppendingPathComponent:path]; From 64e4576be5523fc063324998bd8ca2d49b7ff1b5 Mon Sep 17 00:00:00 2001 From: rabc Date: Mon, 11 Jan 2021 15:54:26 +0100 Subject: [PATCH 06/42] Check Ad Services on new session --- Adjust/ADJActivityHandler.m | 22 ++++++++++++------- Adjust/ADJAdditions/UIDevice+ADJAdditions.h | 2 +- Adjust/ADJAdditions/UIDevice+ADJAdditions.m | 2 +- .../ViewControllerSwift.swift | 2 ++ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 203e058f4..15a01fae4 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -23,7 +23,7 @@ #import "ADJUrlStrategy.h" NSString * const ADJiAdPackageKey = @"iad3"; -NSString * const ADJAdServicesPackageKey = @"adServices"; +NSString * const ADJAdServicesPackageKey = @"apple_ads"; typedef void (^activityHandlerBlockI)(ADJActivityHandler * activityHandler); @@ -402,7 +402,7 @@ - (void)setTrackingStateOptedOut { } - (void)setAdServicesAttributionToken:(NSString *)token { - [self sendAppleAdClickPackage:self attributionDetails:@{@"adServicesAttributionToken": token} isAdServices:YES]; + [self sendAppleAdClickPackage:self attributionDetails:@{@"attribution_token": token} isAdServices:YES]; } - (void)setAttributionDetails:(NSDictionary *)attributionDetails @@ -555,9 +555,13 @@ - (void)sendAppleAdClickPackage:(ADJActivityHandler *)selfI clickBuilder.attributionDetails = attributionDetails; - NSString *source = (isAdServices ? ADJAdServicesPackageKey : ADJiAdPackageKey); - ADJActivityPackage *clickPackage = [clickBuilder buildClickPackage:source]; - [selfI.sdkClickHandler sendSdkClick:clickPackage]; + if (isAdServices) { + ADJActivityPackage *infoPackage = [clickBuilder buildInfoPackage:ADJAdServicesPackageKey]; + [selfI.packageHandler addPackage:infoPackage]; + } else { + ADJActivityPackage *clickPackage = [clickBuilder buildClickPackage:ADJiAdPackageKey]; + [selfI.sdkClickHandler sendSdkClick:clickPackage]; + } } - (void)saveAttributionDetailsI:(ADJActivityHandler *)selfI @@ -913,8 +917,6 @@ - (void)initI:(ADJActivityHandler *)selfI if (selfI.adjustConfig.allowiAdInfoReading == YES) { [selfI checkForiAdI:selfI]; } - - [selfI checkForAdServicesAttribution:selfI]; [selfI.trackingStatusManager checkForNewAttStatus]; @@ -1037,6 +1039,8 @@ - (void)trackNewSessionI:(double)now withActivityHandler:(ADJActivityHandler *)s if (selfI.activityState.isGdprForgotten) { return; } + + [selfI checkForAdServicesAttribution:selfI]; double lastInterval = now - selfI.activityState.lastActivity; [ADJUtil launchSynchronisedWithObject:[ADJActivityState class] @@ -1514,7 +1518,9 @@ - (void)checkForiAdI:(ADJActivityHandler *)selfI { } - (void)checkForAdServicesAttribution:(ADJActivityHandler *)selfI { - [[UIDevice currentDevice] adjCheckForAdSericesAttribution:selfI]; + if (selfI.attribution == nil) { + [[UIDevice currentDevice] adjCheckForAdServicesAttribution:selfI]; + } } - (void)setOfflineModeI:(ADJActivityHandler *)selfI diff --git a/Adjust/ADJAdditions/UIDevice+ADJAdditions.h b/Adjust/ADJAdditions/UIDevice+ADJAdditions.h index 5c2134441..2b3c6f70f 100644 --- a/Adjust/ADJAdditions/UIDevice+ADJAdditions.h +++ b/Adjust/ADJAdditions/UIDevice+ADJAdditions.h @@ -23,7 +23,7 @@ - (NSString *)adjVendorId; - (NSString *)adjDeviceId:(ADJDeviceInfo *)deviceInfo; - (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_queue_t)queue; -- (void)adjCheckForAdSericesAttribution:(ADJActivityHandler *)activityHandler; +- (void)adjCheckForAdServicesAttribution:(ADJActivityHandler *)activityHandler; - (void)requestTrackingAuthorizationWithCompletionHandler:(void (^)(NSUInteger status))completion; diff --git a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m index af372f641..470a4739f 100644 --- a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m +++ b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m @@ -319,7 +319,7 @@ - (NSString *)adjDeviceId:(ADJDeviceInfo *)deviceInfo { return mParameter; } -- (void)adjCheckForAdSericesAttribution:(ADJActivityHandler *)activityHandler { +- (void)adjCheckForAdServicesAttribution:(ADJActivityHandler *)activityHandler { NSString *attributionToken = [self adServicesAttributionToken]; if (attributionToken) { diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift b/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift index 610a43433..bd70f9e1a 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift +++ b/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift @@ -31,6 +31,8 @@ class ViewControllerSwift: UIViewController { override func viewDidLoad() { super.viewDidLoad() + + } override func didReceiveMemoryWarning() { From fc5dc732e922204d38635ab225814cfabcdf9ee0 Mon Sep 17 00:00:00 2001 From: rabc Date: Tue, 12 Jan 2021 10:54:32 +0100 Subject: [PATCH 07/42] Check error and retry --- Adjust/ADJActivityHandler.h | 3 +- Adjust/ADJActivityHandler.m | 26 ++++++- Adjust/ADJAdditions/UIDevice+ADJAdditions.m | 27 +++---- .../xcschemes/AdjustExample-Swift.xcscheme | 78 +++++++++++++++++++ 4 files changed, 118 insertions(+), 16 deletions(-) create mode 100644 examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/xcshareddata/xcschemes/AdjustExample-Swift.xcscheme diff --git a/Adjust/ADJActivityHandler.h b/Adjust/ADJActivityHandler.h index bbf8a1f75..0ceacbb1c 100644 --- a/Adjust/ADJActivityHandler.h +++ b/Adjust/ADJActivityHandler.h @@ -86,7 +86,8 @@ - (BOOL)updateAttributionI:(id)selfI attribution:(ADJAttribution *)attribution; - (void)setAttributionDetails:(NSDictionary *)attributionDetails error:(NSError *)error; -- (void)setAdServicesAttributionToken:(NSString *)token; +- (void)setAdServicesAttributionToken:(NSString *)token + error:(NSError *)error; - (void)setOfflineMode:(BOOL)offline; - (void)sendFirstPackages; diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 15a01fae4..3fdf462b5 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -43,6 +43,7 @@ static double kSessionInterval; static double kSubSessionInterval; static const int kiAdRetriesCount = 3; +static const int kAdServicesdRetriesCount = 1; @implementation ADJInternalState @@ -91,6 +92,7 @@ @interface ADJActivityHandler() @property (nonatomic, strong) ADJTimerCycle *foregroundTimer; @property (nonatomic, strong) ADJTimerOnce *backgroundTimer; @property (nonatomic, assign) NSInteger iAdRetriesLeft; +@property (nonatomic, assign) NSInteger adServicesRetriesLeft; @property (nonatomic, strong) ADJInternalState *internalState; @property (nonatomic, strong) ADJDeviceInfo *deviceInfo; @property (nonatomic, strong) ADJTimerOnce *delayStartTimer; @@ -207,6 +209,7 @@ - (id)initWithConfig:(ADJConfig *)adjustConfig self.internalState.sessionResponseProcessed = NO; self.iAdRetriesLeft = kiAdRetriesCount; + self.adServicesRetriesLeft = kAdServicesdRetriesCount; self.trackingStatusManager = [[ADJTrackingStatusManager alloc] initWithActivityHandler:self]; @@ -401,8 +404,25 @@ - (void)setTrackingStateOptedOut { }]; } -- (void)setAdServicesAttributionToken:(NSString *)token { - [self sendAppleAdClickPackage:self attributionDetails:@{@"attribution_token": token} isAdServices:YES]; +- (void)setAdServicesAttributionToken:(NSString *)token + error:(NSError *)error { + if (![ADJUtil isNull:error]) { + [self.logger warn:@"Unable to read AdServices details"]; + + // 3 == platform not supported + if (error.code != 3 && self.adServicesRetriesLeft > 0) { + self.adServicesRetriesLeft = self.adServicesRetriesLeft - 1; + // retry after 5 seconds + dispatch_time_t retryTime = dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC); + dispatch_after(retryTime, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [self checkForAdServicesAttribution:self]; + }); + } else { + [self sendAppleAdClickPackage:self attributionDetails:@{@"error": @(error.code)} isAdServices:YES]; + } + } else { + [self sendAppleAdClickPackage:self attributionDetails:@{@"attribution_token": token} isAdServices:YES]; + } } - (void)setAttributionDetails:(NSDictionary *)attributionDetails @@ -996,6 +1016,8 @@ - (void)processSessionI:(ADJActivityHandler *)selfI { [selfI writeActivityStateI:selfI]; [ADJUserDefaults removePushToken]; [ADJUserDefaults removeDisableThirdPartySharing]; + +// [selfI checkForAdServicesAttribution:selfI]; return; } diff --git a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m index 470a4739f..e7bf3a103 100644 --- a/Adjust/ADJAdditions/UIDevice+ADJAdditions.m +++ b/Adjust/ADJAdditions/UIDevice+ADJAdditions.m @@ -319,14 +319,6 @@ - (NSString *)adjDeviceId:(ADJDeviceInfo *)deviceInfo { return mParameter; } -- (void)adjCheckForAdServicesAttribution:(ADJActivityHandler *)activityHandler { - NSString *attributionToken = [self adServicesAttributionToken]; - - if (attributionToken) { - [activityHandler setAdServicesAttributionToken:attributionToken]; - } -} - - (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_queue_t)queue { // if no tries for iad v3 left, stop trying id logger = [ADJAdjustFactory logger]; @@ -370,19 +362,27 @@ - (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_que #endif } -- (NSString *)adServicesAttributionToken { +- (void)adjCheckForAdServicesAttribution:(ADJActivityHandler *)activityHandler { id logger = [ADJAdjustFactory logger]; // [AAAttribution attributionTokenWithError:...] Class attributionClass = NSClassFromString(@"AAAttribution"); if (attributionClass == nil) { [logger warn:@"AdServices framework not found in user's app (AAAttribution not found)"]; - return nil; + [activityHandler setAdServicesAttributionToken:nil + error:[NSError errorWithDomain:@"com.adjust.sdk.adServices" + code:100 + userInfo:@{@"Error reason": @"AdServices framework not found"}]]; + return; } SEL attributionTokenSelector = NSSelectorFromString(@"attributionTokenWithError:"); if (![attributionClass respondsToSelector:attributionTokenSelector]) { - return nil; + [activityHandler setAdServicesAttributionToken:nil + error:[NSError errorWithDomain:@"com.adjust.sdk.adServices" + code:100 + userInfo:@{@"Error reason": @"AdServices framework not found"}]]; + return; } NSMethodSignature *attributionTokenMethodSignature = [attributionClass methodSignatureForSelector:attributionTokenSelector]; @@ -397,14 +397,15 @@ - (NSString *)adServicesAttributionToken { if (error) { [logger error:@"Error while retrieving AdServices attribution token: %@", error]; - return nil; + [activityHandler setAdServicesAttributionToken:nil error:error]; + return; } NSString * __unsafe_unretained tmpToken = nil; [tokenInvocation getReturnValue:&tmpToken]; NSString *token = tmpToken; - return token; + [activityHandler setAdServicesAttributionToken:token error:nil]; } - (BOOL)setiAdWithDetails:(ADJActivityHandler *)activityHandler diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/xcshareddata/xcschemes/AdjustExample-Swift.xcscheme b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/xcshareddata/xcschemes/AdjustExample-Swift.xcscheme new file mode 100644 index 000000000..42c6d86f4 --- /dev/null +++ b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/xcshareddata/xcschemes/AdjustExample-Swift.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From cbd6b7345c8c3a7a933699b659ca7df593591950 Mon Sep 17 00:00:00 2001 From: rabc Date: Tue, 12 Jan 2021 14:36:01 +0100 Subject: [PATCH 08/42] Send error code --- Adjust/ADJActivityHandler.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 3fdf462b5..b36d57e2e 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -418,7 +418,7 @@ - (void)setAdServicesAttributionToken:(NSString *)token [self checkForAdServicesAttribution:self]; }); } else { - [self sendAppleAdClickPackage:self attributionDetails:@{@"error": @(error.code)} isAdServices:YES]; + [self sendAppleAdClickPackage:self attributionDetails:@{@"error_code": @(error.code)} isAdServices:YES]; } } else { [self sendAppleAdClickPackage:self attributionDetails:@{@"attribution_token": token} isAdServices:YES]; @@ -1017,7 +1017,7 @@ - (void)processSessionI:(ADJActivityHandler *)selfI { [ADJUserDefaults removePushToken]; [ADJUserDefaults removeDisableThirdPartySharing]; -// [selfI checkForAdServicesAttribution:selfI]; + [selfI checkForAdServicesAttribution:selfI]; return; } From d5aec2a73f2304222ba46b2b799ea301538e0e93 Mon Sep 17 00:00:00 2001 From: rabc Date: Tue, 12 Jan 2021 14:36:01 +0100 Subject: [PATCH 09/42] Add feature toogle --- Adjust/ADJActivityHandler.m | 6 ++++-- Adjust/ADJConfig.h | 5 +++++ Adjust/ADJConfig.m | 2 ++ AdjustBridge/AdjustBridge.m | 1 + AdjustBridge/AdjustBridgeRegister.m | 4 ++++ .../AdjustWebBridgeTestApp/TestLibraryBridge.js | 6 ++++++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index b36d57e2e..fca047a38 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -1540,8 +1540,10 @@ - (void)checkForiAdI:(ADJActivityHandler *)selfI { } - (void)checkForAdServicesAttribution:(ADJActivityHandler *)selfI { - if (selfI.attribution == nil) { - [[UIDevice currentDevice] adjCheckForAdServicesAttribution:selfI]; + if (@available(iOS 14.3, tvOS 14.3, *)) { + if (selfI.adjustConfig.allowAdServicesReading == true && selfI.attribution == nil) { + [[UIDevice currentDevice] adjCheckForAdServicesAttribution:selfI]; + } } } diff --git a/Adjust/ADJConfig.h b/Adjust/ADJConfig.h index 0d80e13c6..a49b5d081 100644 --- a/Adjust/ADJConfig.h +++ b/Adjust/ADJConfig.h @@ -148,6 +148,11 @@ */ @property (nonatomic, assign) BOOL allowiAdInfoReading; +/** + * @brief Enables/disables reading of AdServices framework data needed for attribution. + */ +@property (nonatomic, assign) BOOL allowAdServicesReading; + /** * @brief Enables/disables reading of IDFA parameter. */ diff --git a/Adjust/ADJConfig.m b/Adjust/ADJConfig.m index 773177882..b5325e750 100644 --- a/Adjust/ADJConfig.m +++ b/Adjust/ADJConfig.m @@ -69,6 +69,7 @@ - (id)initWithAppToken:(NSString *)appToken self.eventBufferingEnabled = NO; self.allowIdfaReading = YES; self.allowiAdInfoReading = YES; + self.allowAdServicesReading = YES; _isSKAdNetworkHandlingActive = YES; return self; @@ -195,6 +196,7 @@ - (id)copyWithZone:(NSZone *)zone { copy.sendInBackground = self.sendInBackground; copy.allowIdfaReading = self.allowIdfaReading; copy.allowiAdInfoReading = self.allowiAdInfoReading; + copy.allowAdServicesReading = self.allowAdServicesReading; copy.delayStart = self.delayStart; copy.userAgent = [self.userAgent copyWithZone:zone]; copy.externalDeviceId = [self.externalDeviceId copyWithZone:zone]; diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index a2fb0fcf3..2f35c8dbd 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -193,6 +193,7 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView NSNumber *isDeviceKnown = [data objectForKey:@"isDeviceKnown"]; NSNumber *needsCost = [data objectForKey:@"needsCost"]; NSNumber *allowiAdInfoReading = [data objectForKey:@"allowiAdInfoReading"]; + NSNumber *allowAdServicesReading = [data objectForKey:@"allowAdServicesReading"]; NSNumber *allowIdfaReading = [data objectForKey:@"allowIdfaReading"]; NSNumber *secretId = [data objectForKey:@"secretId"]; NSString *info1 = [data objectForKey:@"info1"]; diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index 8ec796adf..b61826a06 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -292,6 +292,7 @@ + (NSString *)adjust_js { this.isDeviceKnown = null; this.needsCost = null; this.allowiAdInfoReading = null; + this.allowAdServicesReading = null; this.allowIdfaReading = null; this.secretId = null; this.info1 = null; @@ -377,6 +378,9 @@ + (NSString *)adjust_js { AdjustConfig.prototype.setAllowiAdInfoReading = function(allowiAdInfoReading) { this.allowiAdInfoReading = allowiAdInfoReading; }; + AdjustConfig.prototype.setAllowAdServicesReading = function(allowAdServicesReading) { + this.allowAdServicesReading = allowAdServicesReading; + }; AdjustConfig.prototype.setAllowIdfaReading = function(allowIdfaReading) { this.allowIdfaReading = allowIdfaReading; }; diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js index b713e92f2..ca695f92a 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js @@ -233,6 +233,12 @@ AdjustCommandExecutor.prototype.config = function(params) { adjustConfig.setAllowiAdInfoReading(allowiAdInfoReading); } + if ('allowAdServicesReading' in params) { + var allowAdServicesReadingS = getFirstValue(params, 'allowAdServicesReading'); + var allowAdServicesReading = allowAdServicesReadingS == 'true'; + adjustConfig.setAllowAdServicesReading(allowAdServicesReading); + } + if ('allowIdfaReading' in params) { var allowIdfaReadingS = getFirstValue(params, 'allowIdfaReading'); var allowIdfaReading = allowIdfaReadingS == 'true'; From 323468ba742dd38f5d3eae8661922333e3285c69 Mon Sep 17 00:00:00 2001 From: ugi Date: Wed, 13 Jan 2021 22:59:37 +0100 Subject: [PATCH 10/42] update example apps --- .../AdjustExample-ObjC.xcodeproj/project.pbxproj | 4 ++++ .../AdjustExample-Swift/ViewControllerSwift.swift | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/AdjustExample-ObjC/AdjustExample-ObjC.xcodeproj/project.pbxproj b/examples/AdjustExample-ObjC/AdjustExample-ObjC.xcodeproj/project.pbxproj index f8d7387de..be3f89387 100644 --- a/examples/AdjustExample-ObjC/AdjustExample-ObjC.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-ObjC/AdjustExample-ObjC.xcodeproj/project.pbxproj @@ -48,6 +48,7 @@ 9D449E2F1E6ED88F00E7E80B /* ADJSdkClickHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D449E0B1E6ED88F00E7E80B /* ADJSdkClickHandler.m */; }; 9D449E301E6ED88F00E7E80B /* ADJKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D449E0D1E6ED88F00E7E80B /* ADJKeychain.m */; }; 9D449E311E6ED88F00E7E80B /* ADJSessionParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D449E0F1E6ED88F00E7E80B /* ADJSessionParameters.m */; }; + 9DAA5C6725AFA4B600C718DD /* AdServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DAA5C6625AFA4B600C718DD /* AdServices.framework */; }; 9DC95F261C104CEF00138E4B /* ViewControllerObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DC95F251C104CEF00138E4B /* ViewControllerObjC.m */; }; 9DC95F2A1C10515300138E4B /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DC95F291C10515300138E4B /* Constants.m */; }; 9DD0E9BE1F457EF800B2A759 /* ADJUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DD0E9BD1F457EF800B2A759 /* ADJUserDefaults.m */; }; @@ -134,6 +135,7 @@ 9D449E0D1E6ED88F00E7E80B /* ADJKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJKeychain.m; sourceTree = ""; }; 9D449E0E1E6ED88F00E7E80B /* ADJSessionParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJSessionParameters.h; sourceTree = ""; }; 9D449E0F1E6ED88F00E7E80B /* ADJSessionParameters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJSessionParameters.m; sourceTree = ""; }; + 9DAA5C6625AFA4B600C718DD /* AdServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdServices.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/AdServices.framework; sourceTree = DEVELOPER_DIR; }; 9DC95F241C104CEF00138E4B /* ViewControllerObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewControllerObjC.h; sourceTree = ""; }; 9DC95F251C104CEF00138E4B /* ViewControllerObjC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewControllerObjC.m; sourceTree = ""; }; 9DC95F281C10515300138E4B /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; @@ -150,6 +152,7 @@ buildActionMask = 2147483647; files = ( D799022C24C093AA00C7D11C /* AppTrackingTransparency.framework in Frameworks */, + 9DAA5C6725AFA4B600C718DD /* AdServices.framework in Frameworks */, 9639095F1BCBFD3B00A2E8A4 /* iAd.framework in Frameworks */, 963909611BCBFD4200A2E8A4 /* AdSupport.framework in Frameworks */, ); @@ -303,6 +306,7 @@ D799022A24C093AA00C7D11C /* Frameworks */ = { isa = PBXGroup; children = ( + 9DAA5C6625AFA4B600C718DD /* AdServices.framework */, D799022B24C093AA00C7D11C /* AppTrackingTransparency.framework */, ); name = Frameworks; diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift b/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift index bd70f9e1a..610a43433 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift +++ b/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift @@ -31,8 +31,6 @@ class ViewControllerSwift: UIViewController { override func viewDidLoad() { super.viewDidLoad() - - } override func didReceiveMemoryWarning() { From 0cbaad6ce3eee6003004b1981d7798aab88f3169 Mon Sep 17 00:00:00 2001 From: nonelse Date: Thu, 14 Jan 2021 15:24:57 +0100 Subject: [PATCH 11/42] Extract att details into own sdk_info fields --- Adjust/ADJActivityHandler.m | 68 +++++++++++++++++++++++++++---------- Adjust/ADJPackageBuilder.h | 4 ++- Adjust/ADJPackageBuilder.m | 17 +++++++++- 3 files changed, 69 insertions(+), 20 deletions(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index fca047a38..235b9857a 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -418,10 +418,14 @@ - (void)setAdServicesAttributionToken:(NSString *)token [self checkForAdServicesAttribution:self]; }); } else { - [self sendAppleAdClickPackage:self attributionDetails:@{@"error_code": @(error.code)} isAdServices:YES]; + [self sendAppleAdClickPackage:self + token:nil + errorCodeNumber:[NSNumber numberWithInteger:error.code]]; } } else { - [self sendAppleAdClickPackage:self attributionDetails:@{@"attribution_token": token} isAdServices:YES]; + [self sendAppleAdClickPackage:self + token:token + errorCodeNumber:nil]; } } @@ -540,18 +544,12 @@ - (void)saveiAdErrorCode:(NSInteger)code { } - (void)sendIad3ClickPackage:(ADJActivityHandler *)selfI - attributionDetails:(NSDictionary *)attributionDetails { - [self sendAppleAdClickPackage:selfI attributionDetails:attributionDetails isAdServices:NO]; -} - -- (void)sendAppleAdClickPackage:(ADJActivityHandler *)selfI attributionDetails:(NSDictionary *)attributionDetails - isAdServices:(BOOL)isAdServices { if (![selfI isEnabledI:selfI]) { return; } - + if (ADJAdjustFactory.iAdFrameworkEnabled == NO) { [self.logger verbose:@"Sending iAd details to server suppressed."]; return; @@ -575,13 +573,44 @@ - (void)sendAppleAdClickPackage:(ADJActivityHandler *)selfI clickBuilder.attributionDetails = attributionDetails; - if (isAdServices) { - ADJActivityPackage *infoPackage = [clickBuilder buildInfoPackage:ADJAdServicesPackageKey]; - [selfI.packageHandler addPackage:infoPackage]; - } else { - ADJActivityPackage *clickPackage = [clickBuilder buildClickPackage:ADJiAdPackageKey]; - [selfI.sdkClickHandler sendSdkClick:clickPackage]; + ADJActivityPackage *clickPackage = [clickBuilder buildClickPackage:ADJiAdPackageKey]; + [selfI.sdkClickHandler sendSdkClick:clickPackage]; +} + +- (void)sendAppleAdClickPackage:(ADJActivityHandler *)selfI + token:(NSString *)token + errorCodeNumber:(NSNumber *)errorCodeNumber + { + if (![selfI isEnabledI:selfI]) { + return; + } + + if (ADJAdjustFactory.iAdFrameworkEnabled == NO) { + [self.logger verbose:@"Sending Apple AdServices Attribution to server suppressed."]; + return; } + + double now = [NSDate.date timeIntervalSince1970]; + if (selfI.activityState != nil) { + [ADJUtil launchSynchronisedWithObject:[ADJActivityState class] + block:^{ + double lastInterval = now - selfI.activityState.lastActivity; + selfI.activityState.lastInterval = lastInterval; + }]; + } + ADJPackageBuilder *clickBuilder = [[ADJPackageBuilder alloc] + initWithDeviceInfo:selfI.deviceInfo + activityState:selfI.activityState + config:selfI.adjustConfig + sessionParameters:self.sessionParameters + trackingStatusManager:self.trackingStatusManager + createdAt:now]; + + ADJActivityPackage *infoPackage = + [clickBuilder buildInfoPackage:ADJAdServicesPackageKey + token:token + errorCodeNumber:errorCodeNumber]; + [selfI.packageHandler addPackage:infoPackage]; } - (void)saveAttributionDetailsI:(ADJActivityHandler *)selfI @@ -728,7 +757,8 @@ - (void)trackAttStatusUpdateI:(ADJActivityHandler *)selfI { trackingStatusManager:self.trackingStatusManager createdAt:now]; - ADJActivityPackage *infoPackage = [infoBuilder buildInfoPackage:@"att"]; + ADJActivityPackage *infoPackage = [infoBuilder buildInfoPackage:@"att" + token:nil errorCodeNumber:nil]; [selfI.packageHandler addPackage:infoPackage]; if (selfI.adjustConfig.eventBufferingEnabled) { @@ -1766,7 +1796,8 @@ - (void)setDeviceTokenI:(ADJActivityHandler *)selfI trackingStatusManager:self.trackingStatusManager createdAt:now]; - ADJActivityPackage *infoPackage = [infoBuilder buildInfoPackage:@"push"]; + ADJActivityPackage *infoPackage = [infoBuilder buildInfoPackage:@"push" + token:nil errorCodeNumber:nil]; [selfI.packageHandler addPackage:infoPackage]; @@ -1815,7 +1846,8 @@ - (void)setPushTokenI:(ADJActivityHandler *)selfI trackingStatusManager:self.trackingStatusManager createdAt:now]; - ADJActivityPackage *infoPackage = [infoBuilder buildInfoPackage:@"push"]; + ADJActivityPackage *infoPackage = [infoBuilder buildInfoPackage:@"push" + token:nil errorCodeNumber:nil]; [selfI.packageHandler addPackage:infoPackage]; // if push token was cached, remove it diff --git a/Adjust/ADJPackageBuilder.h b/Adjust/ADJPackageBuilder.h index e25752995..ca3935bff 100644 --- a/Adjust/ADJPackageBuilder.h +++ b/Adjust/ADJPackageBuilder.h @@ -41,7 +41,9 @@ - (ADJActivityPackage *)buildEventPackage:(ADJEvent *)event isInDelay:(BOOL)isInDelay; -- (ADJActivityPackage *)buildInfoPackage:(NSString *)infoSource; +- (ADJActivityPackage *)buildInfoPackage:(NSString *)infoSource + token:(NSString *)token + errorCodeNumber:(NSNumber *)errorCodeNumber; - (ADJActivityPackage *)buildAdRevenuePackage:(NSString *)source payload:(NSData *)payload; diff --git a/Adjust/ADJPackageBuilder.m b/Adjust/ADJPackageBuilder.m index 49387314d..aabbebe98 100644 --- a/Adjust/ADJPackageBuilder.m +++ b/Adjust/ADJPackageBuilder.m @@ -91,8 +91,23 @@ - (ADJActivityPackage *)buildEventPackage:(ADJEvent *)event return eventPackage; } -- (ADJActivityPackage *)buildInfoPackage:(NSString *)infoSource { +- (ADJActivityPackage *)buildInfoPackage:(NSString *)infoSource + token:(NSString *)token + errorCodeNumber:(NSNumber *)errorCodeNumber +{ NSMutableDictionary *parameters = [self getInfoParameters:infoSource]; + + if (token != nil) { + [ADJPackageBuilder parameters:parameters + setString:token + forKey:@"attribution_token"]; + } + if (errorCodeNumber != nil) { + [ADJPackageBuilder parameters:parameters + setInt:errorCodeNumber.intValue + forKey:@"error_code"]; + } + ADJActivityPackage *infoPackage = [self defaultActivityPackage]; infoPackage.path = @"/sdk_info"; infoPackage.activityKind = ADJActivityKindInfo; From f42a488402bd8f2a81c204463b4914e59f2f9897 Mon Sep 17 00:00:00 2001 From: uerceg Date: Thu, 14 Jan 2021 22:37:31 +0100 Subject: [PATCH 12/42] add warning log to inform when AdServices reading is switched off --- Adjust/ADJActivityHandler.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 235b9857a..19961e280 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -151,6 +151,9 @@ - (id)initWithConfig:(ADJConfig *)adjustConfig if (adjustConfig.allowiAdInfoReading == NO) { [ADJAdjustFactory.logger warn:@"iAd info reading has been switched off"]; } + if (adjustConfig.allowAdServicesReading == NO) { + [ADJAdjustFactory.logger warn:@"AdServices info reading has been switched off"]; + } self.adjustConfig = adjustConfig; self.adjustDelegate = adjustConfig.delegate; From 968f25b1f6204070075111da1fa75aae3f04aeac Mon Sep 17 00:00:00 2001 From: uerceg Date: Thu, 14 Jan 2021 23:52:35 +0100 Subject: [PATCH 13/42] hook AdServices feature with test server --- Adjust/ADJActivityHandler.m | 8 ++++---- Adjust/ADJAdjustFactory.h | 2 ++ Adjust/ADJAdjustFactory.m | 10 ++++++++++ Adjust/ADJConfig.h | 2 +- Adjust/ADJConfig.m | 4 ++-- Adjust/Adjust.h | 1 + Adjust/Adjust.m | 1 + AdjustBridge/AdjustBridge.m | 9 ++++++++- AdjustBridge/AdjustBridgeRegister.m | 6 +++--- .../AdjustTestApp.xcodeproj/project.pbxproj | 4 ++++ .../AdjustTestApp/ATAAdjustCommandExecutor.m | 12 ++++++++++++ .../AdjustTestApp/ViewController.h | 6 ++++++ .../project.pbxproj | 4 ++++ .../TestLibraryBridge.h | 5 +++++ .../TestLibraryBridge.js | 19 +++++++++++++++---- 15 files changed, 78 insertions(+), 15 deletions(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 19961e280..cca3263df 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -151,7 +151,7 @@ - (id)initWithConfig:(ADJConfig *)adjustConfig if (adjustConfig.allowiAdInfoReading == NO) { [ADJAdjustFactory.logger warn:@"iAd info reading has been switched off"]; } - if (adjustConfig.allowAdServicesReading == NO) { + if (adjustConfig.allowAdServicesInfoReading == NO) { [ADJAdjustFactory.logger warn:@"AdServices info reading has been switched off"]; } @@ -588,8 +588,8 @@ - (void)sendAppleAdClickPackage:(ADJActivityHandler *)selfI return; } - if (ADJAdjustFactory.iAdFrameworkEnabled == NO) { - [self.logger verbose:@"Sending Apple AdServices Attribution to server suppressed."]; + if (ADJAdjustFactory.adServicesFrameworkEnabled == NO) { + [self.logger verbose:@"Sending AdServices attribution to server suppressed."]; return; } @@ -1574,7 +1574,7 @@ - (void)checkForiAdI:(ADJActivityHandler *)selfI { - (void)checkForAdServicesAttribution:(ADJActivityHandler *)selfI { if (@available(iOS 14.3, tvOS 14.3, *)) { - if (selfI.adjustConfig.allowAdServicesReading == true && selfI.attribution == nil) { + if (selfI.adjustConfig.allowAdServicesInfoReading == true && selfI.attribution == nil) { [[UIDevice currentDevice] adjCheckForAdServicesAttribution:selfI]; } } diff --git a/Adjust/ADJAdjustFactory.h b/Adjust/ADJAdjustFactory.h index cef20d7e3..bed7caf29 100644 --- a/Adjust/ADJAdjustFactory.h +++ b/Adjust/ADJAdjustFactory.h @@ -30,6 +30,7 @@ + (NSString *)gdprUrl; + (NSString *)subscriptionUrl; + (BOOL)iAdFrameworkEnabled; ++ (BOOL)adServicesFrameworkEnabled; + (void)setLogger:(id)logger; + (void)setSessionInterval:(double)sessionInterval; @@ -41,6 +42,7 @@ + (void)setSdkClickHandlerBackoffStrategy:(ADJBackoffStrategy *)backoffStrategy; + (void)setTesting:(BOOL)testing; + (void)setiAdFrameworkEnabled:(BOOL)iAdFrameworkEnabled; ++ (void)setAdServicesFrameworkEnabled:(BOOL)adServicesFrameworkEnabled; + (void)setMaxDelayStart:(NSTimeInterval)maxDelayStart; + (void)setBaseUrl:(NSString *)baseUrl; + (void)setGdprUrl:(NSString *)gdprUrl; diff --git a/Adjust/ADJAdjustFactory.m b/Adjust/ADJAdjustFactory.m index bb7b66c82..4670a6245 100644 --- a/Adjust/ADJAdjustFactory.m +++ b/Adjust/ADJAdjustFactory.m @@ -23,6 +23,7 @@ static BOOL internalTesting = NO; static NSTimeInterval internalMaxDelayStart = -1; static BOOL internaliAdFrameworkEnabled = YES; +static BOOL internalAdServicesFrameworkEnabled = YES; static NSString * internalBaseUrl = nil; static NSString * internalGdprUrl = nil; @@ -102,6 +103,10 @@ + (BOOL)iAdFrameworkEnabled { return internaliAdFrameworkEnabled; } ++ (BOOL)adServicesFrameworkEnabled { + return internalAdServicesFrameworkEnabled; +} + + (NSTimeInterval)maxDelayStart { if (internalMaxDelayStart < 0) { return 10.0; // 10 seconds @@ -161,6 +166,10 @@ + (void)setiAdFrameworkEnabled:(BOOL)iAdFrameworkEnabled { internaliAdFrameworkEnabled = iAdFrameworkEnabled; } ++ (void)setAdServicesFrameworkEnabled:(BOOL)adServicesFrameworkEnabled { + internalAdServicesFrameworkEnabled = adServicesFrameworkEnabled; +} + + (void)setMaxDelayStart:(NSTimeInterval)maxDelayStart { internalMaxDelayStart = maxDelayStart; } @@ -239,5 +248,6 @@ + (void)teardown:(BOOL)deleteState { internalGdprUrl = nil; internalSubscriptionUrl = nil; internaliAdFrameworkEnabled = YES; + internalAdServicesFrameworkEnabled = YES; } @end diff --git a/Adjust/ADJConfig.h b/Adjust/ADJConfig.h index a49b5d081..b062cf987 100644 --- a/Adjust/ADJConfig.h +++ b/Adjust/ADJConfig.h @@ -151,7 +151,7 @@ /** * @brief Enables/disables reading of AdServices framework data needed for attribution. */ -@property (nonatomic, assign) BOOL allowAdServicesReading; +@property (nonatomic, assign) BOOL allowAdServicesInfoReading; /** * @brief Enables/disables reading of IDFA parameter. diff --git a/Adjust/ADJConfig.m b/Adjust/ADJConfig.m index b5325e750..0e09ab80d 100644 --- a/Adjust/ADJConfig.m +++ b/Adjust/ADJConfig.m @@ -69,7 +69,7 @@ - (id)initWithAppToken:(NSString *)appToken self.eventBufferingEnabled = NO; self.allowIdfaReading = YES; self.allowiAdInfoReading = YES; - self.allowAdServicesReading = YES; + self.allowAdServicesInfoReading = YES; _isSKAdNetworkHandlingActive = YES; return self; @@ -196,7 +196,7 @@ - (id)copyWithZone:(NSZone *)zone { copy.sendInBackground = self.sendInBackground; copy.allowIdfaReading = self.allowIdfaReading; copy.allowiAdInfoReading = self.allowiAdInfoReading; - copy.allowAdServicesReading = self.allowAdServicesReading; + copy.allowAdServicesInfoReading = self.allowAdServicesInfoReading; copy.delayStart = self.delayStart; copy.userAgent = [self.userAgent copyWithZone:zone]; copy.externalDeviceId = [self.externalDeviceId copyWithZone:zone]; diff --git a/Adjust/Adjust.h b/Adjust/Adjust.h index 5040f3f56..352421e87 100644 --- a/Adjust/Adjust.h +++ b/Adjust/Adjust.h @@ -26,6 +26,7 @@ @property (nonatomic, assign) BOOL deleteState; @property (nonatomic, assign) BOOL noBackoffWait; @property (nonatomic, assign) BOOL iAdFrameworkEnabled; +@property (nonatomic, assign) BOOL adServicesFrameworkEnabled; @property (nonatomic, assign) BOOL enableSigning; @property (nonatomic, assign) BOOL disableSigning; diff --git a/Adjust/Adjust.m b/Adjust/Adjust.m index ce9b05071..ec85b9ef2 100644 --- a/Adjust/Adjust.m +++ b/Adjust/Adjust.m @@ -595,6 +595,7 @@ - (void)setTestOptions:(AdjustTestOptions *)testOptions { } [ADJAdjustFactory setiAdFrameworkEnabled:testOptions.iAdFrameworkEnabled]; + [ADJAdjustFactory setAdServicesFrameworkEnabled:testOptions.adServicesFrameworkEnabled]; } #pragma mark - Private & helper methods diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index 2f35c8dbd..3614527ca 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -193,7 +193,7 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView NSNumber *isDeviceKnown = [data objectForKey:@"isDeviceKnown"]; NSNumber *needsCost = [data objectForKey:@"needsCost"]; NSNumber *allowiAdInfoReading = [data objectForKey:@"allowiAdInfoReading"]; - NSNumber *allowAdServicesReading = [data objectForKey:@"allowAdServicesReading"]; + NSNumber *allowAdServicesInfoReading = [data objectForKey:@"allowAdServicesInfoReading"]; NSNumber *allowIdfaReading = [data objectForKey:@"allowIdfaReading"]; NSNumber *secretId = [data objectForKey:@"secretId"]; NSString *info1 = [data objectForKey:@"info1"]; @@ -256,6 +256,9 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView if ([self isFieldValid:allowiAdInfoReading]) { [adjustConfig setAllowiAdInfoReading:[allowiAdInfoReading boolValue]]; } + if ([self isFieldValid:allowAdServicesInfoReading]) { + [adjustConfig setAllowAdServicesInfoReading:[allowAdServicesInfoReading boolValue]]; + } if ([self isFieldValid:allowIdfaReading]) { [adjustConfig setAllowIdfaReading:[allowIdfaReading boolValue]]; } @@ -504,6 +507,7 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView NSNumber *deleteState = [data objectForKey:@"deleteState"]; NSNumber *noBackoffWait = [data objectForKey:@"noBackoffWait"]; NSNumber *iAdFrameworkEnabled = [data objectForKey:@"iAdFrameworkEnabled"]; + NSNumber *adServicesFrameworkEnabled = [data objectForKey:@"adServicesFrameworkEnabled"]; AdjustTestOptions *testOptions = [[AdjustTestOptions alloc] init]; @@ -543,6 +547,9 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView if ([self isFieldValid:iAdFrameworkEnabled]) { testOptions.iAdFrameworkEnabled = [iAdFrameworkEnabled boolValue]; } + if ([self isFieldValid:adServicesFrameworkEnabled]) { + testOptions.adServicesFrameworkEnabled = [adServicesFrameworkEnabled boolValue]; + } [Adjust setTestOptions:testOptions]; }]; diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index b61826a06..242fd5e1d 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -292,7 +292,7 @@ + (NSString *)adjust_js { this.isDeviceKnown = null; this.needsCost = null; this.allowiAdInfoReading = null; - this.allowAdServicesReading = null; + this.allowAdServicesInfoReading = null; this.allowIdfaReading = null; this.secretId = null; this.info1 = null; @@ -378,8 +378,8 @@ + (NSString *)adjust_js { AdjustConfig.prototype.setAllowiAdInfoReading = function(allowiAdInfoReading) { this.allowiAdInfoReading = allowiAdInfoReading; }; - AdjustConfig.prototype.setAllowAdServicesReading = function(allowAdServicesReading) { - this.allowAdServicesReading = allowAdServicesReading; + AdjustConfig.prototype.setAllowAdServicesInfoReading = function(allowAdServicesInfoReading) { + this.allowAdServicesInfoReading = allowAdServicesInfoReading; }; AdjustConfig.prototype.setAllowIdfaReading = function(allowIdfaReading) { this.allowIdfaReading = allowIdfaReading; diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp.xcodeproj/project.pbxproj b/AdjustTests/AdjustTestApp/AdjustTestApp.xcodeproj/project.pbxproj index d76ade4b3..5e1b9bf61 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp.xcodeproj/project.pbxproj +++ b/AdjustTests/AdjustTestApp/AdjustTestApp.xcodeproj/project.pbxproj @@ -74,6 +74,7 @@ 9D1D8EA2219246EF0088E3CF /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D1D8EA1219246EF0088E3CF /* CoreTelephony.framework */; }; 9D2F24082447DDCB00B7CA90 /* ADJSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D2F24072447DDCA00B7CA90 /* ADJSubscription.m */; }; 9D75AFDB210217FF0079A36C /* ATAAdjustDelegateDeferredDeeplink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D75AFDA210217FF0079A36C /* ATAAdjustDelegateDeferredDeeplink.m */; }; + 9DAA5C6A25B0F81200C718DD /* AdServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DAA5C6925B0F81100C718DD /* AdServices.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -211,6 +212,7 @@ 9D2F24072447DDCA00B7CA90 /* ADJSubscription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJSubscription.m; sourceTree = ""; }; 9D75AFD9210217FF0079A36C /* ATAAdjustDelegateDeferredDeeplink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ATAAdjustDelegateDeferredDeeplink.h; sourceTree = ""; }; 9D75AFDA210217FF0079A36C /* ATAAdjustDelegateDeferredDeeplink.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ATAAdjustDelegateDeferredDeeplink.m; sourceTree = ""; }; + 9DAA5C6925B0F81100C718DD /* AdServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdServices.framework; path = System/Library/Frameworks/AdServices.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -219,6 +221,7 @@ buildActionMask = 2147483647; files = ( 9D1D8E9E219246E50088E3CF /* iAd.framework in Frameworks */, + 9DAA5C6A25B0F81200C718DD /* AdServices.framework in Frameworks */, 9D1D8EA0219246EA0088E3CF /* AdSupport.framework in Frameworks */, 9D1D8EA2219246EF0088E3CF /* CoreTelephony.framework in Frameworks */, ); @@ -418,6 +421,7 @@ 9D1D8E9C219246E50088E3CF /* Frameworks */ = { isa = PBXGroup; children = ( + 9DAA5C6925B0F81100C718DD /* AdServices.framework */, 9D1D8EA1219246EF0088E3CF /* CoreTelephony.framework */, 9D1D8E9F219246EA0088E3CF /* AdSupport.framework */, 9D1D8E9D219246E50088E3CF /* iAd.framework */, diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m index 59669ab87..6b13a45b6 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m +++ b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m @@ -135,6 +135,13 @@ - (void)testOptions:(NSDictionary *)parameters { testOptions.iAdFrameworkEnabled = YES; } } + testOptions.adServicesFrameworkEnabled = NO; // default value -> NO - AdServices will not be used in test app by default + if ([parameters objectForKey:@"adServicesFrameworkEnabled"]) { + NSString *adServicesFrameworkEnabledStr = [parameters objectForKey:@"adServicesFrameworkEnabled"][0]; + if ([adServicesFrameworkEnabledStr isEqualToString:@"true"]) { + testOptions.adServicesFrameworkEnabled = YES; + } + } if ([parameters objectForKey:@"enableSigning"]) { NSString *enableSigningStr = [parameters objectForKey:@"enableSigning"][0]; testOptions.enableSigning = NO; @@ -301,6 +308,11 @@ - (void)config:(NSDictionary *)parameters { [adjustConfig setAllowiAdInfoReading:[allowiAdInfoReadingS boolValue]]; } + if ([parameters objectForKey:@"allowAdServicesInfoReading"]) { + NSString *allowAdServicesInfoReadingS = [parameters objectForKey:@"allowAdServicesInfoReading"][0]; + [adjustConfig setAllowAdServicesInfoReading:[allowAdServicesInfoReadingS boolValue]]; + } + if ([parameters objectForKey:@"userAgent"]) { NSString *userAgent = [parameters objectForKey:@"userAgent"][0]; [adjustConfig setUserAgent:userAgent]; diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.h b/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.h index 8dcedac10..c1c06f9cc 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.h +++ b/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.h @@ -8,10 +8,16 @@ #import +// simulator static NSString * baseUrl = @"http://127.0.0.1:8080"; static NSString * gdprUrl = @"http://127.0.0.1:8080"; static NSString * subscriptionUrl = @"http://127.0.0.1:8080"; static NSString * controlUrl = @"ws://127.0.0.1:1987"; +// device +// static NSString * baseUrl = @"http://192.168.86.37:8080"; +// static NSString * gdprUrl = @"http://192.168.86.37:8080"; +// static NSString * subscriptionUrl = @"http://192.168.86.37:8080"; +// static NSString * controlUrl = @"ws://192.168.86.37:1987"; @interface ViewController : UIViewController diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj index 0ebc8f901..4e4ef7b9e 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj @@ -75,6 +75,7 @@ 6FD0412E211C71D9008D42D0 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD0412D211C71D9008D42D0 /* AdSupport.framework */; }; 6FD04130211C71E8008D42D0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD0412F211C71E8008D42D0 /* Foundation.framework */; }; 6FD04132211C71EF008D42D0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD04131211C71EE008D42D0 /* UIKit.framework */; }; + 9DAA5C6C25B0F81F00C718DD /* AdServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DAA5C6B25B0F81F00C718DD /* AdServices.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -209,6 +210,7 @@ 6FD0412D211C71D9008D42D0 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; 6FD0412F211C71E8008D42D0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6FD04131211C71EE008D42D0 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 9DAA5C6B25B0F81F00C718DD /* AdServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdServices.framework; path = System/Library/Frameworks/AdServices.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -221,6 +223,7 @@ 6FD0412E211C71D9008D42D0 /* AdSupport.framework in Frameworks */, 6FD0412C211C71D1008D42D0 /* iAd.framework in Frameworks */, 6F7AF7BB2118992200F730B2 /* WebKit.framework in Frameworks */, + 9DAA5C6C25B0F81F00C718DD /* AdServices.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -430,6 +433,7 @@ 6F7AF7B92118992200F730B2 /* Frameworks */ = { isa = PBXGroup; children = ( + 9DAA5C6B25B0F81F00C718DD /* AdServices.framework */, 6FD04131211C71EE008D42D0 /* UIKit.framework */, 6FD0412F211C71E8008D42D0 /* Foundation.framework */, 6FD0412D211C71D9008D42D0 /* AdSupport.framework */, diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.h b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.h index 91120da56..50c579497 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.h +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.h @@ -10,9 +10,14 @@ #import "ATLTestLibrary.h" #import "AdjustBridgeRegister.h" +// simulator static NSString * baseUrl = @"http://127.0.0.1:8080"; static NSString * gdprUrl = @"http://127.0.0.1:8080"; static NSString * controlUrl = @"ws://127.0.0.1:1987"; +// device +// static NSString * baseUrl = @"http://192.168.86.37:8080"; +// static NSString * gdprUrl = @"http://192.168.86.37:8080"; +// static NSString * controlUrl = @"ws://192.168.86.37:1987"; @interface TestLibraryBridge : NSObject diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js index ca695f92a..c567e7815 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js @@ -1,5 +1,9 @@ +// simulator var localBaseUrl = 'http://127.0.0.1:8080'; var localGdprUrl = 'http://127.0.0.1:8080'; +// device +// var localBaseUrl = 'http://192.168.86.37:8080'; +// var localGdprUrl = 'http://192.168.86.37:8080'; // local reference of the command executor // originally it was this.adjustCommandExecutor of TestLibraryBridge var @@ -58,6 +62,7 @@ AdjustCommandExecutor.prototype.testOptions = function(params) { this.deleteState = null; this.noBackoffWait = null; this.iAdFrameworkEnabled = null; + this.adServicesFrameworkEnabled = null; }; var testOptions = new TestOptions(); @@ -89,6 +94,12 @@ AdjustCommandExecutor.prototype.testOptions = function(params) { var iAdFrameworkEnabled = getFirstValue(params, 'iAdFrameworkEnabled'); testOptions.iAdFrameworkEnabled = iAdFrameworkEnabled == 'true'; } + // AdServices will not be used in test app by default + testOptions.adServicesFrameworkEnabled = false; + if ('adServicesFrameworkEnabled' in params) { + var adServicesFrameworkEnabled = getFirstValue(params, 'adServicesFrameworkEnabled'); + testOptions.adServicesFrameworkEnabled = adServicesFrameworkEnabled == 'true'; + } if ('teardown' in params) { console.log('TestLibraryBridge hasOwnProperty teardown: ' + params['teardown']); @@ -233,10 +244,10 @@ AdjustCommandExecutor.prototype.config = function(params) { adjustConfig.setAllowiAdInfoReading(allowiAdInfoReading); } - if ('allowAdServicesReading' in params) { - var allowAdServicesReadingS = getFirstValue(params, 'allowAdServicesReading'); - var allowAdServicesReading = allowAdServicesReadingS == 'true'; - adjustConfig.setAllowAdServicesReading(allowAdServicesReading); + if ('allowAdServicesInfoReading' in params) { + var allowAdServicesInfoReadingS = getFirstValue(params, 'allowAdServicesInfoReading'); + var allowAdServicesInfoReading = allowAdServicesInfoReadingS == 'true'; + adjustConfig.setAllowAdServicesInfoReading(allowAdServicesInfoReading); } if ('allowIdfaReading' in params) { From 740a3578f4064b379024ac083216071806af59b9 Mon Sep 17 00:00:00 2001 From: uerceg Date: Fri, 15 Jan 2021 00:04:29 +0100 Subject: [PATCH 14/42] update places for AdService info checks & unify method naming with iAd --- Adjust/ADJActivityHandler.m | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index cca3263df..3a8ed0eee 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -418,7 +418,7 @@ - (void)setAdServicesAttributionToken:(NSString *)token // retry after 5 seconds dispatch_time_t retryTime = dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC); dispatch_after(retryTime, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [self checkForAdServicesAttribution:self]; + [self checkForAdServicesAttributionI:self]; }); } else { [self sendAppleAdClickPackage:self @@ -970,6 +970,10 @@ - (void)initI:(ADJActivityHandler *)selfI if (selfI.adjustConfig.allowiAdInfoReading == YES) { [selfI checkForiAdI:selfI]; } + + if (selfI.adjustConfig.allowAdServicesInfoReading == YES) { + [selfI checkForAdServicesAttributionI:selfI]; + } [selfI.trackingStatusManager checkForNewAttStatus]; @@ -1049,8 +1053,6 @@ - (void)processSessionI:(ADJActivityHandler *)selfI { [selfI writeActivityStateI:selfI]; [ADJUserDefaults removePushToken]; [ADJUserDefaults removeDisableThirdPartySharing]; - - [selfI checkForAdServicesAttribution:selfI]; return; } @@ -1094,8 +1096,8 @@ - (void)trackNewSessionI:(double)now withActivityHandler:(ADJActivityHandler *)s if (selfI.activityState.isGdprForgotten) { return; } - - [selfI checkForAdServicesAttribution:selfI]; + + [selfI checkForAdServicesAttributionI:selfI]; double lastInterval = now - selfI.activityState.lastActivity; [ADJUtil launchSynchronisedWithObject:[ADJActivityState class] @@ -1559,6 +1561,9 @@ - (void)setEnabledI:(ADJActivityHandler *)selfI enabled:(BOOL)enabled { if (selfI.adjustConfig.allowiAdInfoReading == YES) { [selfI checkForiAdI:selfI]; } + if (selfI.adjustConfig.allowAdServicesInfoReading == YES) { + [selfI checkForAdServicesAttributionI:selfI]; + } } [selfI checkStatusI:selfI @@ -1572,7 +1577,7 @@ - (void)checkForiAdI:(ADJActivityHandler *)selfI { [[UIDevice currentDevice] adjCheckForiAd:selfI queue:selfI.internalQueue]; } -- (void)checkForAdServicesAttribution:(ADJActivityHandler *)selfI { +- (void)checkForAdServicesAttributionI:(ADJActivityHandler *)selfI { if (@available(iOS 14.3, tvOS 14.3, *)) { if (selfI.adjustConfig.allowAdServicesInfoReading == true && selfI.attribution == nil) { [[UIDevice currentDevice] adjCheckForAdServicesAttribution:selfI]; From 35cf701e5d70898ab42c659882260f866361be34 Mon Sep 17 00:00:00 2001 From: uerceg Date: Fri, 15 Jan 2021 00:13:52 +0100 Subject: [PATCH 15/42] rename AdServices related internal methods --- Adjust/ADJActivityHandler.m | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 3a8ed0eee..728e4df70 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -421,14 +421,14 @@ - (void)setAdServicesAttributionToken:(NSString *)token [self checkForAdServicesAttributionI:self]; }); } else { - [self sendAppleAdClickPackage:self - token:nil - errorCodeNumber:[NSNumber numberWithInteger:error.code]]; + [self sendAdServicesInfoPackage:self + token:nil + errorCodeNumber:[NSNumber numberWithInteger:error.code]]; } } else { - [self sendAppleAdClickPackage:self - token:token - errorCodeNumber:nil]; + [self sendAdServicesInfoPackage:self + token:token + errorCodeNumber:nil]; } } @@ -580,9 +580,9 @@ - (void)sendIad3ClickPackage:(ADJActivityHandler *)selfI [selfI.sdkClickHandler sendSdkClick:clickPackage]; } -- (void)sendAppleAdClickPackage:(ADJActivityHandler *)selfI - token:(NSString *)token - errorCodeNumber:(NSNumber *)errorCodeNumber +- (void)sendAdServicesInfoPackage:(ADJActivityHandler *)selfI + token:(NSString *)token + errorCodeNumber:(NSNumber *)errorCodeNumber { if (![selfI isEnabledI:selfI]) { return; @@ -601,16 +601,16 @@ - (void)sendAppleAdClickPackage:(ADJActivityHandler *)selfI selfI.activityState.lastInterval = lastInterval; }]; } - ADJPackageBuilder *clickBuilder = [[ADJPackageBuilder alloc] - initWithDeviceInfo:selfI.deviceInfo - activityState:selfI.activityState - config:selfI.adjustConfig - sessionParameters:self.sessionParameters - trackingStatusManager:self.trackingStatusManager - createdAt:now]; + ADJPackageBuilder *infoBuilder = [[ADJPackageBuilder alloc] + initWithDeviceInfo:selfI.deviceInfo + activityState:selfI.activityState + config:selfI.adjustConfig + sessionParameters:self.sessionParameters + trackingStatusManager:self.trackingStatusManager + createdAt:now]; ADJActivityPackage *infoPackage = - [clickBuilder buildInfoPackage:ADJAdServicesPackageKey + [infoBuilder buildInfoPackage:ADJAdServicesPackageKey token:token errorCodeNumber:errorCodeNumber]; [selfI.packageHandler addPackage:infoPackage]; From 89860eb763cd1a900cda9c2d12d0fc9917afe318 Mon Sep 17 00:00:00 2001 From: rabc Date: Fri, 15 Jan 2021 11:17:43 +0100 Subject: [PATCH 16/42] Change to YES --- Adjust/ADJActivityHandler.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 728e4df70..a823d8999 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -1579,7 +1579,7 @@ - (void)checkForiAdI:(ADJActivityHandler *)selfI { - (void)checkForAdServicesAttributionI:(ADJActivityHandler *)selfI { if (@available(iOS 14.3, tvOS 14.3, *)) { - if (selfI.adjustConfig.allowAdServicesInfoReading == true && selfI.attribution == nil) { + if (selfI.adjustConfig.allowAdServicesInfoReading == YES && selfI.attribution == nil) { [[UIDevice currentDevice] adjCheckForAdServicesAttribution:selfI]; } } From 2f78275ea0d868314d1f1383273d026a13c4c719 Mon Sep 17 00:00:00 2001 From: rabc Date: Thu, 14 Jan 2021 11:45:22 +0100 Subject: [PATCH 17/42] Create method to retrieve current status --- Adjust/Adjust.m | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Adjust/Adjust.m b/Adjust/Adjust.m index ec85b9ef2..c8f336218 100644 --- a/Adjust/Adjust.m +++ b/Adjust/Adjust.m @@ -44,6 +44,21 @@ NSString * const ADJUrlStrategyIndia = @"UrlStrategyIndia"; NSString * const ADJUrlStrategyChina = @"UrlStrategyChina"; +NSString * const ADJATTAuthorizationStatusNotDetermined = @"NotDetermined"; +NSString * const ADJATTAuthorizationStatusRestricted = @"Restricted"; +NSString * const ADJATTAuthorizationStatusDenied = @"Denied"; +NSString * const ADJATTAuthorizationStatusAuthorized = @"Authorized"; +NSString * const ADJATTAuthorizationStatusNotAvailable = @"NotAvailable"; + +// copy from ATTrackingManagerAuthorizationStatus +typedef NS_ENUM(NSInteger, AdjATTrackingManagerAuthorizationStatus) { + AdjATTrackingManagerAuthorizationStatusNotDetermined = 0, + AdjATTrackingManagerAuthorizationStatusRestricted, + AdjATTrackingManagerAuthorizationStatusDenied, + AdjATTrackingManagerAuthorizationStatusAuthorized +}; + + @implementation AdjustTestOptions @end @@ -244,6 +259,28 @@ + (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSU } } ++ (NSString *)appTrackingAuthorizationStatus { + int status = [[UIDevice currentDevice] adjATTStatus]; + + switch (status) { + case AdjATTrackingManagerAuthorizationStatusAuthorized: + return ADJATTAuthorizationStatusAuthorized; + break; + case AdjATTrackingManagerAuthorizationStatusDenied: + return ADJATTAuthorizationStatusDenied; + break; + case AdjATTrackingManagerAuthorizationStatusRestricted: + return ADJATTAuthorizationStatusRestricted; + break; + case AdjATTrackingManagerAuthorizationStatusNotDetermined: + return ADJATTAuthorizationStatusNotDetermined; + break; + default: + return ADJATTAuthorizationStatusNotAvailable; + break; + } +} + + (ADJAttribution *)attribution { @synchronized (self) { return [[Adjust getInstance] attribution]; From 8a29a10b8944cc184a5ae805e3cda62d835f1776 Mon Sep 17 00:00:00 2001 From: rabc Date: Thu, 14 Jan 2021 11:58:55 +0100 Subject: [PATCH 18/42] Create web bridge --- Adjust/Adjust.h | 10 +++++++++ AdjustBridge/AdjustBridge.m | 22 +++++++++++++++++-- AdjustBridge/AdjustBridgeRegister.m | 10 +++++++++ .../project.pbxproj | 12 ++++++++++ .../AdjustExample-WebView.html | 14 +++++++++++- .../AdjustExample-WebView/Info.plist | 2 ++ 6 files changed, 67 insertions(+), 3 deletions(-) diff --git a/Adjust/Adjust.h b/Adjust/Adjust.h index 352421e87..6f89a9812 100644 --- a/Adjust/Adjust.h +++ b/Adjust/Adjust.h @@ -66,6 +66,14 @@ extern NSString * __nonnull const ADJAdRevenueSourceTapdaq; extern NSString * __nonnull const ADJUrlStrategyIndia; extern NSString * __nonnull const ADJUrlStrategyChina; +/** + * Constants for AppTrackingTransparency authorization status + */ +extern NSString * __nonnull const ADJATTAuthorizationStatusNotDetermined; +extern NSString * __nonnull const ADJATTAuthorizationStatusRestricted; +extern NSString * __nonnull const ADJATTAuthorizationStatusDenied; +extern NSString * __nonnull const ADJATTAuthorizationStatusAuthorized; + /** * @brief The main interface to Adjust. * @@ -344,4 +352,6 @@ extern NSString * __nonnull const ADJUrlStrategyChina; - (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSUInteger status))completion; ++ (nonnull NSString *)appTrackingAuthorizationStatus; + @end diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index 3614527ca..a529cd4cf 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -413,14 +413,32 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView NSString *sdkVersion = [NSString stringWithFormat:@"%@@%@", sdkPrefix, [Adjust sdkVersion]]; responseCallback(sdkVersion); }]; - + [self.bridgeRegister registerHandler:@"adjust_idfa" handler:^(id data, WVJBResponseCallback responseCallback) { if (responseCallback == nil) { return; } responseCallback([Adjust idfa]); }]; - + + [self.bridgeRegister registerHandler:@"adjust_requestTrackingAuthorization" handler:^(id data, WVJBResponseCallback responseCallback) { + if (responseCallback == nil) { + return; + } + + [Adjust requestTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) { + responseCallback([NSNumber numberWithUnsignedInteger:status]); + }]; + }]; + + [self.bridgeRegister registerHandler:@"adjust_appTrackingAuthorizationStatus" handler:^(id data, WVJBResponseCallback responseCallback) { + if (responseCallback == nil) { + return; + } + + responseCallback([Adjust appTrackingAuthorizationStatus]); + }]; + [self.bridgeRegister registerHandler:@"adjust_adid" handler:^(id data, WVJBResponseCallback responseCallback) { if (responseCallback == nil) { return; diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index 242fd5e1d..ebbc08e2c 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -145,6 +145,16 @@ + (NSString *)adjust_js { if (WebViewJavascriptBridge) { WebViewJavascriptBridge.callHandler('adjust_idfa', null, callback); } + }, + requestTrackingAuthorization: function(callback) { + if (WebViewJavascriptBridge) { + WebViewJavascriptBridge.callHandler('adjust_requestTrackingAuthorization', null, callback); + } + }, + appTrackingAuthorizationStatus: function(callback) { + if (WebViewJavascriptBridge) { + WebViewJavascriptBridge.callHandler('adjust_appTrackingAuthorizationStatus', null, callback); + } }, getAdid: function(callback) { if (WebViewJavascriptBridge) { diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj b/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj index d819ccab8..a047adf8f 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj @@ -59,6 +59,7 @@ 9D75F19A1D07463800E5D222 /* AdjustBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D75F1911D07463800E5D222 /* AdjustBridge.m */; }; 9D9A99DA1D0B699A0022FFCE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D9A99D91D0B699A0022FFCE /* AppDelegate.m */; }; 9DD0E9C41F4587C600B2A759 /* ADJUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DD0E9C31F4587C600B2A759 /* ADJUserDefaults.m */; }; + D79970FA25B05A66008A17E1 /* AppTrackingTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D79970F925B05A66008A17E1 /* AppTrackingTransparency.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -160,6 +161,7 @@ 9D9A99D91D0B699A0022FFCE /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 9DD0E9C21F4587C600B2A759 /* ADJUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUserDefaults.h; sourceTree = ""; }; 9DD0E9C31F4587C600B2A759 /* ADJUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUserDefaults.m; sourceTree = ""; }; + D79970F925B05A66008A17E1 /* AppTrackingTransparency.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppTrackingTransparency.framework; path = System/Library/Frameworks/AppTrackingTransparency.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -172,6 +174,7 @@ 9D1082C81CFDAFF30050568B /* WebKit.framework in Frameworks */, 9D1082CC1CFDAFFB0050568B /* AdSupport.framework in Frameworks */, 9D1083431CFDE29A0050568B /* Foundation.framework in Frameworks */, + D79970FA25B05A66008A17E1 /* AppTrackingTransparency.framework in Frameworks */, 9D10833A1CFDBD9F0050568B /* CoreGraphics.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -184,6 +187,7 @@ children = ( 9D1082A61CFDAF8E0050568B /* AdjustExample-WebView */, 9D1082A51CFDAF8E0050568B /* Products */, + D79970F825B05A66008A17E1 /* Frameworks */, ); sourceTree = ""; }; @@ -349,6 +353,14 @@ path = ../../../AdjustBridge; sourceTree = ""; }; + D79970F825B05A66008A17E1 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D79970F925B05A66008A17E1 /* AppTrackingTransparency.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/AdjustExample-WebView.html b/examples/AdjustExample-WebView/AdjustExample-WebView/AdjustExample-WebView.html index e574eb5fb..16b25301c 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/AdjustExample-WebView.html +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/AdjustExample-WebView.html @@ -138,7 +138,7 @@

Adjust Web View Demo

alert('Is SDK enabled? ' + isEnabled) }) } - + var btnGetIdfa = document.getElementById('btnGetIdfa') btnGetIdfa.onclick = function(e) { e.preventDefault() @@ -146,6 +146,15 @@

Adjust Web View Demo

alert('IDFA\n' + idfa) }) } + + var btnAskTrackingPermission = document.getElementById('btnAskTrackingPermission') + btnAskTrackingPermission.onclick = function(e) { + e.preventDefault() + Adjust.requestTrackingAuthorization(function(status) { + alert('Tracking permission status\n' + status) + }) + } + })
@@ -179,5 +188,8 @@

Adjust Web View Demo

+
+ +
diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/Info.plist b/examples/AdjustExample-WebView/AdjustExample-WebView/Info.plist index 808e18c1f..66b8fc638 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/Info.plist +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/Info.plist @@ -2,6 +2,8 @@ + NSUserTrackingUsageDescription + We need your permission to retrieve IDFA CFBundleDevelopmentRegion en CFBundleExecutable From 9cf042ffc16f501a7ae9f16c155eef0c96c2dcf3 Mon Sep 17 00:00:00 2001 From: rabc Date: Thu, 14 Jan 2021 13:46:37 +0100 Subject: [PATCH 19/42] Document status returns --- Adjust/Adjust.h | 1 + README.md | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/Adjust/Adjust.h b/Adjust/Adjust.h index 6f89a9812..3dfffd669 100644 --- a/Adjust/Adjust.h +++ b/Adjust/Adjust.h @@ -73,6 +73,7 @@ extern NSString * __nonnull const ADJATTAuthorizationStatusNotDetermined; extern NSString * __nonnull const ADJATTAuthorizationStatusRestricted; extern NSString * __nonnull const ADJATTAuthorizationStatusDenied; extern NSString * __nonnull const ADJATTAuthorizationStatusAuthorized; +extern NSString * __nonnull const ADJATTAuthorizationStatusNotAvailable; /** * @brief The main interface to Adjust. diff --git a/README.md b/README.md index f83e50fbf..8f085c402 100644 --- a/README.md +++ b/README.md @@ -337,6 +337,17 @@ To use this wrapper, you can call it as such: }]; ``` +#### Getting the current authorization status + +To get the current app tracking authorization status you can call `[Adjust appTrackingAuthorizationStatus]` that will return one of the following possibilities: + +* `ADJATTAuthorizationStatusNotDetermined`: The user hasn't been asked yet +* `ADJATTAuthorizationStatusRestricted`: The user device is restricted +* `ADJATTAuthorizationStatusDenied`: The user denied the authorization +* `ADJATTAuthorizationStatusAuthorized`: The user authorized +* `ADJATTAuthorizationStatusNotAvailable`: The status is not available + + ###
SKAdNetwork framework If you have implemented the Adjust iOS SDK v4.23.0 or above and your app is running on iOS 14, the communication with SKAdNetwork will be set on by default, although you can choose to turn it off. When set on, Adjust automatically registers for SKAdNetwork attribution when the SDK is initialized. If events are set up in the Adjust dashboard to receive conversion values, the Adjust backend sends the conversion value data to the SDK. The SDK then sets the conversion value. After Adjust receives the SKAdNetwork callback data, it is then displayed in the dashboard. From 90f33265fa98c1c13f450668fe5c0f220453666f Mon Sep 17 00:00:00 2001 From: uerceg Date: Fri, 15 Jan 2021 00:47:56 +0100 Subject: [PATCH 20/42] switch to int type for tracking status --- Adjust/Adjust.h | 13 +++---------- Adjust/Adjust.m | 37 ++----------------------------------- 2 files changed, 5 insertions(+), 45 deletions(-) diff --git a/Adjust/Adjust.h b/Adjust/Adjust.h index 3dfffd669..43ccafad7 100644 --- a/Adjust/Adjust.h +++ b/Adjust/Adjust.h @@ -66,15 +66,6 @@ extern NSString * __nonnull const ADJAdRevenueSourceTapdaq; extern NSString * __nonnull const ADJUrlStrategyIndia; extern NSString * __nonnull const ADJUrlStrategyChina; -/** - * Constants for AppTrackingTransparency authorization status - */ -extern NSString * __nonnull const ADJATTAuthorizationStatusNotDetermined; -extern NSString * __nonnull const ADJATTAuthorizationStatusRestricted; -extern NSString * __nonnull const ADJATTAuthorizationStatusDenied; -extern NSString * __nonnull const ADJATTAuthorizationStatusAuthorized; -extern NSString * __nonnull const ADJATTAuthorizationStatusNotAvailable; - /** * @brief The main interface to Adjust. * @@ -292,6 +283,8 @@ extern NSString * __nonnull const ADJATTAuthorizationStatusNotAvailable; + (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSUInteger status))completion; ++ (int)appTrackingAuthorizationStatus; + /** * Obtain singleton Adjust object. */ @@ -353,6 +346,6 @@ extern NSString * __nonnull const ADJATTAuthorizationStatusNotAvailable; - (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSUInteger status))completion; -+ (nonnull NSString *)appTrackingAuthorizationStatus; +- (int)appTrackingAuthorizationStatus; @end diff --git a/Adjust/Adjust.m b/Adjust/Adjust.m index c8f336218..f91e580d4 100644 --- a/Adjust/Adjust.m +++ b/Adjust/Adjust.m @@ -44,21 +44,6 @@ NSString * const ADJUrlStrategyIndia = @"UrlStrategyIndia"; NSString * const ADJUrlStrategyChina = @"UrlStrategyChina"; -NSString * const ADJATTAuthorizationStatusNotDetermined = @"NotDetermined"; -NSString * const ADJATTAuthorizationStatusRestricted = @"Restricted"; -NSString * const ADJATTAuthorizationStatusDenied = @"Denied"; -NSString * const ADJATTAuthorizationStatusAuthorized = @"Authorized"; -NSString * const ADJATTAuthorizationStatusNotAvailable = @"NotAvailable"; - -// copy from ATTrackingManagerAuthorizationStatus -typedef NS_ENUM(NSInteger, AdjATTrackingManagerAuthorizationStatus) { - AdjATTrackingManagerAuthorizationStatusNotDetermined = 0, - AdjATTrackingManagerAuthorizationStatusRestricted, - AdjATTrackingManagerAuthorizationStatusDenied, - AdjATTrackingManagerAuthorizationStatusAuthorized -}; - - @implementation AdjustTestOptions @end @@ -259,26 +244,8 @@ + (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSU } } -+ (NSString *)appTrackingAuthorizationStatus { - int status = [[UIDevice currentDevice] adjATTStatus]; - - switch (status) { - case AdjATTrackingManagerAuthorizationStatusAuthorized: - return ADJATTAuthorizationStatusAuthorized; - break; - case AdjATTrackingManagerAuthorizationStatusDenied: - return ADJATTAuthorizationStatusDenied; - break; - case AdjATTrackingManagerAuthorizationStatusRestricted: - return ADJATTAuthorizationStatusRestricted; - break; - case AdjATTrackingManagerAuthorizationStatusNotDetermined: - return ADJATTAuthorizationStatusNotDetermined; - break; - default: - return ADJATTAuthorizationStatusNotAvailable; - break; - } ++ (int)appTrackingAuthorizationStatus { + return [[UIDevice currentDevice] adjATTStatus]; } + (ADJAttribution *)attribution { From 6483b1516f3f19a5a284d9647b3eae1da9d4f60d Mon Sep 17 00:00:00 2001 From: uerceg Date: Fri, 15 Jan 2021 00:48:32 +0100 Subject: [PATCH 21/42] add authorisation request Info.plist entry to Obj-C example app --- examples/AdjustExample-ObjC/AdjustExample-ObjC/Info.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/AdjustExample-ObjC/AdjustExample-ObjC/Info.plist b/examples/AdjustExample-ObjC/AdjustExample-ObjC/Info.plist index c90a93cf6..b702e0a95 100644 --- a/examples/AdjustExample-ObjC/AdjustExample-ObjC/Info.plist +++ b/examples/AdjustExample-ObjC/AdjustExample-ObjC/Info.plist @@ -2,6 +2,8 @@ + NSUserTrackingUsageDescription + We need your permission to retrieve IDFA. CFBundleDevelopmentRegion en CFBundleExecutable From 559a7ed5d9194700584d328638f90fcbaea52205 Mon Sep 17 00:00:00 2001 From: uerceg Date: Fri, 15 Jan 2021 01:06:21 +0100 Subject: [PATCH 22/42] fix web brdige to expect authorization status as integer --- AdjustBridge/AdjustBridge.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index a529cd4cf..3210f536c 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -436,7 +436,7 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView return; } - responseCallback([Adjust appTrackingAuthorizationStatus]); + responseCallback([NSNumber numberWithInt:[Adjust appTrackingAuthorizationStatus]]); }]; [self.bridgeRegister registerHandler:@"adjust_adid" handler:^(id data, WVJBResponseCallback responseCallback) { From b05f23271f74b350c71f0ba8a3802f4e45846541 Mon Sep 17 00:00:00 2001 From: uerceg Date: Fri, 15 Jan 2021 01:07:25 +0100 Subject: [PATCH 23/42] fix broken JavaScript alert method inside of the WKWebView --- .../AdjustExample-WebView/WKWebViewController.h | 2 +- .../AdjustExample-WebView/WKWebViewController.m | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.h b/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.h index 5ac43082b..5f025a877 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.h +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.h @@ -11,7 +11,7 @@ #import "AdjustBridge.h" -@interface WKWebViewController : UINavigationController +@interface WKWebViewController : UINavigationController @property AdjustBridge *adjustBridge; diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.m b/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.m index 7dc840bbb..e01cdca9b 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.m +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.m @@ -29,6 +29,7 @@ - (void)didReceiveMemoryWarning { - (void)loadWKWebView { WKWebView *webView = [[NSClassFromString(@"WKWebView") alloc] initWithFrame:self.view.bounds]; webView.navigationDelegate = self; + webView.UIDelegate = self; [self.view addSubview:webView]; _adjustBridge = [[AdjustBridge alloc] init]; @@ -44,4 +45,16 @@ - (void)callWkHandler:(id)sender { } +- (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler { + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:message + message:nil + preferredStyle:UIAlertControllerStyleAlert]; + [alertController addAction:[UIAlertAction actionWithTitle:@"OK" + style:UIAlertActionStyleCancel + handler:^(UIAlertAction *action) { + completionHandler(); + }]]; + [self presentViewController:alertController animated:YES completion:^{}]; +} + @end From 91d6996b4dfd37242908df1d220a340d2fe07c95 Mon Sep 17 00:00:00 2001 From: uerceg Date: Fri, 15 Jan 2021 01:11:27 +0100 Subject: [PATCH 24/42] rename web bridge att status methods --- AdjustBridge/AdjustBridge.m | 2 +- AdjustBridge/AdjustBridgeRegister.m | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index 3210f536c..a9e6d3e63 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -421,7 +421,7 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView responseCallback([Adjust idfa]); }]; - [self.bridgeRegister registerHandler:@"adjust_requestTrackingAuthorization" handler:^(id data, WVJBResponseCallback responseCallback) { + [self.bridgeRegister registerHandler:@"adjust_requestTrackingAuthorizationWithCompletionHandler" handler:^(id data, WVJBResponseCallback responseCallback) { if (responseCallback == nil) { return; } diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index ebbc08e2c..8f6643e80 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -146,12 +146,12 @@ + (NSString *)adjust_js { WebViewJavascriptBridge.callHandler('adjust_idfa', null, callback); } }, - requestTrackingAuthorization: function(callback) { + requestTrackingAuthorizationWithCompletionHandler: function(callback) { if (WebViewJavascriptBridge) { - WebViewJavascriptBridge.callHandler('adjust_requestTrackingAuthorization', null, callback); + WebViewJavascriptBridge.callHandler('adjust_requestTrackingAuthorizationWithCompletionHandler', null, callback); } }, - appTrackingAuthorizationStatus: function(callback) { + getAppTrackingAuthorizationStatus: function(callback) { if (WebViewJavascriptBridge) { WebViewJavascriptBridge.callHandler('adjust_appTrackingAuthorizationStatus', null, callback); } From 80ac9ee7db4724532d6afe61f58605d8be69f40f Mon Sep 17 00:00:00 2001 From: uerceg Date: Fri, 15 Jan 2021 01:17:39 +0100 Subject: [PATCH 25/42] update authorisation status getter README chapter --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8f085c402..58066cfce 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Read this in other languages: [English][en-readme], [中文][zh-readme], [日本 * [Additional features](#additional-features) * [AppTrackingTransparency framework](#att-framework) * [App-tracking authorisation wrapper](#ata-wrapper) + * [Get current authorisation status](#ata-getter) * [SKAdNetwork framework](#skadn-framework) * [Event tracking](#event-tracking) * [Revenue tracking](#revenue-tracking) @@ -337,15 +338,15 @@ To use this wrapper, you can call it as such: }]; ``` -#### Getting the current authorization status +### Get current authorisation status To get the current app tracking authorization status you can call `[Adjust appTrackingAuthorizationStatus]` that will return one of the following possibilities: -* `ADJATTAuthorizationStatusNotDetermined`: The user hasn't been asked yet -* `ADJATTAuthorizationStatusRestricted`: The user device is restricted -* `ADJATTAuthorizationStatusDenied`: The user denied the authorization -* `ADJATTAuthorizationStatusAuthorized`: The user authorized -* `ADJATTAuthorizationStatusNotAvailable`: The status is not available +* `0`: The user hasn't been asked yet +* `1`: The user device is restricted +* `2`: The user denied access to IDFA +* `3`: The user authorized access to IDFA +* `-1`: The status is not available ### SKAdNetwork framework From 3be7c4bcafdfbe4af38f6f4b81b58326cf6925bf Mon Sep 17 00:00:00 2001 From: uerceg Date: Fri, 15 Jan 2021 01:22:03 +0100 Subject: [PATCH 26/42] add synchronisation and distinction between static and instance att_status getter --- Adjust/Adjust.m | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Adjust/Adjust.m b/Adjust/Adjust.m index f91e580d4..c9e2fa962 100644 --- a/Adjust/Adjust.m +++ b/Adjust/Adjust.m @@ -237,15 +237,16 @@ + (void)trackSubscription:(nonnull ADJSubscription *)subscription { } } -+ (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSUInteger status))completion -{ ++ (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSUInteger status))completion { @synchronized (self) { [[Adjust getInstance] requestTrackingAuthorizationWithCompletionHandler:completion]; } } + (int)appTrackingAuthorizationStatus { - return [[UIDevice currentDevice] adjATTStatus]; + @synchronized (self) { + return [[Adjust getInstance] appTrackingAuthorizationStatus]; + } } + (ADJAttribution *)attribution { @@ -510,10 +511,8 @@ - (void)trackSubscription:(ADJSubscription *)subscription { [self.activityHandler trackSubscription:subscription]; } -- (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSUInteger status))completion -{ - [UIDevice.currentDevice requestTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) - { +- (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSUInteger status))completion { + [UIDevice.currentDevice requestTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) { if (completion) { completion(status); } @@ -526,6 +525,10 @@ - (void)requestTrackingAuthorizationWithCompletionHandler:(void (^_Nullable)(NSU }]; } +- (int)appTrackingAuthorizationStatus { + return [[UIDevice currentDevice] adjATTStatus]; +} + - (ADJAttribution *)attribution { if (![self checkActivityHandler]) { return nil; From 1c9d92e99dcaf0213f8ac15ea693966cf5395190 Mon Sep 17 00:00:00 2001 From: nonelse Date: Thu, 3 Dec 2020 14:47:29 +0100 Subject: [PATCH 27/42] Initial tps and mc functionality --- Adjust/ADJActivityHandler.h | 3 + Adjust/ADJActivityHandler.m | 92 ++++++++++++++++ Adjust/ADJActivityKind.h | 4 +- Adjust/ADJActivityKind.m | 8 ++ Adjust/ADJPackageBuilder.h | 5 + Adjust/ADJPackageBuilder.m | 197 ++++++++++++++++++++++++++++++++++ Adjust/ADJThirdPartySharing.h | 17 +++ Adjust/ADJThirdPartySharing.m | 48 +++++++++ Adjust/Adjust.h | 5 + Adjust/Adjust.m | 28 +++++ 10 files changed, 406 insertions(+), 1 deletion(-) create mode 100644 Adjust/ADJThirdPartySharing.h create mode 100644 Adjust/ADJThirdPartySharing.m diff --git a/Adjust/ADJActivityHandler.h b/Adjust/ADJActivityHandler.h index 0ceacbb1c..76d28ee2d 100644 --- a/Adjust/ADJActivityHandler.h +++ b/Adjust/ADJActivityHandler.h @@ -11,6 +11,7 @@ #import "ADJActivityState.h" #import "ADJDeviceInfo.h" #import "ADJSessionParameters.h" +#import "ADJThirdPartySharing.h" @interface ADJInternalState : NSObject @@ -102,6 +103,8 @@ - (void)resetSessionPartnerParameters; - (void)trackAdRevenue:(NSString *)soruce payload:(NSData *)payload; - (void)disableThirdPartySharing; +- (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing; +- (void)trackMeasurementConsent:(BOOL)enabled; - (void)trackSubscription:(ADJSubscription *)subscription; - (void)updateAttStatusFromUserCallback:(int)newAttStatusFromUser; diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index a823d8999..0b8bbb95d 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -734,6 +734,22 @@ - (void)disableThirdPartySharing { }]; } +- (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing { + [ADJUtil launchInQueue:self.internalQueue + selfInject:self + block:^(ADJActivityHandler * selfI) { + [selfI trackThirdPartySharingI:selfI thirdPartySharing:thirdPartySharing]; + }]; +} + +- (void)trackMeasurementConsent:(BOOL)enabled { + [ADJUtil launchInQueue:self.internalQueue + selfInject:self + block:^(ADJActivityHandler * selfI) { + [selfI trackMeasurementConsentI:selfI enabled:enabled]; + }]; +} + - (void)writeActivityState { [ADJUtil launchInQueue:self.internalQueue selfInject:self @@ -1329,6 +1345,82 @@ - (void)disableThirdPartySharingI:(ADJActivityHandler *)selfI { } } +- (void)trackThirdPartySharingI:(ADJActivityHandler *)selfI + thirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing +{ + if (!selfI.activityState) { + return; + } + if (![selfI isEnabledI:selfI]) { + return; + } + if (selfI.activityState.isGdprForgotten) { + return; + } + if (selfI.activityState.isThirdPartySharingDisabled) { + return; + } + + double now = [NSDate.date timeIntervalSince1970]; + + // build package + ADJPackageBuilder *tpsBuilder = [[ADJPackageBuilder alloc] + initWithDeviceInfo:selfI.deviceInfo + activityState:selfI.activityState + config:selfI.adjustConfig + sessionParameters:selfI.sessionParameters + trackingStatusManager:self.trackingStatusManager + createdAt:now]; + + ADJActivityPackage *dtpsPackage = [tpsBuilder buildThirdPartySharingPackage:thirdPartySharing]; + + [selfI.packageHandler addPackage:dtpsPackage]; + + if (selfI.adjustConfig.eventBufferingEnabled) { + [selfI.logger info:@"Buffered event %@", dtpsPackage.suffix]; + } else { + [selfI.packageHandler sendFirstPackage]; + } +} + +- (void)trackMeasurementConsentI:(ADJActivityHandler *)selfI + enabled:(BOOL)enabled +{ + if (!selfI.activityState) { + return; + } + if (![selfI isEnabledI:selfI]) { + return; + } + if (selfI.activityState.isGdprForgotten) { + return; + } + if (selfI.activityState.isThirdPartySharingDisabled) { + return; + } + + double now = [NSDate.date timeIntervalSince1970]; + + // build package + ADJPackageBuilder *tpsBuilder = [[ADJPackageBuilder alloc] + initWithDeviceInfo:selfI.deviceInfo + activityState:selfI.activityState + config:selfI.adjustConfig + sessionParameters:selfI.sessionParameters + trackingStatusManager:self.trackingStatusManager + createdAt:now]; + + ADJActivityPackage *mcPackage = [tpsBuilder buildMeasurementConsent:enabled]; + + [selfI.packageHandler addPackage:mcPackage]; + + if (selfI.adjustConfig.eventBufferingEnabled) { + [selfI.logger info:@"Buffered event %@", mcPackage.suffix]; + } else { + [selfI.packageHandler sendFirstPackage]; + } +} + - (void)launchEventResponseTasksI:(ADJActivityHandler *)selfI eventResponseData:(ADJEventResponseData *)eventResponseData { [selfI updateAdidI:selfI adid:eventResponseData.adid]; diff --git a/Adjust/ADJActivityKind.h b/Adjust/ADJActivityKind.h index 1f83c99d0..c7867fec9 100644 --- a/Adjust/ADJActivityKind.h +++ b/Adjust/ADJActivityKind.h @@ -23,7 +23,9 @@ typedef NS_ENUM(int, ADJActivityKind) { ADJActivityKindGdpr = 7, ADJActivityKindAdRevenue = 8, ADJActivityKindDisableThirdPartySharing = 9, - ADJActivityKindSubscription = 10 + ADJActivityKindSubscription = 10, + ADJActivityKindThirdPartySharing = 11, + ADJActivityKindMeasurementConsent = 12 }; @interface ADJActivityKindUtil : NSObject diff --git a/Adjust/ADJActivityKind.m b/Adjust/ADJActivityKind.m index 7c8cb862d..fe6bb5b03 100644 --- a/Adjust/ADJActivityKind.m +++ b/Adjust/ADJActivityKind.m @@ -31,6 +31,10 @@ + (ADJActivityKind)activityKindFromString:(NSString *)activityKindString { return ADJActivityKindDisableThirdPartySharing; } else if ([@"subscription" isEqualToString:activityKindString]) { return ADJActivityKindSubscription; + } else if ([@"third_party_sharing" isEqualToString:activityKindString]) { + return ADJActivityKindThirdPartySharing; + } else if ([@"measurement_consent" isEqualToString:activityKindString]) { + return ADJActivityKindMeasurementConsent; } else { return ADJActivityKindUnknown; } @@ -56,6 +60,10 @@ + (NSString *)activityKindToString:(ADJActivityKind)activityKind { return @"disable_third_party_sharing"; case ADJActivityKindSubscription: return @"subscription"; + case ADJActivityKindThirdPartySharing: + return @"third_party_sharing"; + case ADJActivityKindMeasurementConsent: + return @"measurement_consent"; default: return @"unknown"; } diff --git a/Adjust/ADJPackageBuilder.h b/Adjust/ADJPackageBuilder.h index ca3935bff..36a0ee0c9 100644 --- a/Adjust/ADJPackageBuilder.h +++ b/Adjust/ADJPackageBuilder.h @@ -14,6 +14,7 @@ #import "ADJSessionParameters.h" #import #import "ADJActivityHandler.h" +#import "ADJThirdPartySharing.h" @interface ADJPackageBuilder : NSObject @@ -55,6 +56,10 @@ - (ADJActivityPackage *)buildDisableThirdPartySharingPackage; +- (ADJActivityPackage *)buildThirdPartySharingPackage:(nonnull ADJThirdPartySharing *)thirdPartySharing; + +- (ADJActivityPackage *)buildMeasurementConsent:(BOOL)enabled; + - (ADJActivityPackage *)buildSubscriptionPackage:(ADJSubscription *)subscription isInDelay:(BOOL)isInDelay; diff --git a/Adjust/ADJPackageBuilder.m b/Adjust/ADJPackageBuilder.m index aabbebe98..febd202e5 100644 --- a/Adjust/ADJPackageBuilder.m +++ b/Adjust/ADJPackageBuilder.m @@ -195,6 +195,33 @@ - (ADJActivityPackage *)buildDisableThirdPartySharingPackage { return dtpsPackage; } + +- (ADJActivityPackage *)buildThirdPartySharingPackage:(nonnull ADJThirdPartySharing *)thirdPartySharing { + NSMutableDictionary *parameters = [self getThirdPartySharingParameters:thirdPartySharing]; + ADJActivityPackage *tpsPackage = [self defaultActivityPackage]; + tpsPackage.path = @"/third_party_sharing"; + tpsPackage.activityKind = ADJActivityKindThirdPartySharing; + tpsPackage.suffix = @""; + tpsPackage.parameters = parameters; + + [self signWithSigV2Plugin:tpsPackage]; + + return tpsPackage; +} + +- (ADJActivityPackage *)buildMeasurementConsent:(BOOL)enabled { + NSMutableDictionary *parameters = [self getMeasurementConsentParameters:enabled]; + ADJActivityPackage *mcPackage = [self defaultActivityPackage]; + mcPackage.path = @"/measurement_consent"; + mcPackage.activityKind = ADJActivityKindThirdPartySharing; + mcPackage.suffix = @""; + mcPackage.parameters = parameters; + + [self signWithSigV2Plugin:mcPackage]; + + return mcPackage; +} + - (ADJActivityPackage *)buildSubscriptionPackage:(ADJSubscription *)subscription isInDelay:(BOOL)isInDelay { NSMutableDictionary *parameters = [self getSubscriptionParameters:isInDelay forSubscriptionPackage:subscription]; @@ -914,6 +941,176 @@ - (NSMutableDictionary *)getDisableThirdPartySharingParameters { return parameters; } +- (NSMutableDictionary *)getThirdPartySharingParameters:(nonnull ADJThirdPartySharing *)thirdPartySharing { + NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; + + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.appSecret forKey:@"app_secret"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.appToken forKey:@"app_token"]; + [ADJPackageBuilder parameters:parameters setString:[ADJUtil getUpdateTime] forKey:@"app_updated_at"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.bundleVersion forKey:@"app_version"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.bundleShortVersion forKey:@"app_version_short"]; + [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"attribution_deeplink"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.bundeIdentifier forKey:@"bundle_id"]; + [ADJPackageBuilder parameters:parameters setDictionary:[self.sessionParameters.callbackParameters copy] forKey:@"callback_params"]; + [ADJPackageBuilder parameters:parameters setDate:self.clickTime forKey:@"click_time"]; + [ADJPackageBuilder parameters:parameters setNumberInt:[ADJUtil readReachabilityFlags] forKey:@"connectivity_type"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.countryCode forKey:@"country"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.cpuSubtype forKey:@"cpu_type"]; + [ADJPackageBuilder parameters:parameters setDate1970:self.createdAt forKey:@"created_at"]; + [ADJPackageBuilder parameters:parameters setString:self.deeplink forKey:@"deeplink"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.defaultTracker forKey:@"default_tracker"]; + [ADJPackageBuilder parameters:parameters setDictionary:self.attributionDetails forKey:@"details"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.deviceName forKey:@"device_name"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.deviceType forKey:@"device_type"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; + [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.fbAnonymousId forKey:@"fb_anon_id"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.machineModel forKey:@"hardware_name"]; + if (self.adjustConfig.allowIdfaReading == YES) { + [ADJPackageBuilder parameters:parameters setString:UIDevice.currentDevice.adjIdForAdvertisers forKey:@"idfa"]; + } + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.vendorId forKey:@"idfv"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.installReceiptBase64 forKey:@"install_receipt"]; + [ADJPackageBuilder parameters:parameters setString:[ADJUtil getInstallTime] forKey:@"installed_at"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.languageCode forKey:@"language"]; + [ADJPackageBuilder parameters:parameters setString:[[UIDevice currentDevice] adjDeviceId:_deviceInfo] forKey:@"m"]; + [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.osBuild forKey:@"os_build"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.osName forKey:@"os_name"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.systemVersion forKey:@"os_version"]; + [ADJPackageBuilder parameters:parameters setDictionary:self.deeplinkParameters forKey:@"params"]; + [ADJPackageBuilder parameters:parameters setDictionary:[self.sessionParameters.partnerParameters copy] forKey:@"partner_params"]; + [ADJPackageBuilder parameters:parameters setDate:self.purchaseTime forKey:@"purchase_time"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.secretId forKey:@"secret_id"]; + + // Third Party Sharing + if (thirdPartySharing.enable != nil) { + NSString *enableValue = thirdPartySharing.enable.boolValue ? @"enable" : @"disable"; + [ADJPackageBuilder parameters:parameters setString:enableValue forKey:@"sharing"]; + } + [ADJPackageBuilder parameters:parameters + setDictionaryJson:thirdPartySharing.granularOptions + forKey:@"granular_third_party_sharing_options"]; + + if ([self.trackingStatusManager canGetAttStatus]) { + [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus + forKey:@"att_status"]; + } else { + [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.trackingEnabled + forKey:@"tracking_enabled"]; + } + + if (self.adjustConfig.isDeviceKnown) { + [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; + } + + if (self.activityState != nil) { + [ADJPackageBuilder parameters:parameters setDuration:self.activityState.lastInterval forKey:@"last_interval"]; + [ADJPackageBuilder parameters:parameters setString:self.activityState.deviceToken forKey:@"push_token"]; + [ADJPackageBuilder parameters:parameters setInt:self.activityState.sessionCount forKey:@"session_count"]; + [ADJPackageBuilder parameters:parameters setDuration:self.activityState.sessionLength forKey:@"session_length"]; + [ADJPackageBuilder parameters:parameters setInt:self.activityState.subsessionCount forKey:@"subsession_count"]; + [ADJPackageBuilder parameters:parameters setDuration:self.activityState.timeSpent forKey:@"time_spent"]; + if (self.activityState.isPersisted) { + [ADJPackageBuilder parameters:parameters setString:self.activityState.uuid forKey:@"persistent_ios_uuid"]; + } else { + [ADJPackageBuilder parameters:parameters setString:self.activityState.uuid forKey:@"ios_uuid"]; + } + } + +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST + [ADJPackageBuilder parameters:parameters setString:[ADJUtil readMCC] forKey:@"mcc"]; + [ADJPackageBuilder parameters:parameters setString:[ADJUtil readMNC] forKey:@"mnc"]; + [ADJPackageBuilder parameters:parameters setString:[ADJUtil readCurrentRadioAccessTechnology] forKey:@"network_type"]; +#endif + + return parameters; +} + +- (NSMutableDictionary *)getMeasurementConsentParameters:(BOOL)enabled { + NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; + + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.appSecret forKey:@"app_secret"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.appToken forKey:@"app_token"]; + [ADJPackageBuilder parameters:parameters setString:[ADJUtil getUpdateTime] forKey:@"app_updated_at"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.bundleVersion forKey:@"app_version"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.bundleShortVersion forKey:@"app_version_short"]; + [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"attribution_deeplink"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.bundeIdentifier forKey:@"bundle_id"]; + [ADJPackageBuilder parameters:parameters setDictionary:[self.sessionParameters.callbackParameters copy] forKey:@"callback_params"]; + [ADJPackageBuilder parameters:parameters setDate:self.clickTime forKey:@"click_time"]; + [ADJPackageBuilder parameters:parameters setNumberInt:[ADJUtil readReachabilityFlags] forKey:@"connectivity_type"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.countryCode forKey:@"country"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.cpuSubtype forKey:@"cpu_type"]; + [ADJPackageBuilder parameters:parameters setDate1970:self.createdAt forKey:@"created_at"]; + [ADJPackageBuilder parameters:parameters setString:self.deeplink forKey:@"deeplink"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.defaultTracker forKey:@"default_tracker"]; + [ADJPackageBuilder parameters:parameters setDictionary:self.attributionDetails forKey:@"details"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.deviceName forKey:@"device_name"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.deviceType forKey:@"device_type"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; + [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.fbAnonymousId forKey:@"fb_anon_id"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.machineModel forKey:@"hardware_name"]; + if (self.adjustConfig.allowIdfaReading == YES) { + [ADJPackageBuilder parameters:parameters setString:UIDevice.currentDevice.adjIdForAdvertisers forKey:@"idfa"]; + } + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.vendorId forKey:@"idfv"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.installReceiptBase64 forKey:@"install_receipt"]; + [ADJPackageBuilder parameters:parameters setString:[ADJUtil getInstallTime] forKey:@"installed_at"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.languageCode forKey:@"language"]; + [ADJPackageBuilder parameters:parameters setString:[[UIDevice currentDevice] adjDeviceId:_deviceInfo] forKey:@"m"]; + [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.osBuild forKey:@"os_build"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.osName forKey:@"os_name"]; + [ADJPackageBuilder parameters:parameters setString:self.deviceInfo.systemVersion forKey:@"os_version"]; + [ADJPackageBuilder parameters:parameters setDictionary:self.deeplinkParameters forKey:@"params"]; + [ADJPackageBuilder parameters:parameters setDictionary:[self.sessionParameters.partnerParameters copy] forKey:@"partner_params"]; + [ADJPackageBuilder parameters:parameters setDate:self.purchaseTime forKey:@"purchase_time"]; + [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.secretId forKey:@"secret_id"]; + + // Measurement Consent + NSString *enableValue = enabled ? @"enable" : @"disable"; + [ADJPackageBuilder parameters:parameters + setString:enableValue + forKey:@"sharing"]; + + if ([self.trackingStatusManager canGetAttStatus]) { + [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus + forKey:@"att_status"]; + } else { + [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.trackingEnabled + forKey:@"tracking_enabled"]; + } + + if (self.adjustConfig.isDeviceKnown) { + [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; + } + + if (self.activityState != nil) { + [ADJPackageBuilder parameters:parameters setDuration:self.activityState.lastInterval forKey:@"last_interval"]; + [ADJPackageBuilder parameters:parameters setString:self.activityState.deviceToken forKey:@"push_token"]; + [ADJPackageBuilder parameters:parameters setInt:self.activityState.sessionCount forKey:@"session_count"]; + [ADJPackageBuilder parameters:parameters setDuration:self.activityState.sessionLength forKey:@"session_length"]; + [ADJPackageBuilder parameters:parameters setInt:self.activityState.subsessionCount forKey:@"subsession_count"]; + [ADJPackageBuilder parameters:parameters setDuration:self.activityState.timeSpent forKey:@"time_spent"]; + if (self.activityState.isPersisted) { + [ADJPackageBuilder parameters:parameters setString:self.activityState.uuid forKey:@"persistent_ios_uuid"]; + } else { + [ADJPackageBuilder parameters:parameters setString:self.activityState.uuid forKey:@"ios_uuid"]; + } + } + +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST + [ADJPackageBuilder parameters:parameters setString:[ADJUtil readMCC] forKey:@"mcc"]; + [ADJPackageBuilder parameters:parameters setString:[ADJUtil readMNC] forKey:@"mnc"]; + [ADJPackageBuilder parameters:parameters setString:[ADJUtil readCurrentRadioAccessTechnology] forKey:@"network_type"]; +#endif + + return parameters; +} - (NSMutableDictionary *)getSubscriptionParameters:(BOOL)isInDelay forSubscriptionPackage:(ADJSubscription *)subscription { NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; diff --git a/Adjust/ADJThirdPartySharing.h b/Adjust/ADJThirdPartySharing.h new file mode 100644 index 000000000..cb827982d --- /dev/null +++ b/Adjust/ADJThirdPartySharing.h @@ -0,0 +1,17 @@ +// +// ADJThirdPartySharing.h +// AdjustSdk +// +// Created by Pedro S. on 02.12.20. +// Copyright © 2020 adjust GmbH. All rights reserved. +// + +#import + +@interface ADJThirdPartySharing : NSObject + +@property (nonatomic, strong) NSNumber *enable; +@property (nonatomic, strong) NSMutableDictionary *granularOptions; + +@end + diff --git a/Adjust/ADJThirdPartySharing.m b/Adjust/ADJThirdPartySharing.m new file mode 100644 index 000000000..b616919ce --- /dev/null +++ b/Adjust/ADJThirdPartySharing.m @@ -0,0 +1,48 @@ +// +// ADJThirdPartySharing.m +// AdjustSdk +// +// Created by Pedro S. on 02.12.20. +// Copyright © 2020 adjust GmbH. All rights reserved. +// + +#import "ADJThirdPartySharing.h" + +@interface ADJThirdPartySharing () @end + +@implementation ADJThirdPartySharing + +- (id)init { + self = [super init]; + if (self == nil) { + return nil; + } + + _granularOptions = [[NSMutableDictionary alloc] init]; + _enable = nil; + + return self; +} + +- (void)addGranularOption:(NSString *)partnerName + key:(NSString *)key + value:(NSString *)value +{ + NSMutableDictionary *partnerOptions = [granularOptions objectForKey:partnerName]; + if (partnerOptions == nil) { + partnerOptions = [[NSMutableDictionary alloc] init]; + [granularOptions setObject:partnerOptions forKey:partnerName]; + } + + [partnerOptions setObject:value forKey:key]; +} + +- (void)enableThirdPartySharing { + self.enable = [NSNumber numberWithBool:YES]; +} + +- (void)diableThirdPartySharing { + self.enable = [NSNumber numberWithBool:NO]; +} + +@end diff --git a/Adjust/Adjust.h b/Adjust/Adjust.h index 43ccafad7..7673dc68c 100644 --- a/Adjust/Adjust.h +++ b/Adjust/Adjust.h @@ -11,6 +11,7 @@ #import "ADJConfig.h" #import "ADJAttribution.h" #import "ADJSubscription.h" +#import "ADJThirdPartySharing.h" @interface AdjustTestOptions : NSObject @@ -274,6 +275,10 @@ extern NSString * __nonnull const ADJUrlStrategyChina; */ + (void)disableThirdPartySharing; ++ (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing; + ++ (void)trackMeasurementConsent:(BOOL)enabled; + /** * @brief Track subscription. * diff --git a/Adjust/Adjust.m b/Adjust/Adjust.m index c9e2fa962..f3770433e 100644 --- a/Adjust/Adjust.m +++ b/Adjust/Adjust.m @@ -231,6 +231,18 @@ + (void)disableThirdPartySharing { } } ++ (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing { + @synchronized (self) { + [[Adjust getInstance] trackThirdPartySharing:thirdPartySharing]; + } +} + ++ (void)trackMeasurementConsent:(BOOL)enabled { + @synchronized (self) { + [[Adjust getInstance] trackMeasurementConsent:enabled]; + } +} + + (void)trackSubscription:(nonnull ADJSubscription *)subscription { @synchronized (self) { [[Adjust getInstance] trackSubscription:subscription]; @@ -503,6 +515,22 @@ - (void)disableThirdPartySharing { [self.activityHandler disableThirdPartySharing]; } +- (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing { + if (![self checkActivityHandler]) { + return; + } + + [self.activityHandler trackThirdPartySharing:thirdPartySharing]; +} + +- (void)trackMeasurementConsent:(BOOL)enabled { + if (![self checkActivityHandler]) { + return; + } + + [self.activityHandler trackMeasurementConsent:enabled]; +} + - (void)trackSubscription:(ADJSubscription *)subscription { if (![self checkActivityHandler]) { return; From b3eb884c81c91e5994165e93fe33239038948342 Mon Sep 17 00:00:00 2001 From: nonelse Date: Fri, 15 Jan 2021 12:10:23 +0100 Subject: [PATCH 28/42] Change third party sharing init --- Adjust.xcodeproj/project.pbxproj | 8 ++++++++ Adjust/ADJThirdPartySharing.h | 10 ++++++++-- Adjust/ADJThirdPartySharing.m | 32 +++++++++++++++----------------- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/Adjust.xcodeproj/project.pbxproj b/Adjust.xcodeproj/project.pbxproj index 48f1b1ec7..c0b7e3dd3 100644 --- a/Adjust.xcodeproj/project.pbxproj +++ b/Adjust.xcodeproj/project.pbxproj @@ -23,6 +23,8 @@ /* Begin PBXBuildFile section */ 2067002A1F18BDC700B4FDE1 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9601C19C1A31DD7F00A9AE21 /* CoreTelephony.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 6FBE0C6E2577CDAC00EC2CE0 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FBE0C6C2577CDAC00EC2CE0 /* ADJThirdPartySharing.h */; }; + 6FBE0C6F2577CDAC00EC2CE0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBE0C6D2577CDAC00EC2CE0 /* ADJThirdPartySharing.m */; }; 6FBEE92624E422EB00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE92424E422EB00FEF3F1 /* ADJUrlStrategy.m */; }; 6FBEE92724E422EB00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE92424E422EB00FEF3F1 /* ADJUrlStrategy.m */; }; 6FBEE92824E422EB00FEF3F1 /* ADJUrlStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FBEE92524E422EB00FEF3F1 /* ADJUrlStrategy.h */; }; @@ -611,6 +613,8 @@ 6F0842182007766700568A31 /* AdjustTestLibrary.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustTestLibrary.xcodeproj; path = AdjustTestLibrary/AdjustTestLibrary.xcodeproj; sourceTree = ""; }; 6F084240200776A000568A31 /* AdjustTestApp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustTestApp.xcodeproj; path = AdjustTestApp/AdjustTestApp.xcodeproj; sourceTree = ""; }; 6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustWebBridgeTestApp.xcodeproj; path = AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj; sourceTree = ""; }; + 6FBE0C6C2577CDAC00EC2CE0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; + 6FBE0C6D2577CDAC00EC2CE0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; 6FBEE8F124E2C26F00FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; 6FBEE8F224E2C26F00FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; 6FBEE92424E422EB00FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; @@ -1773,6 +1777,8 @@ 9D2F23F62447DCE800B7CA90 /* ADJSubscription.m */, 6FBEE92524E422EB00FEF3F1 /* ADJUrlStrategy.h */, 6FBEE92424E422EB00FEF3F1 /* ADJUrlStrategy.m */, + 6FBE0C6C2577CDAC00EC2CE0 /* ADJThirdPartySharing.h */, + 6FBE0C6D2577CDAC00EC2CE0 /* ADJThirdPartySharing.m */, ); path = Adjust; sourceTree = SOURCE_ROOT; @@ -2052,6 +2058,7 @@ 9DF9C9151D6F3CA5008E362F /* UIDevice+ADJAdditions.h in Headers */, 9DF9C9091D6F3CA5008E362F /* ADJActivityHandler.h in Headers */, 9DF9C90B1D6F3CA5008E362F /* ADJActivityKind.h in Headers */, + 6FBE0C6E2577CDAC00EC2CE0 /* ADJThirdPartySharing.h in Headers */, 9DF9C90D1D6F3CA5008E362F /* ADJActivityPackage.h in Headers */, 9DF9C90F1D6F3CA5008E362F /* ADJActivityState.h in Headers */, 9DF9C9171D6F3CA5008E362F /* ADJAdjustFactory.h in Headers */, @@ -2770,6 +2777,7 @@ 9DF9C9101D6F3CA5008E362F /* ADJActivityState.m in Sources */, 9DF9C9181D6F3CA5008E362F /* ADJAdjustFactory.m in Sources */, 9DF9C92C1D6F3CA5008E362F /* ADJLogger.m in Sources */, + 6FBE0C6F2577CDAC00EC2CE0 /* ADJThirdPartySharing.m in Sources */, 9DF9C92E1D6F3CA5008E362F /* ADJPackageBuilder.m in Sources */, 9DF9C9301D6F3CA5008E362F /* ADJPackageHandler.m in Sources */, 6FCC85051F27946100D6A0ED /* ADJReachability.m in Sources */, diff --git a/Adjust/ADJThirdPartySharing.h b/Adjust/ADJThirdPartySharing.h index cb827982d..2ec111c42 100644 --- a/Adjust/ADJThirdPartySharing.h +++ b/Adjust/ADJThirdPartySharing.h @@ -10,8 +10,14 @@ @interface ADJThirdPartySharing : NSObject -@property (nonatomic, strong) NSNumber *enable; -@property (nonatomic, strong) NSMutableDictionary *granularOptions; +- (nullable id)initWithEnableOrElseDisableNumberBool:(nullable NSNumber *)enableOrElseDisableNumberBool; + +- (void)addGranularOption:(nonnull NSString *)partnerName + key:(nonnull NSString *)key + value:(nonnull NSString *)value; + +@property (nonatomic, nullable, readonly, strong) NSNumber *enable; +@property (nonatomic, nonnull, readonly, strong) NSMutableDictionary *granularOptions; @end diff --git a/Adjust/ADJThirdPartySharing.m b/Adjust/ADJThirdPartySharing.m index b616919ce..a175f5a0c 100644 --- a/Adjust/ADJThirdPartySharing.m +++ b/Adjust/ADJThirdPartySharing.m @@ -7,42 +7,40 @@ // #import "ADJThirdPartySharing.h" - -@interface ADJThirdPartySharing () @end +#import "ADJAdjustFactory.h" @implementation ADJThirdPartySharing -- (id)init { +- (nullable id)initWithEnableOrElseDisableNumberBool: + (nullable NSNumber *)enableOrElseDisableNumberBool +{ self = [super init]; if (self == nil) { return nil; } _granularOptions = [[NSMutableDictionary alloc] init]; - _enable = nil; + _enable = enableOrElseDisableNumberBool; return self; } -- (void)addGranularOption:(NSString *)partnerName - key:(NSString *)key - value:(NSString *)value +- (void)addGranularOption:(nonnull NSString *)partnerName + key:(nonnull NSString *)key + value:(nonnull NSString *)value { - NSMutableDictionary *partnerOptions = [granularOptions objectForKey:partnerName]; + if (partnerName == nil || key == nil || value == nil) { + [ADJAdjustFactory.logger error:@"Cannot add granular option with any nil value"]; + return; + } + + NSMutableDictionary *partnerOptions = [self.granularOptions objectForKey:partnerName]; if (partnerOptions == nil) { partnerOptions = [[NSMutableDictionary alloc] init]; - [granularOptions setObject:partnerOptions forKey:partnerName]; + [self.granularOptions setObject:partnerOptions forKey:partnerName]; } [partnerOptions setObject:value forKey:key]; } -- (void)enableThirdPartySharing { - self.enable = [NSNumber numberWithBool:YES]; -} - -- (void)diableThirdPartySharing { - self.enable = [NSNumber numberWithBool:NO]; -} - @end From 896980b316e264a08d7b99843193750424d82f0d Mon Sep 17 00:00:00 2001 From: nonelse Date: Fri, 15 Jan 2021 12:23:05 +0100 Subject: [PATCH 29/42] Add Third party sharing file to projects --- Adjust.xcodeproj/project.pbxproj | 8 ++++++++ AdjustSdk/AdjustSdk.h | 1 + AdjustSdkIm/AdjustSdkIm.h | 1 + AdjustSdkTv/AdjustSdkTv.h | 1 + AdjustSdkWebBridge/AdjustSdkWebBridge.h | 1 + .../AdjustTestApp/AdjustTestApp.xcodeproj/project.pbxproj | 6 ++++++ .../AdjustWebBridgeTestApp.xcodeproj/project.pbxproj | 6 ++++++ .../AdjustExample-FbPixel.xcodeproj/project.pbxproj | 6 ++++++ .../AdjustExample-ObjC.xcodeproj/project.pbxproj | 6 ++++++ .../AdjustExample-Swift.xcodeproj/project.pbxproj | 6 ++++++ .../AdjustExample-WebView.xcodeproj/project.pbxproj | 6 ++++++ .../AdjustExample-iMessage.xcodeproj/project.pbxproj | 6 ++++++ .../AdjustExample-iWatch.xcodeproj/project.pbxproj | 6 ++++++ .../AdjustExample-tvOS.xcodeproj/project.pbxproj | 6 ++++++ 14 files changed, 66 insertions(+) diff --git a/Adjust.xcodeproj/project.pbxproj b/Adjust.xcodeproj/project.pbxproj index c0b7e3dd3..fd801d59c 100644 --- a/Adjust.xcodeproj/project.pbxproj +++ b/Adjust.xcodeproj/project.pbxproj @@ -23,6 +23,8 @@ /* Begin PBXBuildFile section */ 2067002A1F18BDC700B4FDE1 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9601C19C1A31DD7F00A9AE21 /* CoreTelephony.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 6F84512425B1B1380004C7C0 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F84511025B1B1380004C7C0 /* ADJThirdPartySharing.h */; }; + 6F84512525B1B1380004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84512325B1B1380004C7C0 /* ADJThirdPartySharing.m */; }; 6FBE0C6E2577CDAC00EC2CE0 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FBE0C6C2577CDAC00EC2CE0 /* ADJThirdPartySharing.h */; }; 6FBE0C6F2577CDAC00EC2CE0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBE0C6D2577CDAC00EC2CE0 /* ADJThirdPartySharing.m */; }; 6FBEE92624E422EB00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE92424E422EB00FEF3F1 /* ADJUrlStrategy.m */; }; @@ -613,6 +615,8 @@ 6F0842182007766700568A31 /* AdjustTestLibrary.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustTestLibrary.xcodeproj; path = AdjustTestLibrary/AdjustTestLibrary.xcodeproj; sourceTree = ""; }; 6F084240200776A000568A31 /* AdjustTestApp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustTestApp.xcodeproj; path = AdjustTestApp/AdjustTestApp.xcodeproj; sourceTree = ""; }; 6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustWebBridgeTestApp.xcodeproj; path = AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj; sourceTree = ""; }; + 6F84511025B1B1380004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; + 6F84512325B1B1380004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; 6FBE0C6C2577CDAC00EC2CE0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; 6FBE0C6D2577CDAC00EC2CE0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; 6FBEE8F124E2C26F00FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; @@ -1486,6 +1490,8 @@ 9D2F24022447DD6000B7CA90 /* ADJSubscription.m */, 6FBEE93224E4232800FEF3F1 /* ADJUrlStrategy.h */, 6FBEE93324E4232800FEF3F1 /* ADJUrlStrategy.m */, + 6F84511025B1B1380004C7C0 /* ADJThirdPartySharing.h */, + 6F84512325B1B1380004C7C0 /* ADJThirdPartySharing.m */, ); path = Adjust; sourceTree = SOURCE_ROOT; @@ -1964,6 +1970,7 @@ 9D0E2E9E210B575600133B4F /* ADJSessionFailure.h in Headers */, 9D0E2EA4210B575600133B4F /* ADJSessionSuccess.h in Headers */, 9D0E2EA8210B575600133B4F /* ADJLogger.h in Headers */, + 6F84512425B1B1380004C7C0 /* ADJThirdPartySharing.h in Headers */, 9D0E2E92210B575600133B4F /* ADJKeychain.h in Headers */, 9D0E2E7D210B575600133B4F /* ADJAdjustFactory.h in Headers */, 9D0E2E76210B575600133B4F /* ADJActivityKind.h in Headers */, @@ -2697,6 +2704,7 @@ 9D0E2E6E210B575600133B4F /* ADJAttributionHandler.m in Sources */, 9D0E2E87210B575600133B4F /* ADJBackoffStrategy.m in Sources */, 9D0E2EBB210B575600133B4F /* AdjustBridgeRegister.m in Sources */, + 6F84512525B1B1380004C7C0 /* ADJThirdPartySharing.m in Sources */, 9D0E2E84210B575600133B4F /* ADJTimerCycle.m in Sources */, 9D0E2E6C210B575600133B4F /* ADJDeviceInfo.m in Sources */, 6FBEE93524E4232800FEF3F1 /* ADJUrlStrategy.m in Sources */, diff --git a/AdjustSdk/AdjustSdk.h b/AdjustSdk/AdjustSdk.h index 7004b4f6a..56daff456 100644 --- a/AdjustSdk/AdjustSdk.h +++ b/AdjustSdk/AdjustSdk.h @@ -18,6 +18,7 @@ FOUNDATION_EXPORT const unsigned char AdjustSdkVersionString[]; #import #import +#import #import #import #import diff --git a/AdjustSdkIm/AdjustSdkIm.h b/AdjustSdkIm/AdjustSdkIm.h index 38b59b571..f45a4da9b 100644 --- a/AdjustSdkIm/AdjustSdkIm.h +++ b/AdjustSdkIm/AdjustSdkIm.h @@ -18,6 +18,7 @@ FOUNDATION_EXPORT const unsigned char AdjustSdkImVersionString[]; #import #import +#import #import #import #import diff --git a/AdjustSdkTv/AdjustSdkTv.h b/AdjustSdkTv/AdjustSdkTv.h index 31947ac54..9a66f0edc 100644 --- a/AdjustSdkTv/AdjustSdkTv.h +++ b/AdjustSdkTv/AdjustSdkTv.h @@ -18,6 +18,7 @@ FOUNDATION_EXPORT const unsigned char AdjustSdkTvVersionString[]; #import #import +#import #import #import #import diff --git a/AdjustSdkWebBridge/AdjustSdkWebBridge.h b/AdjustSdkWebBridge/AdjustSdkWebBridge.h index 123b03d18..6bca5b94d 100644 --- a/AdjustSdkWebBridge/AdjustSdkWebBridge.h +++ b/AdjustSdkWebBridge/AdjustSdkWebBridge.h @@ -19,6 +19,7 @@ FOUNDATION_EXPORT const unsigned char AdjustSdkWebBridgeVersionString[]; #import #import #import +#import #import #import #import diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp.xcodeproj/project.pbxproj b/AdjustTests/AdjustTestApp/AdjustTestApp.xcodeproj/project.pbxproj index 5e1b9bf61..9d235ba5d 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp.xcodeproj/project.pbxproj +++ b/AdjustTests/AdjustTestApp/AdjustTestApp.xcodeproj/project.pbxproj @@ -61,6 +61,7 @@ 6F3A5EA12018CE3A000AACD0 /* ATLUtilNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F3A5E9B2018CE3A000AACD0 /* ATLUtilNetworking.m */; }; 6F3A5EA22018CE3A000AACD0 /* ATLTestLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F3A5E9C2018CE3A000AACD0 /* ATLTestLibrary.m */; }; 6F3A5EA32018CE3A000AACD0 /* ATLBlockingQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F3A5E9D2018CE3A000AACD0 /* ATLBlockingQueue.m */; }; + 6F84510E25B1B1110004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84510C25B1B1100004C7C0 /* ADJThirdPartySharing.m */; }; 6FBEE92024E421B200FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91F24E421B200FEF3F1 /* ADJUrlStrategy.m */; }; 6FFCFE5F2007978300467F01 /* ATAAdjustCommandExecutor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FFCFE5D2007978300467F01 /* ATAAdjustCommandExecutor.m */; }; 6FFCFE6D200797D100467F01 /* ATAAdjustDelegateAttribution.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FFCFE61200797D000467F01 /* ATAAdjustDelegateAttribution.m */; }; @@ -189,6 +190,8 @@ 6F3A5E9B2018CE3A000AACD0 /* ATLUtilNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATLUtilNetworking.m; sourceTree = ""; }; 6F3A5E9C2018CE3A000AACD0 /* ATLTestLibrary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATLTestLibrary.m; sourceTree = ""; }; 6F3A5E9D2018CE3A000AACD0 /* ATLBlockingQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATLBlockingQueue.m; sourceTree = ""; }; + 6F84510C25B1B1100004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; + 6F84510D25B1B1110004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; 6FBEE91E24E421B200FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; 6FBEE91F24E421B200FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; 6FFCFE5D2007978300467F01 /* ATAAdjustCommandExecutor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATAAdjustCommandExecutor.m; sourceTree = ""; }; @@ -337,6 +340,8 @@ 9D2F24072447DDCA00B7CA90 /* ADJSubscription.m */, 6FBEE91E24E421B200FEF3F1 /* ADJUrlStrategy.h */, 6FBEE91F24E421B200FEF3F1 /* ADJUrlStrategy.m */, + 6F84510D25B1B1110004C7C0 /* ADJThirdPartySharing.h */, + 6F84510C25B1B1100004C7C0 /* ADJThirdPartySharing.m */, ); name = Adjust; path = ../../../Adjust; @@ -527,6 +532,7 @@ 524BACA6221C4EE800624F6C /* PSWebSocketServer.m in Sources */, 6F3A5E742018CE14000AACD0 /* ADJEvent.m in Sources */, 524BACA5221C4EE800624F6C /* PSWebSocket.m in Sources */, + 6F84510E25B1B1110004C7C0 /* ADJThirdPartySharing.m in Sources */, 6F3A5E822018CE14000AACD0 /* NSString+ADJAdditions.m in Sources */, 6F3A5E752018CE14000AACD0 /* ADJSessionSuccess.m in Sources */, 6FFCFE70200797D100467F01 /* ATAAdjustDelegate.m in Sources */, diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj index 4e4ef7b9e..ccd3bbd99 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj @@ -70,6 +70,7 @@ 6F7AF790211888B500F730B2 /* TestLibraryBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7AF78F211888B500F730B2 /* TestLibraryBridge.m */; }; 6F7AF7B02118949C00F730B2 /* TestLibraryBridge.js in Resources */ = {isa = PBXBuildFile; fileRef = 6F7AF7AF2118949C00F730B2 /* TestLibraryBridge.js */; }; 6F7AF7BB2118992200F730B2 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F7AF7BA2118992200F730B2 /* WebKit.framework */; }; + 6F84513125B1B14E0004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84513025B1B14E0004C7C0 /* ADJThirdPartySharing.m */; }; 6FBEE92324E421C800FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE92224E421C800FEF3F1 /* ADJUrlStrategy.m */; }; 6FD0412C211C71D1008D42D0 /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD0412B211C71D1008D42D0 /* iAd.framework */; }; 6FD0412E211C71D9008D42D0 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD0412D211C71D9008D42D0 /* AdSupport.framework */; }; @@ -204,6 +205,8 @@ 6F7AF78F211888B500F730B2 /* TestLibraryBridge.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestLibraryBridge.m; sourceTree = ""; }; 6F7AF7AF2118949C00F730B2 /* TestLibraryBridge.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = TestLibraryBridge.js; sourceTree = ""; }; 6F7AF7BA2118992200F730B2 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + 6F84512F25B1B14E0004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; + 6F84513025B1B14E0004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; 6FBEE92124E421C800FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; 6FBEE92224E421C800FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; 6FD0412B211C71D1008D42D0 /* iAd.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iAd.framework; path = System/Library/Frameworks/iAd.framework; sourceTree = SDKROOT; }; @@ -412,6 +415,8 @@ 6F7AF73021187CFF00F730B2 /* ADJReachability.m */, 6FBEE92124E421C800FEF3F1 /* ADJUrlStrategy.h */, 6FBEE92224E421C800FEF3F1 /* ADJUrlStrategy.m */, + 6F84512F25B1B14E0004C7C0 /* ADJThirdPartySharing.h */, + 6F84513025B1B14E0004C7C0 /* ADJThirdPartySharing.m */, ); name = Adjust; path = ../../../Adjust; @@ -531,6 +536,7 @@ 6F7AF74021187CFF00F730B2 /* ADJBackoffStrategy.m in Sources */, 6F6F75D92327C08B00F47E64 /* ATLBlockingQueue.m in Sources */, 6F7AF73421187CFF00F730B2 /* ADJRequestHandler.m in Sources */, + 6F84513125B1B14E0004C7C0 /* ADJThirdPartySharing.m in Sources */, 6F7AF73721187CFF00F730B2 /* ADJEvent.m in Sources */, 6F7AF74621187CFF00F730B2 /* NSData+ADJAdditions.m in Sources */, 6F6F75D82327C08B00F47E64 /* ATLTestLibrary.m in Sources */, diff --git a/examples/AdjustExample-FbPixel/AdjustExample-FbPixel.xcodeproj/project.pbxproj b/examples/AdjustExample-FbPixel/AdjustExample-FbPixel.xcodeproj/project.pbxproj index b56430f7b..843da3d04 100644 --- a/examples/AdjustExample-FbPixel/AdjustExample-FbPixel.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-FbPixel/AdjustExample-FbPixel.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 6F84514F25B1B2090004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84514E25B1B2090004C7C0 /* ADJThirdPartySharing.m */; }; 6FBEE91D24E4219E00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91B24E4219D00FEF3F1 /* ADJUrlStrategy.m */; }; 9D0F16A62193F96F00F5140E /* AdjustBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D0F16542193F96F00F5140E /* AdjustBridge.m */; }; 9D0F16A72193F96F00F5140E /* WebViewJavascriptBridgeBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D0F16572193F96F00F5140E /* WebViewJavascriptBridgeBase.m */; }; @@ -62,6 +63,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 6F84514D25B1B2090004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; + 6F84514E25B1B2090004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; 6FBEE91B24E4219D00FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ADJUrlStrategy.m; path = ../../../Adjust/ADJUrlStrategy.m; sourceTree = ""; }; 6FBEE91C24E4219E00FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ADJUrlStrategy.h; path = ../../../Adjust/ADJUrlStrategy.h; sourceTree = ""; }; 9D0F16542193F96F00F5140E /* AdjustBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdjustBridge.m; sourceTree = ""; }; @@ -283,6 +286,8 @@ 9D2F241B2447DE5A00B7CA90 /* ADJSubscription.m */, 6FBEE91C24E4219E00FEF3F1 /* ADJUrlStrategy.h */, 6FBEE91B24E4219D00FEF3F1 /* ADJUrlStrategy.m */, + 6F84514D25B1B2090004C7C0 /* ADJThirdPartySharing.h */, + 6F84514E25B1B2090004C7C0 /* ADJThirdPartySharing.m */, ); name = Adjust; path = ../../../../Adjust; @@ -428,6 +433,7 @@ 9D0F16B12193F96F00F5140E /* ADJSdkClickHandler.m in Sources */, 6FBEE91D24E4219E00FEF3F1 /* ADJUrlStrategy.m in Sources */, 9D0F16C72193F96F00F5140E /* ADJAdjustFactory.m in Sources */, + 6F84514F25B1B2090004C7C0 /* ADJThirdPartySharing.m in Sources */, 9D0F16C42193F96F00F5140E /* ADJSystemProfile.m in Sources */, 9D0F16C32193F96F00F5140E /* ADJAttribution.m in Sources */, 9D0F16A62193F96F00F5140E /* AdjustBridge.m in Sources */, diff --git a/examples/AdjustExample-ObjC/AdjustExample-ObjC.xcodeproj/project.pbxproj b/examples/AdjustExample-ObjC/AdjustExample-ObjC.xcodeproj/project.pbxproj index be3f89387..a2d19770e 100644 --- a/examples/AdjustExample-ObjC/AdjustExample-ObjC.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-ObjC/AdjustExample-ObjC.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 6F84513525B1B1850004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84513425B1B1840004C7C0 /* ADJThirdPartySharing.m */; }; 6FBEE90B24E420FA00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE90924E420FA00FEF3F1 /* ADJUrlStrategy.m */; }; 6FCC850C1F2794AB00D6A0ED /* ADJReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FCC850A1F2794A300D6A0ED /* ADJReachability.m */; }; 963909411BCBFCF300A2E8A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 963909401BCBFCF300A2E8A4 /* main.m */; }; @@ -56,6 +57,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 6F84513325B1B1840004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; + 6F84513425B1B1840004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; 6FBEE90924E420FA00FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; 6FBEE90A24E420FA00FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; 6FCC850A1F2794A300D6A0ED /* ADJReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADJReachability.m; sourceTree = ""; }; @@ -288,6 +291,8 @@ 9D2F240A2447DDE100B7CA90 /* ADJSubscription.m */, 6FBEE90A24E420FA00FEF3F1 /* ADJUrlStrategy.h */, 6FBEE90924E420FA00FEF3F1 /* ADJUrlStrategy.m */, + 6F84513325B1B1840004C7C0 /* ADJThirdPartySharing.h */, + 6F84513425B1B1840004C7C0 /* ADJThirdPartySharing.m */, ); name = Adjust; path = ../../../Adjust; @@ -396,6 +401,7 @@ 9D449E241E6ED88F00E7E80B /* ADJAttribution.m in Sources */, 9DC95F2A1C10515300138E4B /* Constants.m in Sources */, 9D2F240B2447DDE100B7CA90 /* ADJSubscription.m in Sources */, + 6F84513525B1B1850004C7C0 /* ADJThirdPartySharing.m in Sources */, 963909441BCBFCF300A2E8A4 /* AppDelegate.m in Sources */, 9D449E311E6ED88F00E7E80B /* ADJSessionParameters.m in Sources */, 9D449E171E6ED88F00E7E80B /* ADJActivityHandler.m in Sources */, diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj index 02597c8e9..9053b5e5f 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 6F84513925B1B19E0004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84513725B1B19E0004C7C0 /* ADJThirdPartySharing.m */; }; 6FBEE90E24E4212600FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE90D24E4212600FEF3F1 /* ADJUrlStrategy.m */; }; 6FCC850F1F2794C600D6A0ED /* ADJReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FCC850E1F2794BE00D6A0ED /* ADJReachability.m */; }; 9D2F240E2447DDF600B7CA90 /* ADJSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D2F240C2447DDF600B7CA90 /* ADJSubscription.m */; }; @@ -55,6 +56,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 6F84513725B1B19E0004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; + 6F84513825B1B19E0004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; 6FBEE90C24E4212500FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; 6FBEE90D24E4212600FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; 6FCC850D1F2794BE00D6A0ED /* ADJReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJReachability.h; sourceTree = ""; }; @@ -224,6 +227,8 @@ 9D2F240C2447DDF600B7CA90 /* ADJSubscription.m */, 6FBEE90C24E4212500FEF3F1 /* ADJUrlStrategy.h */, 6FBEE90D24E4212600FEF3F1 /* ADJUrlStrategy.m */, + 6F84513825B1B19E0004C7C0 /* ADJThirdPartySharing.h */, + 6F84513725B1B19E0004C7C0 /* ADJThirdPartySharing.m */, ); name = Adjust; path = ../../../Adjust; @@ -412,6 +417,7 @@ 9DF7A9C61CB4ECA600D3591F /* AppDelegate.swift in Sources */, 9D449E931E6EDC3D00E7E80B /* ADJTimerOnce.m in Sources */, 9D449E801E6EDC3D00E7E80B /* ADJBackoffStrategy.m in Sources */, + 6F84513925B1B19E0004C7C0 /* ADJThirdPartySharing.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj b/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj index a047adf8f..126c73896 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 6F84513D25B1B1B40004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84513B25B1B1B40004C7C0 /* ADJThirdPartySharing.m */; }; 6FBEE91124E4213900FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91024E4213800FEF3F1 /* ADJUrlStrategy.m */; }; 6FCC85121F2794D900D6A0ED /* ADJReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FCC85111F2794D600D6A0ED /* ADJReachability.m */; }; 968595F11D0B2E630011CA2B /* AdjustBridgeRegister.m in Sources */ = {isa = PBXBuildFile; fileRef = 968595F01D0B2E630011CA2B /* AdjustBridgeRegister.m */; }; @@ -63,6 +64,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 6F84513B25B1B1B40004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; + 6F84513C25B1B1B40004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; 6FBEE90F24E4213800FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; 6FBEE91024E4213800FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; 6FCC85101F2794D600D6A0ED /* ADJReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJReachability.h; sourceTree = ""; }; @@ -307,6 +310,8 @@ 9D2F24102447DE0A00B7CA90 /* ADJSubscription.m */, 6FBEE90F24E4213800FEF3F1 /* ADJUrlStrategy.h */, 6FBEE91024E4213800FEF3F1 /* ADJUrlStrategy.m */, + 6F84513C25B1B1B40004C7C0 /* ADJThirdPartySharing.h */, + 6F84513B25B1B1B40004C7C0 /* ADJThirdPartySharing.m */, ); name = Adjust; path = ../../../Adjust; @@ -447,6 +452,7 @@ 9D449EF51E6EDD4100E7E80B /* ADJSystemProfile.m in Sources */, 9D449EE01E6EDD4100E7E80B /* UIDevice+ADJAdditions.m in Sources */, 9D449EEA1E6EDD4100E7E80B /* ADJEventSuccess.m in Sources */, + 6F84513D25B1B1B40004C7C0 /* ADJThirdPartySharing.m in Sources */, 9DD0E9C41F4587C600B2A759 /* ADJUserDefaults.m in Sources */, 6FCC85121F2794D900D6A0ED /* ADJReachability.m in Sources */, 9D75F1991D07463800E5D222 /* WKWebViewJavascriptBridge.m in Sources */, diff --git a/examples/AdjustExample-iMessage/AdjustExample-iMessage.xcodeproj/project.pbxproj b/examples/AdjustExample-iMessage/AdjustExample-iMessage.xcodeproj/project.pbxproj index f78957a65..0f3c90bb0 100644 --- a/examples/AdjustExample-iMessage/AdjustExample-iMessage.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-iMessage/AdjustExample-iMessage.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 6F84514A25B1B1F40004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84514825B1B1F40004C7C0 /* ADJThirdPartySharing.m */; }; 6FBEE91A24E4218C00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91824E4218B00FEF3F1 /* ADJUrlStrategy.m */; }; 9D01676920FF812B0029CFFF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9D01676820FF812B0029CFFF /* Assets.xcassets */; }; 9D01677020FF812B0029CFFF /* AdjustExample-iMessage MessagesExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 9D01676F20FF812B0029CFFF /* AdjustExample-iMessage MessagesExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -75,6 +76,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 6F84514825B1B1F40004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; + 6F84514925B1B1F40004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; 6FBEE91824E4218B00FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; 6FBEE91924E4218B00FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; 9D01676520FF81280029CFFF /* AdjustExample-iMessage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "AdjustExample-iMessage.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -286,6 +289,8 @@ 9D2F24192447DE4700B7CA90 /* ADJSubscription.m */, 6FBEE91924E4218B00FEF3F1 /* ADJUrlStrategy.h */, 6FBEE91824E4218B00FEF3F1 /* ADJUrlStrategy.m */, + 6F84514925B1B1F40004C7C0 /* ADJThirdPartySharing.h */, + 6F84514825B1B1F40004C7C0 /* ADJThirdPartySharing.m */, ); name = Adjust; path = ../../../Adjust; @@ -420,6 +425,7 @@ 9D01685A20FF88F60029CFFF /* ADJKeychain.m in Sources */, 6FBEE91A24E4218C00FEF3F1 /* ADJUrlStrategy.m in Sources */, 9D01686A20FF88F60029CFFF /* NSString+ADJAdditions.m in Sources */, + 6F84514A25B1B1F40004C7C0 /* ADJThirdPartySharing.m in Sources */, 9D01687120FF88F60029CFFF /* ADJAdjustFactory.m in Sources */, 9D01687220FF88F60029CFFF /* ADJResponseData.m in Sources */, 9D01686020FF88F60029CFFF /* ADJActivityState.m in Sources */, diff --git a/examples/AdjustExample-iWatch/AdjustExample-iWatch.xcodeproj/project.pbxproj b/examples/AdjustExample-iWatch/AdjustExample-iWatch.xcodeproj/project.pbxproj index a48b6374e..9368c59dc 100644 --- a/examples/AdjustExample-iWatch/AdjustExample-iWatch.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-iWatch/AdjustExample-iWatch.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 6F84514425B1B1DB0004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84514325B1B1DB0004C7C0 /* ADJThirdPartySharing.m */; }; 6FBEE91724E4215E00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91624E4215E00FEF3F1 /* ADJUrlStrategy.m */; }; 6FCC85181F27950000D6A0ED /* ADJReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FCC85171F2794F800D6A0ED /* ADJReachability.m */; }; 9D2F24172447DE3400B7CA90 /* ADJSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D2F24152447DE3400B7CA90 /* ADJSubscription.m */; }; @@ -107,6 +108,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 6F84514225B1B1DB0004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; + 6F84514325B1B1DB0004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; 6FBEE91524E4215E00FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; 6FBEE91624E4215E00FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; 6FCC85161F2794F800D6A0ED /* ADJReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJReachability.h; sourceTree = ""; }; @@ -300,6 +303,8 @@ 9D2F24152447DE3400B7CA90 /* ADJSubscription.m */, 6FBEE91524E4215E00FEF3F1 /* ADJUrlStrategy.h */, 6FBEE91624E4215E00FEF3F1 /* ADJUrlStrategy.m */, + 6F84514225B1B1DB0004C7C0 /* ADJThirdPartySharing.h */, + 6F84514325B1B1DB0004C7C0 /* ADJThirdPartySharing.m */, ); name = Adjust; path = ../../../Adjust; @@ -569,6 +574,7 @@ 9D449FBE1E6EE72000E7E80B /* ADJSystemProfile.m in Sources */, 9D449FAD1E6EE72000E7E80B /* ADJBackoffStrategy.m in Sources */, 9D449FBC1E6EE72000E7E80B /* ADJSessionParameters.m in Sources */, + 6F84514425B1B1DB0004C7C0 /* ADJThirdPartySharing.m in Sources */, 9D449FB61E6EE72000E7E80B /* ADJPackageBuilder.m in Sources */, 9D449FBD1E6EE72000E7E80B /* ADJSessionSuccess.m in Sources */, 6FBEE91724E4215E00FEF3F1 /* ADJUrlStrategy.m in Sources */, diff --git a/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj b/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj index a4adc8fc2..672423b8c 100644 --- a/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 6F84514125B1B1C80004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84513F25B1B1C70004C7C0 /* ADJThirdPartySharing.m */; }; 6FBEE91424E4214800FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91324E4214800FEF3F1 /* ADJUrlStrategy.m */; }; 6FCC85151F2794EC00D6A0ED /* ADJReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FCC85131F2794E800D6A0ED /* ADJReachability.m */; }; 963909B71BCC0D8300A2E8A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 963909B61BCC0D8300A2E8A4 /* main.m */; }; @@ -65,6 +66,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 6F84513F25B1B1C70004C7C0 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; + 6F84514025B1B1C80004C7C0 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; 6FBEE91224E4214800FEF3F1 /* ADJUrlStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJUrlStrategy.h; sourceTree = ""; }; 6FBEE91324E4214800FEF3F1 /* ADJUrlStrategy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJUrlStrategy.m; sourceTree = ""; }; 6FCC85131F2794E800D6A0ED /* ADJReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADJReachability.m; sourceTree = ""; }; @@ -272,6 +275,8 @@ 9D2F24122447DE1E00B7CA90 /* ADJSubscription.m */, 6FBEE91224E4214800FEF3F1 /* ADJUrlStrategy.h */, 6FBEE91324E4214800FEF3F1 /* ADJUrlStrategy.m */, + 6F84514025B1B1C80004C7C0 /* ADJThirdPartySharing.h */, + 6F84513F25B1B1C70004C7C0 /* ADJThirdPartySharing.m */, ); name = Adjust; path = ../../../Adjust; @@ -382,6 +387,7 @@ 9D449F5B1E6EE6C500E7E80B /* ADJTimerCycle.m in Sources */, 9D449F471E6EE6C500E7E80B /* ADJAttribution.m in Sources */, 9D2F24142447DE1F00B7CA90 /* ADJSubscription.m in Sources */, + 6F84514125B1B1C80004C7C0 /* ADJThirdPartySharing.m in Sources */, 9D449F421E6EE6C500E7E80B /* ADJActivityState.m in Sources */, 9DC95F2F1C10596500138E4B /* Constants.m in Sources */, 963909BD1BCC0D8300A2E8A4 /* ViewControllertvOS.m in Sources */, From ff4dccc56046c3c9ad596d7caa65d29d31482948 Mon Sep 17 00:00:00 2001 From: nonelse Date: Fri, 15 Jan 2021 12:27:15 +0100 Subject: [PATCH 30/42] Add command executor --- .../AdjustTestApp/ATAAdjustCommandExecutor.m | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m index 6b13a45b6..4af750c62 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m +++ b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m @@ -91,6 +91,10 @@ - (void)executeCommand:(NSString *)className [self trackAdRevenue:parameters]; } else if ([methodName isEqualToString:@"disableThirdPartySharing"]) { [self disableThirdPartySharing:parameters]; + } else if ([methodName isEqualToString:@"thirdPartySharing"]) { + [self thirdPartySharing:parameters]; + } else if ([methodName isEqualToString:@"measurementConsent"]) { + [self measurementConsent:parameters]; } else if ([methodName isEqualToString:@"trackSubscription"]) { [self trackSubscription:parameters]; } @@ -562,6 +566,39 @@ - (void)disableThirdPartySharing:(NSDictionary *)parameters { [Adjust disableThirdPartySharing]; } +- (void)thirdPartySharing:(NSDictionary *)parameters { + NSString *enableOrElseDisableS = [parameters objectForKey:@"enableOrElseDisable"][0]; + + NSNumber *enableOrElseDisable = nil; + if ([enableOrElseDisableS isEqualToString:@"true"]) { + enableOrElseDisable = [NSNumber numberWithBool:YES]; + } + if ([enableOrElseDisableS isEqualToString:@"false"]) { + enableOrElseDisable = [NSNumber numberWithBool:NO]; + } + + ADJThirdPartySharing *adjustThirdPartySharing = + [[ADJThirdPartySharing alloc] + initWithEnableOrElseDisableNumberBool:enableOrElseDisable]; + + if ([parameters objectForKey:@"granularOptions"]) { + NSArray *granularOptions = [parameters objectForKey:@"granularOptions"]; + for (int i = 0; i < granularOptions.count; i = i + 3) { + NSString *partnerName = granularOptions[i]; + NSString *key = granularOptions[i + 1]; + NSString *value = granularOptions[i + 2]; + [adjustThirdPartySharing addGranularOption:partnerName key:key value:value]; + } + } + + [Adjust trackThirdPartySharing:adjustThirdPartySharing]; +} + +- (void)measurementConsent:(NSDictionary *)parameters { + NSString *enableOrElseDisableS = [parameters objectForKey:@"enableOrElseDisable"][0]; + [Adjust trackMeasurementConsent:[enableOrElseDisableS boolValue]]; +} + - (void)trackSubscription:(NSDictionary *)parameters { NSDecimalNumber *price; NSString *currency; From 48cd7e809def7e9e014e0ca0c35c76684b34d4c3 Mon Sep 17 00:00:00 2001 From: nonelse Date: Fri, 15 Jan 2021 12:50:32 +0100 Subject: [PATCH 31/42] Add tps and mc web bridge --- AdjustBridge/AdjustBridge.m | 28 +++++++++++++++++ AdjustBridge/AdjustBridgeRegister.m | 21 +++++++++++++ .../TestLibraryBridge.js | 31 +++++++++++++++++++ 3 files changed, 80 insertions(+) diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index a9e6d3e63..84d1f5b57 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -513,6 +513,34 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView [Adjust disableThirdPartySharing]; }]; + [self.bridgeRegister registerHandler:@"adjust_trackThirdPartySharing" handler:^(id data, WVJBResponseCallback responseCallback) { + id enableOrElseDisableO = [data objectForKey:@"enableOrElseDisable"]; + id granularOptions = [data objectForKey:@"granularOptions"]; + + NSNumber *enableOrElseDisable = nil; + if ([enableOrElseDisableO isKindOfClass:[NSNumber class]]) { + enableOrElseDisable = (NSNumber *)enableOrElseDisable; + } + + ADJThirdPartySharing *adjustThirdPartySharing = + [[ADJThirdPartySharing alloc] + initWithEnableOrElseDisableNumberBool:enableOrElseDisable]; + + for (int i = 0; i < [granularOptions count]; i += 3) { + NSString *partnerName = [[granularOptions objectAtIndex:i] description]; + NSString *key = [[granularOptions objectAtIndex:(i + 1)] description]; + NSString *value = [[granularOptions objectAtIndex:(i + 2)] description]; + [adjustThirdPartySharing addGranularOption:partnerName key:key value:value]; + } + + [Adjust trackThirdPartySharing:adjustThirdPartySharing]; + }]; + + [self.bridgeRegister registerHandler:@"adjust_disableThirdPartySharing" handler:^(id data, WVJBResponseCallback responseCallback) { + [Adjust disableThirdPartySharing]; + }]; + + [self.bridgeRegister registerHandler:@"adjust_setTestOptions" handler:^(id data, WVJBResponseCallback responseCallback) { NSString *baseUrl = [data objectForKey:@"baseUrl"]; NSString *gdprUrl = [data objectForKey:@"gdprUrl"]; diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index 8f6643e80..172a90d9e 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -211,6 +211,16 @@ + (NSString *)adjust_js { WebViewJavascriptBridge.callHandler('adjust_disableThirdPartySharing', null, null); } }, + trackThirdPartySharing: function(adjustThirdPartySharing) { + if (WebViewJavascriptBridge != null) { + WebViewJavascriptBridge.callHandler('adjust_trackThirdPartySharing', adjustThirdPartySharing, null); + } + }, + trackMeasurementConsent: function(consentMeasurement) { + if (WebViewJavascriptBridge != null) { + WebViewJavascriptBridge.callHandler('adjust_trackMeasurementConsent', consentMeasurement, null); + } + }, fbPixelEvent: function(pixelID, evtName, customData) { if (WebViewJavascriptBridge != null) { WebViewJavascriptBridge.callHandler('adjust_fbPixelEvent', @@ -271,6 +281,17 @@ + (NSString *)adjust_js { this.callbackId = callbackId; }; + window.AdjustThirdPartySharing = function(enableOrElseDisable) { + this.enableOrElseDisable = enableOrElseDisable; + this.granularOptions = []; + }; + + AdjustThirdPartySharing.prototype.addGranularOption = function(partnerName, key, value) { + this.granularOptions.push(partnerName); + this.granularOptions.push(key); + this.granularOptions.push(value); + }; + // Copied from adjust_config.js window.AdjustConfig = function(appToken, environment, legacy) { if (arguments.length === 2) { diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js index c567e7815..1dae4206f 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js @@ -561,6 +561,37 @@ AdjustCommandExecutor.prototype.disableThirdPartySharing = function(params) { Adjust.disableThirdPartySharing(); }; +AdjustCommandExecutor.prototype.thirdPartySharing = function(params) { + var enableOrElseDisableS = getFirstValue(params, 'enableOrElseDisable'); + + var enableOrElseDisable = null; + if (enableOrElseDisableS == 'true') { + enableOrElseDisable = true; + } + if (enableOrElseDisableS == 'false') { + enableOrElseDisable = false; + } + + var adjustThirdPartySharing = new AdjustThirdPartySharing(enableOrElseDisable); + + if ('granularOptions' in params) { + var granularOptions = getValues(params, 'granularOptions'); + for (var i = 0; i < granularOptions.length; i = i + 3) { + var partnerName = granularOptions[i]; + var key = granularOptions[i + 1]; + var value = granularOptions[i + 2]; + adjustThirdPartySharing.addGranularOption(partnerName, key, value); + } + } + + Adjust.trackMeasurementConsent(adjustThirdPartySharing); +}; + +AdjustCommandExecutor.prototype.measurementConsent = function(params) { + var consentMeasurement = getFirstValue(params, 'enableOrElseDisable') == 'true'; + Adjust.trackMeasurementConsent(consentMeasurement); +}; + // Util function getValues(params, key) { if (key in params) { From 1eab7f74c7f07c21469a1e80be4fc9ab7a194cf7 Mon Sep 17 00:00:00 2001 From: nonelse Date: Fri, 15 Jan 2021 14:49:34 +0100 Subject: [PATCH 32/42] Save pre launch mc and tps --- Adjust/ADJActivityHandler.h | 2 ++ Adjust/ADJActivityHandler.m | 51 +++++++++++++++++++++++++++++++------ Adjust/Adjust.m | 9 +++++++ 3 files changed, 54 insertions(+), 8 deletions(-) diff --git a/Adjust/ADJActivityHandler.h b/Adjust/ADJActivityHandler.h index 76d28ee2d..3670ccfe3 100644 --- a/Adjust/ADJActivityHandler.h +++ b/Adjust/ADJActivityHandler.h @@ -46,6 +46,8 @@ @property (nonatomic, copy) NSNumber *enabled; @property (nonatomic, assign) BOOL offline; @property (nonatomic, copy) NSString *extraPath; +@property (nonatomic, strong) NSMutableArray *preLaunchAdjustThirdPartySharingArray; +@property (nonatomic, copy) NSNumber *lastMeasurementConsentTracked; - (id)init; diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 0b8bbb95d..bbdb246e0 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -102,6 +102,7 @@ @interface ADJActivityHandler() @property (nonatomic, weak) NSObject *adjustDelegate; // copy for objects shared with the user @property (nonatomic, copy) ADJConfig *adjustConfig; +@property (nonatomic, weak) ADJSavedPreLaunch *savedPreLaunch; @property (nonatomic, copy) NSData* deviceTokenData; @property (nonatomic, copy) NSString* basePath; @property (nonatomic, copy) NSString* gdprPath; @@ -156,6 +157,7 @@ - (id)initWithConfig:(ADJConfig *)adjustConfig } self.adjustConfig = adjustConfig; + self.savedPreLaunch = savedPreLaunch; self.adjustDelegate = adjustConfig.delegate; // init logger to be available everywhere @@ -1051,6 +1053,25 @@ - (void)processSessionI:(ADJActivityHandler *)selfI { if ([ADJUserDefaults getDisableThirdPartySharing]) { [selfI disableThirdPartySharingI:selfI]; } + if (selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray != nil) { + [selfI.logger debug: + @"TORMV very first session preLaunchAdjustThirdPartySharingArray != nil"]; + for (ADJThirdPartySharing *thirdPartySharing + in selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray) + { + [selfI trackThirdPartySharingI:selfI + thirdPartySharing:thirdPartySharing]; + } + } + if (selfI.savedPreLaunch.lastMeasurementConsentTracked != nil) { + [selfI.logger debug: + @"TORMV very first session lastMeasurementConsentTracked %@", + selfI.savedPreLaunch.lastMeasurementConsentTracked]; + [selfI + trackMeasurementConsentI:selfI + enabled:[selfI.savedPreLaunch.lastMeasurementConsentTracked boolValue]]; + } + [ADJUtil launchSynchronisedWithObject:[ADJActivityState class] block:^{ selfI.activityState.sessionCount = 1; // this is the first session @@ -1357,9 +1378,6 @@ - (void)trackThirdPartySharingI:(ADJActivityHandler *)selfI if (selfI.activityState.isGdprForgotten) { return; } - if (selfI.activityState.isThirdPartySharingDisabled) { - return; - } double now = [NSDate.date timeIntervalSince1970]; @@ -1395,9 +1413,6 @@ - (void)trackMeasurementConsentI:(ADJActivityHandler *)selfI if (selfI.activityState.isGdprForgotten) { return; } - if (selfI.activityState.isThirdPartySharingDisabled) { - return; - } double now = [NSDate.date timeIntervalSince1970]; @@ -1647,8 +1662,28 @@ - (void)setEnabledI:(ADJActivityHandler *)selfI enabled:(BOOL)enabled { } if ([ADJUserDefaults getGdprForgetMe]) { [selfI setGdprForgetMe]; - } else if ([ADJUserDefaults getDisableThirdPartySharing]) { - [selfI disableThirdPartySharing]; + } else { + if ([ADJUserDefaults getDisableThirdPartySharing]) { + [selfI disableThirdPartySharing]; + } + if (selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray != nil) { + [selfI.logger debug: + @"TORMV setEnabledI preLaunchAdjustThirdPartySharingArray != nil"]; + for (ADJThirdPartySharing *thirdPartySharing + in selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray) + { + [selfI trackThirdPartySharing:thirdPartySharing]; + } + } + if (selfI.savedPreLaunch.lastMeasurementConsentTracked != nil) { + [selfI.logger debug: + @"TORMV setEnabledI lastMeasurementConsentTracked %@", + selfI.savedPreLaunch.lastMeasurementConsentTracked]; + [selfI + trackMeasurementConsent: + [selfI.savedPreLaunch.lastMeasurementConsentTracked boolValue]]; + } + } if (selfI.adjustConfig.allowiAdInfoReading == YES) { [selfI checkForiAdI:selfI]; diff --git a/Adjust/Adjust.m b/Adjust/Adjust.m index f3770433e..8fc699005 100644 --- a/Adjust/Adjust.m +++ b/Adjust/Adjust.m @@ -517,6 +517,13 @@ - (void)disableThirdPartySharing { - (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing { if (![self checkActivityHandler]) { + if (self.savedPreLaunch.preLaunchAdjustThirdPartySharingArray == nil) { + self.savedPreLaunch.preLaunchAdjustThirdPartySharingArray = + [[NSMutableArray alloc] init]; + } + + [self.savedPreLaunch.preLaunchAdjustThirdPartySharingArray addObject:thirdPartySharing]; + return; } @@ -525,6 +532,8 @@ - (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing - (void)trackMeasurementConsent:(BOOL)enabled { if (![self checkActivityHandler]) { + self.savedPreLaunch.lastMeasurementConsentTracked = [NSNumber numberWithBool:enabled]; + return; } From cfc4d729c7d57c0239699ef46400749019431dff Mon Sep 17 00:00:00 2001 From: nonelse Date: Fri, 15 Jan 2021 15:13:09 +0100 Subject: [PATCH 33/42] Cache and remove mc tps every time --- Adjust/ADJActivityHandler.m | 61 ++++++++++++++++++++++++------------- Adjust/Adjust.m | 2 -- 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index bbdb246e0..40e6d4e68 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -740,16 +740,31 @@ - (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing [ADJUtil launchInQueue:self.internalQueue selfInject:self block:^(ADJActivityHandler * selfI) { - [selfI trackThirdPartySharingI:selfI thirdPartySharing:thirdPartySharing]; - }]; + BOOL tracked = + [selfI trackThirdPartySharingI:selfI thirdPartySharing:thirdPartySharing]; + if (! tracked) { + if (self.savedPreLaunch.preLaunchAdjustThirdPartySharingArray == nil) { + self.savedPreLaunch.preLaunchAdjustThirdPartySharingArray = + [[NSMutableArray alloc] init]; + } + + [self.savedPreLaunch.preLaunchAdjustThirdPartySharingArray + addObject:thirdPartySharing]; + } + }]; } - (void)trackMeasurementConsent:(BOOL)enabled { [ADJUtil launchInQueue:self.internalQueue selfInject:self block:^(ADJActivityHandler * selfI) { - [selfI trackMeasurementConsentI:selfI enabled:enabled]; - }]; + BOOL tracked = + [selfI trackMeasurementConsentI:selfI enabled:enabled]; + if (! tracked) { + selfI.savedPreLaunch.lastMeasurementConsentTracked = + [NSNumber numberWithBool:enabled]; + } + }]; } - (void)writeActivityState { @@ -1054,22 +1069,21 @@ - (void)processSessionI:(ADJActivityHandler *)selfI { [selfI disableThirdPartySharingI:selfI]; } if (selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray != nil) { - [selfI.logger debug: - @"TORMV very first session preLaunchAdjustThirdPartySharingArray != nil"]; for (ADJThirdPartySharing *thirdPartySharing in selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray) { [selfI trackThirdPartySharingI:selfI thirdPartySharing:thirdPartySharing]; } + + selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray = nil; } if (selfI.savedPreLaunch.lastMeasurementConsentTracked != nil) { - [selfI.logger debug: - @"TORMV very first session lastMeasurementConsentTracked %@", - selfI.savedPreLaunch.lastMeasurementConsentTracked]; [selfI trackMeasurementConsentI:selfI enabled:[selfI.savedPreLaunch.lastMeasurementConsentTracked boolValue]]; + + selfI.savedPreLaunch.lastMeasurementConsentTracked = nil; } [ADJUtil launchSynchronisedWithObject:[ADJActivityState class] @@ -1366,17 +1380,17 @@ - (void)disableThirdPartySharingI:(ADJActivityHandler *)selfI { } } -- (void)trackThirdPartySharingI:(ADJActivityHandler *)selfI +- (BOOL)trackThirdPartySharingI:(ADJActivityHandler *)selfI thirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing { if (!selfI.activityState) { - return; + return NO; } if (![selfI isEnabledI:selfI]) { - return; + return NO; } if (selfI.activityState.isGdprForgotten) { - return; + return NO; } double now = [NSDate.date timeIntervalSince1970]; @@ -1399,19 +1413,21 @@ - (void)trackThirdPartySharingI:(ADJActivityHandler *)selfI } else { [selfI.packageHandler sendFirstPackage]; } + + return YES; } -- (void)trackMeasurementConsentI:(ADJActivityHandler *)selfI +- (BOOL)trackMeasurementConsentI:(ADJActivityHandler *)selfI enabled:(BOOL)enabled { if (!selfI.activityState) { - return; + return NO; } if (![selfI isEnabledI:selfI]) { - return; + return NO; } if (selfI.activityState.isGdprForgotten) { - return; + return NO; } double now = [NSDate.date timeIntervalSince1970]; @@ -1434,6 +1450,8 @@ - (void)trackMeasurementConsentI:(ADJActivityHandler *)selfI } else { [selfI.packageHandler sendFirstPackage]; } + + return YES; } - (void)launchEventResponseTasksI:(ADJActivityHandler *)selfI @@ -1667,21 +1685,20 @@ - (void)setEnabledI:(ADJActivityHandler *)selfI enabled:(BOOL)enabled { [selfI disableThirdPartySharing]; } if (selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray != nil) { - [selfI.logger debug: - @"TORMV setEnabledI preLaunchAdjustThirdPartySharingArray != nil"]; for (ADJThirdPartySharing *thirdPartySharing in selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray) { [selfI trackThirdPartySharing:thirdPartySharing]; } + + selfI.savedPreLaunch.preLaunchAdjustThirdPartySharingArray = nil; } if (selfI.savedPreLaunch.lastMeasurementConsentTracked != nil) { - [selfI.logger debug: - @"TORMV setEnabledI lastMeasurementConsentTracked %@", - selfI.savedPreLaunch.lastMeasurementConsentTracked]; [selfI trackMeasurementConsent: [selfI.savedPreLaunch.lastMeasurementConsentTracked boolValue]]; + + selfI.savedPreLaunch.lastMeasurementConsentTracked = nil; } } diff --git a/Adjust/Adjust.m b/Adjust/Adjust.m index 8fc699005..faca96eef 100644 --- a/Adjust/Adjust.m +++ b/Adjust/Adjust.m @@ -523,7 +523,6 @@ - (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing } [self.savedPreLaunch.preLaunchAdjustThirdPartySharingArray addObject:thirdPartySharing]; - return; } @@ -533,7 +532,6 @@ - (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing - (void)trackMeasurementConsent:(BOOL)enabled { if (![self checkActivityHandler]) { self.savedPreLaunch.lastMeasurementConsentTracked = [NSNumber numberWithBool:enabled]; - return; } From 58f084249e396c3ed163b739c442e1a1737879dc Mon Sep 17 00:00:00 2001 From: uerceg Date: Sat, 16 Jan 2021 00:09:03 +0100 Subject: [PATCH 34/42] rename buildMeasurementConsent: to buildMeasurementConsentPackage: --- Adjust/ADJActivityHandler.m | 2 +- Adjust/ADJPackageBuilder.h | 2 +- Adjust/ADJPackageBuilder.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 40e6d4e68..5a9d77b44 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -1441,7 +1441,7 @@ - (BOOL)trackMeasurementConsentI:(ADJActivityHandler *)selfI trackingStatusManager:self.trackingStatusManager createdAt:now]; - ADJActivityPackage *mcPackage = [tpsBuilder buildMeasurementConsent:enabled]; + ADJActivityPackage *mcPackage = [tpsBuilder buildMeasurementConsentPackage:enabled]; [selfI.packageHandler addPackage:mcPackage]; diff --git a/Adjust/ADJPackageBuilder.h b/Adjust/ADJPackageBuilder.h index 36a0ee0c9..18bf44555 100644 --- a/Adjust/ADJPackageBuilder.h +++ b/Adjust/ADJPackageBuilder.h @@ -58,7 +58,7 @@ - (ADJActivityPackage *)buildThirdPartySharingPackage:(nonnull ADJThirdPartySharing *)thirdPartySharing; -- (ADJActivityPackage *)buildMeasurementConsent:(BOOL)enabled; +- (ADJActivityPackage *)buildMeasurementConsentPackage:(BOOL)enabled; - (ADJActivityPackage *)buildSubscriptionPackage:(ADJSubscription *)subscription isInDelay:(BOOL)isInDelay; diff --git a/Adjust/ADJPackageBuilder.m b/Adjust/ADJPackageBuilder.m index febd202e5..8d448189f 100644 --- a/Adjust/ADJPackageBuilder.m +++ b/Adjust/ADJPackageBuilder.m @@ -209,7 +209,7 @@ - (ADJActivityPackage *)buildThirdPartySharingPackage:(nonnull ADJThirdPartyShar return tpsPackage; } -- (ADJActivityPackage *)buildMeasurementConsent:(BOOL)enabled { +- (ADJActivityPackage *)buildMeasurementConsentPackage:(BOOL)enabled { NSMutableDictionary *parameters = [self getMeasurementConsentParameters:enabled]; ADJActivityPackage *mcPackage = [self defaultActivityPackage]; mcPackage.path = @"/measurement_consent"; From 734fda19c50ddfe72da459e87e3d94639d8c3ba5 Mon Sep 17 00:00:00 2001 From: uerceg Date: Sat, 16 Jan 2021 00:10:07 +0100 Subject: [PATCH 35/42] fix measurement_consent activity kind in package builder --- Adjust/ADJPackageBuilder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adjust/ADJPackageBuilder.m b/Adjust/ADJPackageBuilder.m index 8d448189f..bfd0da55b 100644 --- a/Adjust/ADJPackageBuilder.m +++ b/Adjust/ADJPackageBuilder.m @@ -213,7 +213,7 @@ - (ADJActivityPackage *)buildMeasurementConsentPackage:(BOOL)enabled { NSMutableDictionary *parameters = [self getMeasurementConsentParameters:enabled]; ADJActivityPackage *mcPackage = [self defaultActivityPackage]; mcPackage.path = @"/measurement_consent"; - mcPackage.activityKind = ADJActivityKindThirdPartySharing; + mcPackage.activityKind = ADJActivityKindMeasurementConsent; mcPackage.suffix = @""; mcPackage.parameters = parameters; From 4844c92bd0295ab337f724a6ce197c1b0d6541ba Mon Sep 17 00:00:00 2001 From: uerceg Date: Sat, 16 Jan 2021 00:19:51 +0100 Subject: [PATCH 36/42] add ADJThirdPartySharing files to root Adjust folder --- Adjust.xcodeproj/project.pbxproj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Adjust.xcodeproj/project.pbxproj b/Adjust.xcodeproj/project.pbxproj index fd801d59c..c6e34f1ad 100644 --- a/Adjust.xcodeproj/project.pbxproj +++ b/Adjust.xcodeproj/project.pbxproj @@ -241,6 +241,8 @@ 9D2F24042447DD6000B7CA90 /* ADJSubscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D2F24022447DD6000B7CA90 /* ADJSubscription.m */; }; 9D2F24052447DD6000B7CA90 /* ADJSubscription.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D2F24032447DD6000B7CA90 /* ADJSubscription.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9D363AC31BDA50FA00B47FE9 /* ADJLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 96E5E37318BBB48A008E7B30 /* ADJLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9D651BF525B25A64006D69D6 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D651BE125B25A64006D69D6 /* ADJThirdPartySharing.m */; }; + 9D651BF625B25A64006D69D6 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D651BF425B25A64006D69D6 /* ADJThirdPartySharing.h */; }; 9D7431EA1EB9F9B700969F14 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7431E91EB9F9B700969F14 /* main.m */; }; 9D7431ED1EB9F9B700969F14 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7431EC1EB9F9B700969F14 /* AppDelegate.m */; }; 9D7431F01EB9F9B700969F14 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7431EF1EB9F9B700969F14 /* ViewController.m */; }; @@ -858,6 +860,8 @@ 9D449DBF1E6ED23900E7E80B /* AdjustExample-Swift.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "AdjustExample-Swift.xcodeproj"; path = "examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj"; sourceTree = ""; }; 9D449DC51E6ED24000E7E80B /* AdjustExample-tvOS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "AdjustExample-tvOS.xcodeproj"; path = "examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj"; sourceTree = ""; }; 9D449DCB1E6ED24400E7E80B /* AdjustExample-WebView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "AdjustExample-WebView.xcodeproj"; path = "examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj"; sourceTree = ""; }; + 9D651BE125B25A64006D69D6 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; + 9D651BF425B25A64006D69D6 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; 9D7431E61EB9F9B700969F14 /* AdjustExampleTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AdjustExampleTests.app; sourceTree = BUILT_PRODUCTS_DIR; }; 9D7431E91EB9F9B700969F14 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 9D7431EB1EB9F9B700969F14 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -1386,6 +1390,8 @@ 9D2F23E12447CE5C00B7CA90 /* ADJSubscription.m */, 6FBEE8F124E2C26F00FEF3F1 /* ADJUrlStrategy.h */, 6FBEE8F224E2C26F00FEF3F1 /* ADJUrlStrategy.m */, + 9D651BF425B25A64006D69D6 /* ADJThirdPartySharing.h */, + 9D651BE125B25A64006D69D6 /* ADJThirdPartySharing.m */, ); path = Adjust; sourceTree = ""; @@ -1946,6 +1952,7 @@ 965B7F301CC78F6600098639 /* ADJBackoffStrategy.h in Headers */, 96164D721CC8FA73009431AB /* ADJSdkClickHandler.h in Headers */, 9DF9C8B31D6ED228008E362F /* ADJKeychain.h in Headers */, + 9D651BF625B25A64006D69D6 /* ADJThirdPartySharing.h in Headers */, 96B671101D788EEC0090A023 /* ADJSessionParameters.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2609,6 +2616,7 @@ 96E5E39218BBB48A008E7B30 /* ADJAdjustFactory.m in Sources */, 96E5E39318BBB48A008E7B30 /* ADJLogger.m in Sources */, 96E5E39518BBB48A008E7B30 /* ADJPackageHandler.m in Sources */, + 9D651BF525B25A64006D69D6 /* ADJThirdPartySharing.m in Sources */, 96E5E39418BBB48A008E7B30 /* ADJPackageBuilder.m in Sources */, 6FCC85001F278CF300D6A0ED /* ADJReachability.m in Sources */, 96E5E39618BBB48A008E7B30 /* ADJRequestHandler.m in Sources */, From 6f9729537b09dbaf1bee0be1930043e792b0c161 Mon Sep 17 00:00:00 2001 From: uerceg Date: Sat, 16 Jan 2021 01:06:08 +0100 Subject: [PATCH 37/42] rename CNIL boolean to isEnabled --- Adjust/ADJPackageBuilder.m | 4 ++-- Adjust/ADJThirdPartySharing.h | 4 ++-- Adjust/ADJThirdPartySharing.m | 6 ++---- AdjustBridge/AdjustBridge.m | 11 +++++------ AdjustBridge/AdjustBridgeRegister.m | 5 +++-- .../AdjustTestApp/ATAAdjustCommandExecutor.m | 19 +++++++++---------- .../TestLibraryBridge.js | 16 ++++++++-------- 7 files changed, 31 insertions(+), 34 deletions(-) diff --git a/Adjust/ADJPackageBuilder.m b/Adjust/ADJPackageBuilder.m index bfd0da55b..6feaa3cfd 100644 --- a/Adjust/ADJPackageBuilder.m +++ b/Adjust/ADJPackageBuilder.m @@ -985,8 +985,8 @@ - (NSMutableDictionary *)getThirdPartySharingParameters:(nonnull ADJThirdPartySh [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.secretId forKey:@"secret_id"]; // Third Party Sharing - if (thirdPartySharing.enable != nil) { - NSString *enableValue = thirdPartySharing.enable.boolValue ? @"enable" : @"disable"; + if (thirdPartySharing.enabled != nil) { + NSString *enableValue = thirdPartySharing.enabled.boolValue ? @"enable" : @"disable"; [ADJPackageBuilder parameters:parameters setString:enableValue forKey:@"sharing"]; } [ADJPackageBuilder parameters:parameters diff --git a/Adjust/ADJThirdPartySharing.h b/Adjust/ADJThirdPartySharing.h index 2ec111c42..610ca80bc 100644 --- a/Adjust/ADJThirdPartySharing.h +++ b/Adjust/ADJThirdPartySharing.h @@ -10,13 +10,13 @@ @interface ADJThirdPartySharing : NSObject -- (nullable id)initWithEnableOrElseDisableNumberBool:(nullable NSNumber *)enableOrElseDisableNumberBool; +- (nullable id)initWithIsEnabledNumberBool:(nullable NSNumber *)isEnabledNumberBool; - (void)addGranularOption:(nonnull NSString *)partnerName key:(nonnull NSString *)key value:(nonnull NSString *)value; -@property (nonatomic, nullable, readonly, strong) NSNumber *enable; +@property (nonatomic, nullable, readonly, strong) NSNumber *enabled; @property (nonatomic, nonnull, readonly, strong) NSMutableDictionary *granularOptions; @end diff --git a/Adjust/ADJThirdPartySharing.m b/Adjust/ADJThirdPartySharing.m index a175f5a0c..d39709112 100644 --- a/Adjust/ADJThirdPartySharing.m +++ b/Adjust/ADJThirdPartySharing.m @@ -11,16 +11,14 @@ @implementation ADJThirdPartySharing -- (nullable id)initWithEnableOrElseDisableNumberBool: - (nullable NSNumber *)enableOrElseDisableNumberBool -{ +- (nullable id)initWithIsEnabledNumberBool:(nullable NSNumber *)isEnabledNumberBool { self = [super init]; if (self == nil) { return nil; } _granularOptions = [[NSMutableDictionary alloc] init]; - _enable = enableOrElseDisableNumberBool; + _enabled = isEnabledNumberBool; return self; } diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index 84d1f5b57..41d3c3f56 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -514,17 +514,16 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView }]; [self.bridgeRegister registerHandler:@"adjust_trackThirdPartySharing" handler:^(id data, WVJBResponseCallback responseCallback) { - id enableOrElseDisableO = [data objectForKey:@"enableOrElseDisable"]; + id isEnabledO = [data objectForKey:@"isEnabled"]; id granularOptions = [data objectForKey:@"granularOptions"]; - NSNumber *enableOrElseDisable = nil; - if ([enableOrElseDisableO isKindOfClass:[NSNumber class]]) { - enableOrElseDisable = (NSNumber *)enableOrElseDisable; + NSNumber *isEnabled = nil; + if ([isEnabledO isKindOfClass:[NSNumber class]]) { + isEnabled = (NSNumber *)isEnabledO; } ADJThirdPartySharing *adjustThirdPartySharing = - [[ADJThirdPartySharing alloc] - initWithEnableOrElseDisableNumberBool:enableOrElseDisable]; + [[ADJThirdPartySharing alloc] initWithIsEnabledNumberBool:isEnabled]; for (int i = 0; i < [granularOptions count]; i += 3) { NSString *partnerName = [[granularOptions objectAtIndex:i] description]; diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index 172a90d9e..bde051565 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -281,8 +281,9 @@ + (NSString *)adjust_js { this.callbackId = callbackId; }; - window.AdjustThirdPartySharing = function(enableOrElseDisable) { - this.enableOrElseDisable = enableOrElseDisable; + // Adjust Third Party Sharing + window.AdjustThirdPartySharing = function(isEnabled) { + this.isEnabled = isEnabled; this.granularOptions = []; }; diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m index 4af750c62..94584236f 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m +++ b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m @@ -567,19 +567,18 @@ - (void)disableThirdPartySharing:(NSDictionary *)parameters { } - (void)thirdPartySharing:(NSDictionary *)parameters { - NSString *enableOrElseDisableS = [parameters objectForKey:@"enableOrElseDisable"][0]; + NSString *isEnabledS = [parameters objectForKey:@"isEnabled"][0]; - NSNumber *enableOrElseDisable = nil; - if ([enableOrElseDisableS isEqualToString:@"true"]) { - enableOrElseDisable = [NSNumber numberWithBool:YES]; + NSNumber *isEnabled = nil; + if ([isEnabledS isEqualToString:@"true"]) { + isEnabled = [NSNumber numberWithBool:YES]; } - if ([enableOrElseDisableS isEqualToString:@"false"]) { - enableOrElseDisable = [NSNumber numberWithBool:NO]; + if ([isEnabledS isEqualToString:@"false"]) { + isEnabled = [NSNumber numberWithBool:NO]; } ADJThirdPartySharing *adjustThirdPartySharing = - [[ADJThirdPartySharing alloc] - initWithEnableOrElseDisableNumberBool:enableOrElseDisable]; + [[ADJThirdPartySharing alloc] initWithIsEnabledNumberBool:isEnabled]; if ([parameters objectForKey:@"granularOptions"]) { NSArray *granularOptions = [parameters objectForKey:@"granularOptions"]; @@ -595,8 +594,8 @@ - (void)thirdPartySharing:(NSDictionary *)parameters { } - (void)measurementConsent:(NSDictionary *)parameters { - NSString *enableOrElseDisableS = [parameters objectForKey:@"enableOrElseDisable"][0]; - [Adjust trackMeasurementConsent:[enableOrElseDisableS boolValue]]; + NSString *isEnabledS = [parameters objectForKey:@"isEnabled"][0]; + [Adjust trackMeasurementConsent:[isEnabledS boolValue]]; } - (void)trackSubscription:(NSDictionary *)parameters { diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js index 1dae4206f..ec27230bf 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js @@ -562,17 +562,17 @@ AdjustCommandExecutor.prototype.disableThirdPartySharing = function(params) { }; AdjustCommandExecutor.prototype.thirdPartySharing = function(params) { - var enableOrElseDisableS = getFirstValue(params, 'enableOrElseDisable'); + var isEnabledS = getFirstValue(params, 'isEnabled'); - var enableOrElseDisable = null; - if (enableOrElseDisableS == 'true') { - enableOrElseDisable = true; + var isEnabled = null; + if (isEnabledS == 'true') { + isEnabled = true; } - if (enableOrElseDisableS == 'false') { - enableOrElseDisable = false; + if (isEnabledS == 'false') { + isEnabled = false; } - var adjustThirdPartySharing = new AdjustThirdPartySharing(enableOrElseDisable); + var adjustThirdPartySharing = new AdjustThirdPartySharing(isEnabled); if ('granularOptions' in params) { var granularOptions = getValues(params, 'granularOptions'); @@ -588,7 +588,7 @@ AdjustCommandExecutor.prototype.thirdPartySharing = function(params) { }; AdjustCommandExecutor.prototype.measurementConsent = function(params) { - var consentMeasurement = getFirstValue(params, 'enableOrElseDisable') == 'true'; + var consentMeasurement = getFirstValue(params, 'isEnabled') == 'true'; Adjust.trackMeasurementConsent(consentMeasurement); }; From 39cdb3fc6be6894d2667311f068a74c82d36942e Mon Sep 17 00:00:00 2001 From: uerceg Date: Sat, 16 Jan 2021 01:16:19 +0100 Subject: [PATCH 38/42] fix trackMeasurementConsent hooking in web bridge --- AdjustBridge/AdjustBridge.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index 41d3c3f56..66cd588df 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -535,8 +535,11 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView [Adjust trackThirdPartySharing:adjustThirdPartySharing]; }]; - [self.bridgeRegister registerHandler:@"adjust_disableThirdPartySharing" handler:^(id data, WVJBResponseCallback responseCallback) { - [Adjust disableThirdPartySharing]; + [self.bridgeRegister registerHandler:@"adjust_trackMeasurementConsent" handler:^(id data, WVJBResponseCallback responseCallback) { + if (![data isKindOfClass:[NSNumber class]]) { + return; + } + [Adjust trackMeasurementConsent:[(NSNumber *)data boolValue]]; }]; From a230a388b9cfb002dc5c7f4b9e3a1f06280444c5 Mon Sep 17 00:00:00 2001 From: uerceg Date: Sat, 16 Jan 2021 01:24:44 +0100 Subject: [PATCH 39/42] fix call to trackThirdPartySharing method in web bridge command executor --- .../AdjustWebBridgeTestApp/TestLibraryBridge.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js index ec27230bf..d4de31602 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js @@ -584,7 +584,7 @@ AdjustCommandExecutor.prototype.thirdPartySharing = function(params) { } } - Adjust.trackMeasurementConsent(adjustThirdPartySharing); + Adjust.trackThirdPartySharing(adjustThirdPartySharing); }; AdjustCommandExecutor.prototype.measurementConsent = function(params) { From 8e4b64ac9f2f5aa211c8d586bb9b9b982275d0a5 Mon Sep 17 00:00:00 2001 From: uerceg Date: Sat, 16 Jan 2021 01:33:56 +0100 Subject: [PATCH 40/42] version update to 4.25.0 --- Adjust.podspec | 4 ++-- Adjust/ADJUtil.m | 2 +- Adjust/Adjust.h | 2 +- AdjustBridge/AdjustBridgeRegister.m | 2 +- AdjustTests/AdjustUnitTests/ADJPackageFields.m | 2 +- README.md | 4 ++-- VERSION | 2 +- doc/chinese/README.md | 4 ++-- doc/english/migrate.md | 2 +- doc/english/web_views.md | 2 +- doc/japanese/README.md | 4 ++-- doc/korean/README.md | 4 ++-- doc/korean/web_views.md | 2 +- doc/migrate.md | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Adjust.podspec b/Adjust.podspec index e5e8d48a9..8d98a56e4 100644 --- a/Adjust.podspec +++ b/Adjust.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |s| s.name = "Adjust" - s.version = "4.24.0" + s.version = "4.25.0" s.summary = "This is the iOS SDK of adjust. You can read more about it at http://adjust.com." s.homepage = "https://github.com/adjust/ios_sdk" s.license = { :type => 'MIT', :file => 'MIT-LICENSE' } s.author = { "Christian Wellenbrock" => "welle@adjust.com" } - s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.24.0" } + s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.25.0" } s.ios.deployment_target = '6.0' s.tvos.deployment_target = '9.0' s.framework = 'SystemConfiguration' diff --git a/Adjust/ADJUtil.m b/Adjust/ADJUtil.m index 4b6ab811c..119ebe383 100644 --- a/Adjust/ADJUtil.m +++ b/Adjust/ADJUtil.m @@ -37,7 +37,7 @@ static CTTelephonyNetworkInfo *networkInfo = nil; #endif -static NSString * const kClientSdk = @"ios4.24.0"; +static NSString * const kClientSdk = @"ios4.25.0"; static NSString * const kDeeplinkParam = @"deep_link="; static NSString * const kSchemeDelimiter = @"://"; static NSString * const kDefaultScheme = @"AdjustUniversalScheme"; diff --git a/Adjust/Adjust.h b/Adjust/Adjust.h index 7673dc68c..cc8ab108d 100644 --- a/Adjust/Adjust.h +++ b/Adjust/Adjust.h @@ -2,7 +2,7 @@ // Adjust.h // Adjust // -// V4.24.0 +// V4.25.0 // Created by Christian Wellenbrock (wellle) on 23rd July 2013. // Copyright © 2012-2017 Adjust GmbH. All rights reserved. // diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index bde051565..f5c6f97e9 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -241,7 +241,7 @@ + (NSString *)adjust_js { if (this.sdkPrefix) { return this.sdkPrefix; } else { - return 'web-bridge4.24.0'; + return 'web-bridge4.25.0'; } }, setTestOptions: function(testOptions) { diff --git a/AdjustTests/AdjustUnitTests/ADJPackageFields.m b/AdjustTests/AdjustUnitTests/ADJPackageFields.m index 7ceeaaee2..8f0fa67d4 100644 --- a/AdjustTests/AdjustUnitTests/ADJPackageFields.m +++ b/AdjustTests/AdjustUnitTests/ADJPackageFields.m @@ -16,7 +16,7 @@ - (id) init { // default values self.appToken = @"qwerty123456"; - self.clientSdk = @"ios4.24.0"; + self.clientSdk = @"ios4.25.0"; self.suffix = @""; self.environment = @"sandbox"; diff --git a/README.md b/README.md index 58066cfce..c270f7834 100644 --- a/README.md +++ b/README.md @@ -79,13 +79,13 @@ We will describe the steps to integrate the Adjust SDK into your iOS project. We If you're using [CocoaPods][cocoapods], you can add the following line to your `Podfile` and continue from [this step](#sdk-integrate): ```ruby -pod 'Adjust', '~> 4.24.0' +pod 'Adjust', '~> 4.25.0' ``` or: ```ruby -pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.24.0' +pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.25.0' ``` --- diff --git a/VERSION b/VERSION index 252fdf2cb..4d9fbcf24 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.24.0 +4.25.0 diff --git a/doc/chinese/README.md b/doc/chinese/README.md index 64ab6048a..307cbdccd 100644 --- a/doc/chinese/README.md +++ b/doc/chinese/README.md @@ -76,13 +76,13 @@ Read this in other languages: [English][en-readme], [中文][zh-readme], [日本 如果您正在使用[CocoaPods][cocoapods],您可以将以下代码行添加至 `Podfile`,然后继续进行[此步骤](#sdk-integrate): ```ruby -pod 'Adjust', '~> 4.24.0' +pod 'Adjust', '~> 4.25.0' ``` 或: ```ruby -pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.24.0' +pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.25.0' ``` --- diff --git a/doc/english/migrate.md b/doc/english/migrate.md index 173079b80..291526e29 100644 --- a/doc/english/migrate.md +++ b/doc/english/migrate.md @@ -1,4 +1,4 @@ -## Migrate your Adjust SDK for iOS to v4.24.0 from v3.4.0 +## Migrate your Adjust SDK for iOS to v4.25.0 from v3.4.0 ### Initial setup diff --git a/doc/english/web_views.md b/doc/english/web_views.md index e25679ba6..520d3ccab 100644 --- a/doc/english/web_views.md +++ b/doc/english/web_views.md @@ -64,7 +64,7 @@ We will describe the steps to integrate the Adjust SDK into your iOS project. We If you're using [CocoaPods][cocoapods], you can add the following line to your `Podfile` and continue from [this step](#sdk-integrate): ```ruby -pod 'Adjust/WebBridge', '~> 4.24.0' +pod 'Adjust/WebBridge', '~> 4.25.0' ``` --- diff --git a/doc/japanese/README.md b/doc/japanese/README.md index 9b894c234..d87941a8d 100644 --- a/doc/japanese/README.md +++ b/doc/japanese/README.md @@ -25,13 +25,13 @@ adjust SDKをiOSプロジェクトに連携する手順を説明します。 [こちらの手順](#sdk-integrate)に進んでください。 ```ruby -pod 'Adjust', '~> 4.24.0' +pod 'Adjust', '~> 4.25.0' ``` または ```ruby -pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.24.0' +pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.25.0' ``` --- diff --git a/doc/korean/README.md b/doc/korean/README.md index f22f2ee0a..04e94a0d1 100644 --- a/doc/korean/README.md +++ b/doc/korean/README.md @@ -76,13 +76,13 @@ iOS 개발용 Xcode를 사용한다는 가정하에 iOS 프로젝트에 Adjust S [CocoaPods][cocoapods]를 사용하는 경우, 다음 내용을 `Podfile`에 추가한 후 [해당 단계](#sdk-integrate)를 완료하세요. ```ruby -pod 'Adjust', '~> 4.24.0' +pod 'Adjust', '~> 4.25.0' ``` 또는: ```ruby -pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.24.0' +pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.25.0' ``` --- diff --git a/doc/korean/web_views.md b/doc/korean/web_views.md index 51b5673fe..2d8658ecc 100644 --- a/doc/korean/web_views.md +++ b/doc/korean/web_views.md @@ -64,7 +64,7 @@ iOS 개발용 Xcode를 사용한다는 가정하에 iOS 프로젝트에 Adjust S [CocoaPods][cocoapods]를 사용하는 경우, 다음 내용을 'Podfile'에 추가한 후 [해당 단계](#sdk-integrate)를 완료하세요. ```ruby -pod 'Adjust/WebBridge', '~> 4.24.0' +pod 'Adjust/WebBridge', '~> 4.25.0' ``` --- diff --git a/doc/migrate.md b/doc/migrate.md index 173079b80..291526e29 100644 --- a/doc/migrate.md +++ b/doc/migrate.md @@ -1,4 +1,4 @@ -## Migrate your Adjust SDK for iOS to v4.24.0 from v3.4.0 +## Migrate your Adjust SDK for iOS to v4.25.0 from v3.4.0 ### Initial setup From ebecfaec22b435a6dbd576a9c97d5e8435652c89 Mon Sep 17 00:00:00 2001 From: uerceg Date: Sat, 16 Jan 2021 01:37:10 +0100 Subject: [PATCH 41/42] update CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ad6fb5b7..3c52d79ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +### Version 4.25.0 (16th January 2021) +#### Added +- Added support for Apple Search Ads attribution with usage of `AdServices.framework`. +- Added `appTrackingAuthorizationStatus` getter to `Adjust` instance to be able to get current app tracking status. +- Added improved measurement consent management and third party sharing system. + +--- + ### Version 4.24.0 (9th December 2020) #### Added - Added possibility to get cost data information in attribution callback. From b094e89ef98106bf479505c5af996faa6ecd9ca3 Mon Sep 17 00:00:00 2001 From: uerceg Date: Sat, 16 Jan 2021 01:44:53 +0100 Subject: [PATCH 42/42] add ADJThirdPartySharing.h to list of public headers --- Adjust.xcodeproj/project.pbxproj | 38 +++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/Adjust.xcodeproj/project.pbxproj b/Adjust.xcodeproj/project.pbxproj index c6e34f1ad..cf3cb08a1 100644 --- a/Adjust.xcodeproj/project.pbxproj +++ b/Adjust.xcodeproj/project.pbxproj @@ -23,9 +23,9 @@ /* Begin PBXBuildFile section */ 2067002A1F18BDC700B4FDE1 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9601C19C1A31DD7F00A9AE21 /* CoreTelephony.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 6F84512425B1B1380004C7C0 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F84511025B1B1380004C7C0 /* ADJThirdPartySharing.h */; }; + 6F84512425B1B1380004C7C0 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F84511025B1B1380004C7C0 /* ADJThirdPartySharing.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6F84512525B1B1380004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84512325B1B1380004C7C0 /* ADJThirdPartySharing.m */; }; - 6FBE0C6E2577CDAC00EC2CE0 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FBE0C6C2577CDAC00EC2CE0 /* ADJThirdPartySharing.h */; }; + 6FBE0C6E2577CDAC00EC2CE0 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FBE0C6C2577CDAC00EC2CE0 /* ADJThirdPartySharing.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6FBE0C6F2577CDAC00EC2CE0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBE0C6D2577CDAC00EC2CE0 /* ADJThirdPartySharing.m */; }; 6FBEE92624E422EB00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE92424E422EB00FEF3F1 /* ADJUrlStrategy.m */; }; 6FBEE92724E422EB00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE92424E422EB00FEF3F1 /* ADJUrlStrategy.m */; }; @@ -242,7 +242,11 @@ 9D2F24052447DD6000B7CA90 /* ADJSubscription.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D2F24032447DD6000B7CA90 /* ADJSubscription.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9D363AC31BDA50FA00B47FE9 /* ADJLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 96E5E37318BBB48A008E7B30 /* ADJLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9D651BF525B25A64006D69D6 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D651BE125B25A64006D69D6 /* ADJThirdPartySharing.m */; }; - 9D651BF625B25A64006D69D6 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D651BF425B25A64006D69D6 /* ADJThirdPartySharing.h */; }; + 9D651BF625B25A64006D69D6 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D651BF425B25A64006D69D6 /* ADJThirdPartySharing.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9D651C8825B26DF5006D69D6 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D651C8625B26DF4006D69D6 /* ADJThirdPartySharing.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9D651C8925B26DF5006D69D6 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D651C8725B26DF5006D69D6 /* ADJThirdPartySharing.m */; }; + 9D651C9525B26E1B006D69D6 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D651C9325B26E1B006D69D6 /* ADJThirdPartySharing.m */; }; + 9D651C9625B26E1B006D69D6 /* ADJThirdPartySharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D651C9425B26E1B006D69D6 /* ADJThirdPartySharing.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9D7431EA1EB9F9B700969F14 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7431E91EB9F9B700969F14 /* main.m */; }; 9D7431ED1EB9F9B700969F14 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7431EC1EB9F9B700969F14 /* AppDelegate.m */; }; 9D7431F01EB9F9B700969F14 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7431EF1EB9F9B700969F14 /* ViewController.m */; }; @@ -862,6 +866,10 @@ 9D449DCB1E6ED24400E7E80B /* AdjustExample-WebView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "AdjustExample-WebView.xcodeproj"; path = "examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj"; sourceTree = ""; }; 9D651BE125B25A64006D69D6 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; 9D651BF425B25A64006D69D6 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; + 9D651C8625B26DF4006D69D6 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; + 9D651C8725B26DF5006D69D6 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; + 9D651C9325B26E1B006D69D6 /* ADJThirdPartySharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJThirdPartySharing.m; sourceTree = ""; }; + 9D651C9425B26E1B006D69D6 /* ADJThirdPartySharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJThirdPartySharing.h; sourceTree = ""; }; 9D7431E61EB9F9B700969F14 /* AdjustExampleTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AdjustExampleTests.app; sourceTree = BUILT_PRODUCTS_DIR; }; 9D7431E91EB9F9B700969F14 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 9D7431EB1EB9F9B700969F14 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -1706,6 +1714,8 @@ 9D2F23FB2447DD2500B7CA90 /* ADJSubscription.m */, 6FBEE92A24E4230700FEF3F1 /* ADJUrlStrategy.h */, 6FBEE92B24E4230700FEF3F1 /* ADJUrlStrategy.m */, + 9D651C8625B26DF4006D69D6 /* ADJThirdPartySharing.h */, + 9D651C8725B26DF5006D69D6 /* ADJThirdPartySharing.m */, ); path = Adjust; sourceTree = SOURCE_ROOT; @@ -1894,6 +1904,8 @@ 9D2F23FF2447DD3700B7CA90 /* ADJSubscription.m */, 6FBEE92E24E4231300FEF3F1 /* ADJUrlStrategy.h */, 6FBEE92F24E4231300FEF3F1 /* ADJUrlStrategy.m */, + 9D651C9425B26E1B006D69D6 /* ADJThirdPartySharing.h */, + 9D651C9325B26E1B006D69D6 /* ADJThirdPartySharing.m */, ); path = Adjust; sourceTree = SOURCE_ROOT; @@ -1926,11 +1938,12 @@ 96BCFBD11AC99246005A65C5 /* ADJAttribution.h in Headers */, 9D2F23E22447CE5C00B7CA90 /* ADJSubscription.h in Headers */, 9601CAE81C74BAAE00670879 /* ADJEventFailure.h in Headers */, + 968173871C3C2D36002AE1DE /* ADJSessionFailure.h in Headers */, + 968173831C3C2D07002AE1DE /* ADJSessionSuccess.h in Headers */, 9601CAE41C74B70600670879 /* ADJEventSuccess.h in Headers */, 6FCC85011F278CF300D6A0ED /* ADJReachability.h in Headers */, + 9D651BF625B25A64006D69D6 /* ADJThirdPartySharing.h in Headers */, 96BCFBD41AC99338005A65C5 /* NSData+ADJAdditions.h in Headers */, - 968173871C3C2D36002AE1DE /* ADJSessionFailure.h in Headers */, - 968173831C3C2D07002AE1DE /* ADJSessionSuccess.h in Headers */, 96BCFBD21AC99332005A65C5 /* NSString+ADJAdditions.h in Headers */, 96BCFBD31AC99336005A65C5 /* UIDevice+ADJAdditions.h in Headers */, 96BCFBD51AC9933E005A65C5 /* ADJActivityHandler.h in Headers */, @@ -1952,7 +1965,6 @@ 965B7F301CC78F6600098639 /* ADJBackoffStrategy.h in Headers */, 96164D721CC8FA73009431AB /* ADJSdkClickHandler.h in Headers */, 9DF9C8B31D6ED228008E362F /* ADJKeychain.h in Headers */, - 9D651BF625B25A64006D69D6 /* ADJThirdPartySharing.h in Headers */, 96B671101D788EEC0090A023 /* ADJSessionParameters.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2019,10 +2031,11 @@ 9D2F23FC2447DD2500B7CA90 /* ADJSubscription.h in Headers */, 9DEAF0FD210072BC005CAEDB /* ADJAttribution.h in Headers */, 9DEAF12E210072BC005CAEDB /* ADJSessionSuccess.h in Headers */, + 9DEAF132210072BC005CAEDB /* ADJLogger.h in Headers */, + 9DEAF12C210072BC005CAEDB /* ADJEventFailure.h in Headers */, 9DEAF128210072BC005CAEDB /* ADJSessionFailure.h in Headers */, 9DEAF12B210072BC005CAEDB /* ADJEventSuccess.h in Headers */, - 9DEAF12C210072BC005CAEDB /* ADJEventFailure.h in Headers */, - 9DEAF132210072BC005CAEDB /* ADJLogger.h in Headers */, + 9D651C8825B26DF5006D69D6 /* ADJThirdPartySharing.h in Headers */, 9DEAF107210072BC005CAEDB /* ADJAdjustFactory.h in Headers */, 9DEAF100210072BC005CAEDB /* ADJActivityKind.h in Headers */, 9DEAF112210072BC005CAEDB /* ADJUserDefaults.h in Headers */, @@ -2063,8 +2076,9 @@ 9D2F23F92447DCE800B7CA90 /* ADJSubscription.h in Headers */, 9DF9C9251D6F3CA5008E362F /* ADJEventFailure.h in Headers */, 9DF9C9271D6F3CA5008E362F /* ADJEventSuccess.h in Headers */, - 9DF9C9371D6F3CA5008E362F /* ADJSessionFailure.h in Headers */, 9DF9C9391D6F3CA5008E362F /* ADJSessionSuccess.h in Headers */, + 9DF9C9371D6F3CA5008E362F /* ADJSessionFailure.h in Headers */, + 6FBE0C6E2577CDAC00EC2CE0 /* ADJThirdPartySharing.h in Headers */, 9DDF24431F7BE4BA001C1A70 /* ADJUserDefaults.h in Headers */, 6FCC85041F27945E00D6A0ED /* ADJReachability.h in Headers */, 9DF9C9111D6F3CA5008E362F /* NSData+ADJAdditions.h in Headers */, @@ -2072,7 +2086,6 @@ 9DF9C9151D6F3CA5008E362F /* UIDevice+ADJAdditions.h in Headers */, 9DF9C9091D6F3CA5008E362F /* ADJActivityHandler.h in Headers */, 9DF9C90B1D6F3CA5008E362F /* ADJActivityKind.h in Headers */, - 6FBE0C6E2577CDAC00EC2CE0 /* ADJThirdPartySharing.h in Headers */, 9DF9C90D1D6F3CA5008E362F /* ADJActivityPackage.h in Headers */, 9DF9C90F1D6F3CA5008E362F /* ADJActivityState.h in Headers */, 9DF9C9171D6F3CA5008E362F /* ADJAdjustFactory.h in Headers */, @@ -2107,8 +2120,9 @@ 9D2F24002447DD3700B7CA90 /* ADJSubscription.h in Headers */, 9DFB06761D7470C0006D48FC /* ADJEventFailure.h in Headers */, 9DFB06781D7470C0006D48FC /* ADJEventSuccess.h in Headers */, - 9DFB06881D7470C0006D48FC /* ADJSessionFailure.h in Headers */, 9DFB068A1D7470C0006D48FC /* ADJSessionSuccess.h in Headers */, + 9DFB06881D7470C0006D48FC /* ADJSessionFailure.h in Headers */, + 9D651C9625B26E1B006D69D6 /* ADJThirdPartySharing.h in Headers */, 9DDF24451F7BE4E7001C1A70 /* ADJUserDefaults.h in Headers */, 6FCC85081F27948C00D6A0ED /* ADJReachability.h in Headers */, 9DFB06621D7470C0006D48FC /* NSData+ADJAdditions.h in Headers */, @@ -2751,6 +2765,7 @@ 9DEAF113210072BC005CAEDB /* Adjust.m in Sources */, 9DEAF136210072BC005CAEDB /* ADJActivityHandler.m in Sources */, 9DEAF0FE210072BC005CAEDB /* ADJKeychain.m in Sources */, + 9D651C8925B26DF5006D69D6 /* ADJThirdPartySharing.m in Sources */, 9DEAF10A210072BC005CAEDB /* ADJSessionFailure.m in Sources */, 9DEAF121210072BC005CAEDB /* UIDevice+ADJAdditions.m in Sources */, 9DEAF105210072BC005CAEDB /* ADJSessionSuccess.m in Sources */, @@ -2836,6 +2851,7 @@ 9DFB06611D7470C0006D48FC /* ADJActivityState.m in Sources */, 9DFB06691D7470C0006D48FC /* ADJAdjustFactory.m in Sources */, 9DFB067D1D7470C0006D48FC /* ADJLogger.m in Sources */, + 9D651C9525B26E1B006D69D6 /* ADJThirdPartySharing.m in Sources */, 9DFB067F1D7470C0006D48FC /* ADJPackageBuilder.m in Sources */, 9DFB06811D7470C0006D48FC /* ADJPackageHandler.m in Sources */, 6FCC85091F27949000D6A0ED /* ADJReachability.m in Sources */,