diff --git a/Adjust.podspec b/Adjust.podspec index e93f7f858..4d4f9dab2 100644 --- a/Adjust.podspec +++ b/Adjust.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |s| s.name = "Adjust" - s.version = "4.37.2" + s.version = "4.38.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 = { "Adjust" => "sdk@adjust.com" } - s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.37.2" } + s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.38.0" } s.ios.deployment_target = '9.0' s.tvos.deployment_target = '9.0' s.framework = 'SystemConfiguration' @@ -17,6 +17,7 @@ Pod::Spec.new do |s| s.subspec 'Core' do |co| co.source_files = 'Adjust/*.{h,m}', 'Adjust/ADJAdditions/*.{h,m}' + co.resource_bundle = {'Adjust' => ['Adjust/*.xcprivacy']} end s.subspec 'Sociomantic' do |sm| diff --git a/Adjust.xcodeproj/project.pbxproj b/Adjust.xcodeproj/project.pbxproj index 8ba87afc7..eef00aebd 100644 --- a/Adjust.xcodeproj/project.pbxproj +++ b/Adjust.xcodeproj/project.pbxproj @@ -22,6 +22,9 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 07BFEAA22A49E3DA004E29D9 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 07BFEAA12A49E3DA004E29D9 /* PrivacyInfo.xcprivacy */; }; + 07BFEAA32A49E3DA004E29D9 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 07BFEAA12A49E3DA004E29D9 /* PrivacyInfo.xcprivacy */; }; + 07BFEAA42A49E3DA004E29D9 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 07BFEAA12A49E3DA004E29D9 /* PrivacyInfo.xcprivacy */; }; 0A67F1D92919641D00AC684A /* ADJSKAdNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DF212D32909E86A0056D579 /* ADJSKAdNetwork.m */; }; 0A67F1DA2919641E00AC684A /* ADJSKAdNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DF212D32909E86A0056D579 /* ADJSKAdNetwork.m */; }; 0A67F1DB2919641F00AC684A /* ADJSKAdNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DF212D32909E86A0056D579 /* ADJSKAdNetwork.m */; }; @@ -947,6 +950,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 07BFEAA12A49E3DA004E29D9 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 0AB1C97127DD450D00509231 /* libAdjustSdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAdjustSdk.a; sourceTree = BUILT_PRODUCTS_DIR; }; 0AB1C97327DD450D00509231 /* AdjustSdk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AdjustSdk.h; sourceTree = ""; }; 0AB1C9F627DD5B5100509231 /* ModuleMap */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ModuleMap; sourceTree = ""; }; @@ -1675,6 +1679,7 @@ 96E5E34B18BBB48A008E7B30 /* Adjust */ = { isa = PBXGroup; children = ( + 07BFEAA12A49E3DA004E29D9 /* PrivacyInfo.xcprivacy */, 96CD2BDB1A13BFC600A40AFB /* ADJAdditions */, 96E5E34C18BBB48A008E7B30 /* Adjust.h */, 96E5E34D18BBB48A008E7B30 /* Adjust.m */, @@ -2993,6 +2998,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 07BFEAA42A49E3DA004E29D9 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3007,6 +3013,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 07BFEAA32A49E3DA004E29D9 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3014,6 +3021,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 07BFEAA22A49E3DA004E29D9 /* PrivacyInfo.xcprivacy in Resources */, 0AB1C9F727DD5B5100509231 /* ModuleMap in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index b2492deb6..d4c67e515 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -2625,9 +2625,9 @@ - (void)updatePackagesAttStatusAndIdfaI:(ADJActivityHandler *)selfI { // update activity packages int attStatus = [ADJUtil attStatus]; if (attStatus != 0) { - [selfI.packageHandler updatePackagesWithIdfaAndAttStatus]; - [selfI.sdkClickHandler updatePackagesWithIdfaAndAttStatus]; - [selfI.purchaseVerificationHandler updatePackagesWithIdfaAndAttStatus]; + [selfI.packageHandler updatePackagesWithAttStatus:attStatus]; + [selfI.sdkClickHandler updatePackagesWithAttStatus:attStatus]; + [selfI.purchaseVerificationHandler updatePackagesWithAttStatus:attStatus]; } selfI.internalState.updatePackagesAttData = NO; diff --git a/Adjust/ADJAdjustFactory.h b/Adjust/ADJAdjustFactory.h index 286995dd8..bb4de2b3f 100644 --- a/Adjust/ADJAdjustFactory.h +++ b/Adjust/ADJAdjustFactory.h @@ -18,6 +18,8 @@ + (double)sessionInterval; + (double)subsessionInterval; + (double)requestTimeout; ++ (NSNumber *)attStatus; ++ (NSString *)idfa; + (NSTimeInterval)timerInterval; + (NSTimeInterval)timerStart; + (ADJBackoffStrategy *)packageHandlerBackoffStrategy; @@ -26,15 +28,14 @@ + (BOOL)testing; + (NSTimeInterval)maxDelayStart; -+ (NSString *)baseUrl; -+ (NSString *)gdprUrl; -+ (NSString *)subscriptionUrl; -+ (NSString *)purchaseVerificationUrl; ++ (NSString *)urlOverwrite; + (BOOL)adServicesFrameworkEnabled; + (void)setLogger:(id)logger; + (void)setSessionInterval:(double)sessionInterval; + (void)setSubsessionInterval:(double)subsessionInterval; ++ (void)setAttStatus:(NSNumber *)attStatus; ++ (void)setIdfa:(NSString *)idfa; + (void)setRequestTimeout:(double)requestTimeout; + (void)setTimerInterval:(NSTimeInterval)timerInterval; + (void)setTimerStart:(NSTimeInterval)timerStart; @@ -43,10 +44,7 @@ + (void)setTesting:(BOOL)testing; + (void)setAdServicesFrameworkEnabled:(BOOL)adServicesFrameworkEnabled; + (void)setMaxDelayStart:(NSTimeInterval)maxDelayStart; -+ (void)setBaseUrl:(NSString *)baseUrl; -+ (void)setGdprUrl:(NSString *)gdprUrl; -+ (void)setSubscriptionUrl:(NSString *)subscriptionUrl; -+ (void)setPurchaseVerificationUrl:(NSString *)purchaseVerificationUrl; ++ (void)setUrlOverwrite:(NSString *)urlOverwrite; + (void)enableSigning; + (void)disableSigning; diff --git a/Adjust/ADJAdjustFactory.m b/Adjust/ADJAdjustFactory.m index b15d5ab9c..f0d6c9cf9 100644 --- a/Adjust/ADJAdjustFactory.m +++ b/Adjust/ADJAdjustFactory.m @@ -15,6 +15,8 @@ static double internalSessionInterval = -1; static double intervalSubsessionInterval = -1; static double internalRequestTimeout = -1; +static NSNumber * internalAttStatus = nil; +static NSString * internalIdfa = nil; static NSTimeInterval internalTimerInterval = -1; static NSTimeInterval intervalTimerStart = -1; static ADJBackoffStrategy * packageHandlerBackoffStrategy = nil; @@ -24,10 +26,7 @@ static NSTimeInterval internalMaxDelayStart = -1; static BOOL internalAdServicesFrameworkEnabled = YES; -static NSString * internalBaseUrl = nil; -static NSString * internalGdprUrl = nil; -static NSString * internalSubscriptionUrl = nil; -static NSString * internalPurchaseVerificationUrl = nil; +static NSString * internalUrlOverwrite = nil; @implementation ADJAdjustFactory @@ -60,6 +59,14 @@ + (double)requestTimeout { return internalRequestTimeout; } ++ (NSNumber *)attStatus { + return internalAttStatus; +} + ++ (NSString *)idfa { + return internalIdfa; +} + + (NSTimeInterval)timerInterval { if (internalTimerInterval < 0) { return 60; // 1 minute @@ -110,20 +117,8 @@ + (NSTimeInterval)maxDelayStart { return internalMaxDelayStart; } -+ (NSString *)baseUrl { - return internalBaseUrl; -} - -+ (NSString *)gdprUrl { - return internalGdprUrl; -} - -+ (NSString *)subscriptionUrl { - return internalSubscriptionUrl; -} - -+ (NSString *)purchaseVerificationUrl { - return internalPurchaseVerificationUrl; ++ (NSString *)urlOverwrite { + return internalUrlOverwrite; } + (void)setLogger:(id)logger { @@ -137,6 +132,13 @@ + (void)setSessionInterval:(double)sessionInterval { + (void)setSubsessionInterval:(double)subsessionInterval { intervalSubsessionInterval = subsessionInterval; } ++ (void)setAttStatus:(NSNumber *)attStatus { + internalAttStatus = attStatus; +} + ++ (void)setIdfa:(NSString *)idfa { + internalIdfa = idfa; +} + (void)setRequestTimeout:(double)requestTimeout { internalRequestTimeout = requestTimeout; @@ -170,20 +172,8 @@ + (void)setMaxDelayStart:(NSTimeInterval)maxDelayStart { internalMaxDelayStart = maxDelayStart; } -+ (void)setBaseUrl:(NSString *)baseUrl { - internalBaseUrl = baseUrl; -} - -+ (void)setGdprUrl:(NSString *)gdprUrl { - internalGdprUrl = gdprUrl; -} - -+ (void)setSubscriptionUrl:(NSString *)subscriptionUrl { - internalSubscriptionUrl = subscriptionUrl; -} - -+ (void)setPurchaseVerificationUrl:(NSString *)purchaseVerificationUrl { - internalPurchaseVerificationUrl = purchaseVerificationUrl; ++ (void)setUrlOverwrite:(NSString *)urlOverwrite { + internalUrlOverwrite = urlOverwrite; } + (void)enableSigning { @@ -240,15 +230,14 @@ + (void)teardown:(BOOL)deleteState { internalTimerInterval = -1; intervalTimerStart = -1; internalRequestTimeout = -1; + internalAttStatus = nil; + internalIdfa = nil; packageHandlerBackoffStrategy = nil; sdkClickHandlerBackoffStrategy = nil; installSessionBackoffStrategy = nil; internalTesting = NO; internalMaxDelayStart = -1; - internalBaseUrl = nil; - internalGdprUrl = nil; - internalSubscriptionUrl = nil; - internalPurchaseVerificationUrl = nil; + internalUrlOverwrite = nil; internalAdServicesFrameworkEnabled = YES; } @end diff --git a/Adjust/ADJPackageBuilder.h b/Adjust/ADJPackageBuilder.h index bfaf1b9a2..f57091304 100644 --- a/Adjust/ADJPackageBuilder.h +++ b/Adjust/ADJPackageBuilder.h @@ -94,10 +94,16 @@ + (BOOL)isAdServicesPackage:(ADJActivityPackage * _Nullable)activityPackage; -+ (void)addIdfaToParameters:(NSMutableDictionary * _Nullable)parameters - withConfig:(ADJConfig * _Nullable)adjConfig - logger:(id _Nullable)logger - packageParams:(ADJPackageParams * _Nullable)packageParams; ++ (void)addConsentDataToParameters:(NSMutableDictionary * _Nullable)parameters + forActivityKind:(ADJActivityKind)activityKind + withAttStatus:(NSString * _Nullable)attStatusString + configuration:(ADJConfig * _Nullable)adjConfig + packageParams:(ADJPackageParams * _Nullable)packageParams; + ++ (void)removeConsentDataFromParameters:(nonnull NSMutableDictionary *)parameters; + ++ (void)updateAttStatusInParameters:(nonnull NSMutableDictionary *)parameters; + @end // TODO change to ADJ... extern NSString * _Nullable const ADJAttributionTokenParameter; diff --git a/Adjust/ADJPackageBuilder.m b/Adjust/ADJPackageBuilder.m index e7804a78e..fc67e01f5 100644 --- a/Adjust/ADJPackageBuilder.m +++ b/Adjust/ADJPackageBuilder.m @@ -336,8 +336,6 @@ - (NSMutableDictionary *)getSessionParameters:(BOOL)isInDelay { [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -357,9 +355,6 @@ - (NSMutableDictionary *)getSessionParameters:(BOOL)isInDelay { if (self.adjustConfig.isDeviceKnown) { [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } if (self.activityState != nil) { [ADJPackageBuilder parameters:parameters setDuration:self.activityState.lastInterval forKey:@"last_interval"]; @@ -380,6 +375,8 @@ - (NSMutableDictionary *)getSessionParameters:(BOOL)isInDelay { [ADJPackageBuilder parameters:parameters setDictionary:[self.sessionParameters.partnerParameters copy] forKey:@"partner_params"]; } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindSession]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -403,8 +400,6 @@ - (NSMutableDictionary *)getEventParameters:(BOOL)isInDelay forEventPackage:(ADJ [ADJPackageBuilder parameters:parameters setString:event.eventToken forKey:@"event_token"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -432,7 +427,7 @@ - (NSMutableDictionary *)getEventParameters:(BOOL)isInDelay forEventPackage:(ADJ [ADJPackageBuilder parameters:parameters setString:event.transactionId forKey:@"deduplication_id"]; [ADJPackageBuilder parameters:parameters setString:event.productId forKey:@"product_id"]; [ADJPackageBuilder parameters:parameters setString:[event.receipt adjEncodeBase64] forKey:@"receipt"]; - + if ([self.trackingStatusManager canGetAttStatus]) { [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus forKey:@"att_status"]; @@ -444,9 +439,6 @@ - (NSMutableDictionary *)getEventParameters:(BOOL)isInDelay forEventPackage:(ADJ if (self.adjustConfig.isDeviceKnown) { [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } if (self.activityState != nil) { [ADJPackageBuilder parameters:parameters setInt:self.activityState.eventCount forKey:@"event_count"]; @@ -474,6 +466,8 @@ - (NSMutableDictionary *)getEventParameters:(BOOL)isInDelay forEventPackage:(ADJ [ADJPackageBuilder parameters:parameters setDictionary:mergedPartnerParameters forKey:@"partner_params"]; } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindEvent]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -500,8 +494,6 @@ - (NSMutableDictionary *)getInfoParameters:(NSString *)source { [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -511,9 +503,9 @@ - (NSMutableDictionary *)getInfoParameters:(NSString *)source { [ADJPackageBuilder parameters:parameters setDate:self.purchaseTime forKey:@"purchase_time"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.secretId forKey:@"secret_id"]; [ADJPackageBuilder parameters:parameters setDate:[ADJUserDefaults getSkadRegisterCallTimestamp] forKey:@"skadn_registered_at"]; - [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; [ADJPackageBuilder parameters:parameters setString:source forKey:@"source"]; - + [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; + if ([self.trackingStatusManager canGetAttStatus]) { [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus forKey:@"att_status"]; @@ -525,9 +517,6 @@ - (NSMutableDictionary *)getInfoParameters:(NSString *)source { if (self.adjustConfig.isDeviceKnown) { [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } if (self.activityState != nil) { [ADJPackageBuilder parameters:parameters setDuration:self.activityState.lastInterval forKey:@"last_interval"]; @@ -550,6 +539,8 @@ - (NSMutableDictionary *)getInfoParameters:(NSString *)source { [ADJPackageBuilder parameters:parameters setString:self.attribution.trackerName forKey:@"tracker"]; } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindInfo]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -571,18 +562,16 @@ - (NSMutableDictionary *)getAdRevenueParameters:(NSString *)source payload:(NSDa [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osVersion forKey:@"os_version"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.secretId forKey:@"secret_id"]; [ADJPackageBuilder parameters:parameters setDate:[ADJUserDefaults getSkadRegisterCallTimestamp] forKey:@"skadn_registered_at"]; - [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; [ADJPackageBuilder parameters:parameters setString:source forKey:@"source"]; + [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; [ADJPackageBuilder parameters:parameters setData:payload forKey:@"payload"]; - + if ([self.trackingStatusManager canGetAttStatus]) { [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus forKey:@"att_status"]; @@ -594,9 +583,6 @@ - (NSMutableDictionary *)getAdRevenueParameters:(NSString *)source payload:(NSDa if (self.adjustConfig.isDeviceKnown) { [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } if (self.activityState != nil) { [ADJPackageBuilder parameters:parameters setDuration:self.activityState.lastInterval forKey:@"last_interval"]; @@ -612,6 +598,8 @@ - (NSMutableDictionary *)getAdRevenueParameters:(NSString *)source payload:(NSDa } } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindAdRevenue]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -633,8 +621,6 @@ - (NSMutableDictionary *)getAdRevenueParameters:(ADJAdRevenue *)adRevenue isInDe [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -642,7 +628,7 @@ - (NSMutableDictionary *)getAdRevenueParameters:(ADJAdRevenue *)adRevenue isInDe [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.secretId forKey:@"secret_id"]; [ADJPackageBuilder parameters:parameters setDate:[ADJUserDefaults getSkadRegisterCallTimestamp] forKey:@"skadn_registered_at"]; [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; - + [ADJPackageBuilder parameters:parameters setString:adRevenue.source forKey:@"source"]; [ADJPackageBuilder parameters:parameters setNumberWithoutRounding:adRevenue.revenue forKey:@"revenue"]; [ADJPackageBuilder parameters:parameters setString:adRevenue.currency forKey:@"currency"]; @@ -650,7 +636,7 @@ - (NSMutableDictionary *)getAdRevenueParameters:(ADJAdRevenue *)adRevenue isInDe [ADJPackageBuilder parameters:parameters setString:adRevenue.adRevenueNetwork forKey:@"ad_revenue_network"]; [ADJPackageBuilder parameters:parameters setString:adRevenue.adRevenueUnit forKey:@"ad_revenue_unit"]; [ADJPackageBuilder parameters:parameters setString:adRevenue.adRevenuePlacement forKey:@"ad_revenue_placement"]; - + if ([self.trackingStatusManager canGetAttStatus]) { [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus forKey:@"att_status"]; @@ -662,9 +648,6 @@ - (NSMutableDictionary *)getAdRevenueParameters:(ADJAdRevenue *)adRevenue isInDe if (self.adjustConfig.isDeviceKnown) { [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } if (!isInDelay) { NSDictionary *mergedCallbackParameters = [ADJUtil mergeParameters:[self.sessionParameters.callbackParameters copy] @@ -692,6 +675,8 @@ - (NSMutableDictionary *)getAdRevenueParameters:(ADJAdRevenue *)adRevenue isInDe } } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindAdRevenue]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -718,8 +703,6 @@ - (NSMutableDictionary *)getClickParameters:(NSString *)source { [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -729,9 +712,9 @@ - (NSMutableDictionary *)getClickParameters:(NSString *)source { [ADJPackageBuilder parameters:parameters setDate:self.purchaseTime forKey:@"purchase_time"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.secretId forKey:@"secret_id"]; [ADJPackageBuilder parameters:parameters setDate:[ADJUserDefaults getSkadRegisterCallTimestamp] forKey:@"skadn_registered_at"]; - [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; [ADJPackageBuilder parameters:parameters setString:source forKey:@"source"]; - + [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; + if ([self.trackingStatusManager canGetAttStatus]) { [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus forKey:@"att_status"]; @@ -743,9 +726,6 @@ - (NSMutableDictionary *)getClickParameters:(NSString *)source { if (self.adjustConfig.isDeviceKnown) { [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } if (self.activityState != nil) { [ADJPackageBuilder parameters:parameters setDuration:self.activityState.lastInterval forKey:@"last_interval"]; @@ -768,6 +748,8 @@ - (NSMutableDictionary *)getClickParameters:(NSString *)source { [ADJPackageBuilder parameters:parameters setString:self.attribution.trackerName forKey:@"tracker"]; } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindClick]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -787,8 +769,6 @@ - (NSMutableDictionary *)getAttributionParameters:(NSString *)initiatedBy { [ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setString:initiatedBy forKey:@"initiated_by"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; @@ -798,13 +778,6 @@ - (NSMutableDictionary *)getAttributionParameters:(NSString *)initiatedBy { [ADJPackageBuilder parameters:parameters setDate:[ADJUserDefaults getSkadRegisterCallTimestamp] forKey:@"skadn_registered_at"]; [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; - if (self.adjustConfig.isDeviceKnown) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; - } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } - if ([self.trackingStatusManager canGetAttStatus]) { [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus forKey:@"att_status"]; @@ -813,6 +786,13 @@ - (NSMutableDictionary *)getAttributionParameters:(NSString *)initiatedBy { forKey:@"tracking_enabled"]; } + if (self.adjustConfig.isDeviceKnown) { + [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; + } + if (self.adjustConfig.needsCost) { + [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; + } + if (self.activityState != nil) { if (self.activityState.isPersisted) { [ADJPackageBuilder parameters:parameters setString:self.activityState.dedupeToken forKey:@"primary_dedupe_token"]; @@ -821,6 +801,8 @@ - (NSMutableDictionary *)getAttributionParameters:(NSString *)initiatedBy { } } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindAttribution]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -840,8 +822,6 @@ - (NSMutableDictionary *)getGdprParameters { [ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -850,13 +830,6 @@ - (NSMutableDictionary *)getGdprParameters { [ADJPackageBuilder parameters:parameters setDate:[ADJUserDefaults getSkadRegisterCallTimestamp] forKey:@"skadn_registered_at"]; [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; - if (self.adjustConfig.isDeviceKnown) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; - } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } - if ([self.trackingStatusManager canGetAttStatus]) { [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus forKey:@"att_status"]; @@ -865,6 +838,10 @@ - (NSMutableDictionary *)getGdprParameters { forKey:@"tracking_enabled"]; } + if (self.adjustConfig.isDeviceKnown) { + [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; + } + if (self.activityState != nil) { if (self.activityState.isPersisted) { [ADJPackageBuilder parameters:parameters setString:self.activityState.dedupeToken forKey:@"primary_dedupe_token"]; @@ -873,6 +850,8 @@ - (NSMutableDictionary *)getGdprParameters { } } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindGdpr]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -899,8 +878,6 @@ - (NSMutableDictionary *)getDisableThirdPartySharingParameters { [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -911,7 +888,7 @@ - (NSMutableDictionary *)getDisableThirdPartySharingParameters { [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.secretId forKey:@"secret_id"]; [ADJPackageBuilder parameters:parameters setDate:[ADJUserDefaults getSkadRegisterCallTimestamp] forKey:@"skadn_registered_at"]; [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; - + if ([self.trackingStatusManager canGetAttStatus]) { [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus forKey:@"att_status"]; @@ -923,9 +900,6 @@ - (NSMutableDictionary *)getDisableThirdPartySharingParameters { if (self.adjustConfig.isDeviceKnown) { [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } if (self.activityState != nil) { [ADJPackageBuilder parameters:parameters setDuration:self.activityState.lastInterval forKey:@"last_interval"]; @@ -941,6 +915,8 @@ - (NSMutableDictionary *)getDisableThirdPartySharingParameters { } } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindDisableThirdPartySharing]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -967,8 +943,6 @@ - (NSMutableDictionary *)getThirdPartySharingParameters:(nonnull ADJThirdPartySh [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -980,6 +954,14 @@ - (NSMutableDictionary *)getThirdPartySharingParameters:(nonnull ADJThirdPartySh [ADJPackageBuilder parameters:parameters setDate:[ADJUserDefaults getSkadRegisterCallTimestamp] forKey:@"skadn_registered_at"]; [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; + 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"]; + } + // Third Party Sharing if (thirdPartySharing.enabled != nil) { NSString *enableValue = thirdPartySharing.enabled.boolValue ? @"enable" : @"disable"; @@ -992,14 +974,6 @@ - (NSMutableDictionary *)getThirdPartySharingParameters:(nonnull ADJThirdPartySh setDictionaryJson:thirdPartySharing.partnerSharingSettings forKey:@"partner_sharing_settings"]; - 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"]; } @@ -1018,6 +992,8 @@ - (NSMutableDictionary *)getThirdPartySharingParameters:(nonnull ADJThirdPartySh } } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindThirdPartySharing]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -1044,8 +1020,6 @@ - (NSMutableDictionary *)getMeasurementConsentParameters:(BOOL)enabled { [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -1089,6 +1063,8 @@ - (NSMutableDictionary *)getMeasurementConsentParameters:(BOOL)enabled { } } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindMeasurementConsent]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -1108,8 +1084,6 @@ - (NSMutableDictionary *)getSubscriptionParameters:(BOOL)isInDelay forSubscripti [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -1117,7 +1091,7 @@ - (NSMutableDictionary *)getSubscriptionParameters:(BOOL)isInDelay forSubscripti [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.secretId forKey:@"secret_id"]; [ADJPackageBuilder parameters:parameters setDate:[ADJUserDefaults getSkadRegisterCallTimestamp] forKey:@"skadn_registered_at"]; [ADJPackageBuilder parameters:parameters setDate1970:(double)self.packageParams.startedAt forKey:@"started_at"]; - + if ([self.trackingStatusManager canGetAttStatus]) { [ADJPackageBuilder parameters:parameters setInt:self.trackingStatusManager.attStatus forKey:@"att_status"]; @@ -1129,9 +1103,6 @@ - (NSMutableDictionary *)getSubscriptionParameters:(BOOL)isInDelay forSubscripti if (self.adjustConfig.isDeviceKnown) { [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } if (self.activityState != nil) { [ADJPackageBuilder parameters:parameters setString:self.activityState.deviceToken forKey:@"push_token"]; @@ -1166,6 +1137,8 @@ - (NSMutableDictionary *)getSubscriptionParameters:(BOOL)isInDelay forSubscripti [ADJPackageBuilder parameters:parameters setDate:subscription.transactionDate forKey:@"transaction_date"]; [ADJPackageBuilder parameters:parameters setString:subscription.salesRegion forKey:@"sales_region"]; + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindSubscription]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; @@ -1189,8 +1162,6 @@ - (NSMutableDictionary *)getPurchaseVerificationParameters { [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"]; [ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"]; - [self addIdfaIfPossibleToParameters:parameters]; - [self addIdfvIfPossibleToParameters:parameters]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.installedAt forKey:@"installed_at"]; [ADJPackageBuilder parameters:parameters setBool:YES forKey:@"needs_response_details"]; [ADJPackageBuilder parameters:parameters setString:self.packageParams.osName forKey:@"os_name"]; @@ -1211,9 +1182,6 @@ - (NSMutableDictionary *)getPurchaseVerificationParameters { if (self.adjustConfig.isDeviceKnown) { [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.isDeviceKnown forKey:@"device_known"]; } - if (self.adjustConfig.needsCost) { - [ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.needsCost forKey:@"needs_cost"]; - } if (self.activityState != nil) { [ADJPackageBuilder parameters:parameters setDuration:self.activityState.lastInterval forKey:@"last_interval"]; @@ -1229,18 +1197,13 @@ - (NSMutableDictionary *)getPurchaseVerificationParameters { } } + [self addConsentToParameters:parameters forActivityKind:ADJActivityKindPurchaseVerification]; + [self addIdfvIfPossibleToParameters:parameters]; [self injectFeatureFlagsWithParameters:parameters]; return parameters; } -- (void)addIdfaIfPossibleToParameters:(NSMutableDictionary *)parameters { - [ADJPackageBuilder addIdfaToParameters:parameters - withConfig:self.adjustConfig - logger:[ADJAdjustFactory logger] - packageParams:self.packageParams]; -} - - (void)addIdfvIfPossibleToParameters:(NSMutableDictionary *)parameters { id logger = [ADJAdjustFactory logger]; @@ -1372,16 +1335,26 @@ + (BOOL)isAdServicesPackage:(ADJActivityPackage *)activityPackage { return ([ADJUtil isNotNull:source] && [source isEqualToString:ADJAdServicesPackageKey]); } -+ (void)addIdfaToParameters:(NSMutableDictionary * _Nullable)parameters - withConfig:(ADJConfig * _Nullable)adjConfig - logger:(id _Nullable)logger - packageParams:(ADJPackageParams *)packageParams { +#pragma mark - Consent params + ++ (void)addConsentDataToParameters:(NSMutableDictionary * _Nullable)parameters + forActivityKind:(ADJActivityKind)activityKind + withAttStatus:(NSString * _Nullable)attStatusString + configuration:(ADJConfig * _Nullable)adjConfig + packageParams:(ADJPackageParams * _Nullable)packageParams { + + if (![ADJUtil shouldUseConsentParamsForActivityKind:activityKind + andAttStatus:attStatusString]) { + return; + } + + // idfa if (!adjConfig.allowIdfaReading) { - [logger info:@"Cannot read IDFA because it's forbidden by ADJConfig setting"]; + [[ADJAdjustFactory logger] info:@"Cannot read IDFA because it's forbidden by ADJConfig setting"]; return; } if (adjConfig.coppaCompliantEnabled) { - [logger info:@"Cannot read IDFA with COPPA enabled"]; + [[ADJAdjustFactory logger] info:@"Cannot read IDFA with COPPA enabled"]; return; } @@ -1411,4 +1384,21 @@ + (void)addIdfaToParameters:(NSMutableDictionary * _Nullable)parameters } } ++ (void)removeConsentDataFromParameters:(nonnull NSMutableDictionary *)parameters { + [parameters removeObjectForKey:@"idfa"]; +} + ++ (void)updateAttStatusInParameters:(nonnull NSMutableDictionary *)parameters { + [ADJPackageBuilder parameters:parameters setInt:[ADJUtil attStatus] forKey:@"att_status"]; +} + +- (void)addConsentToParameters:(NSMutableDictionary *)parameters + forActivityKind:(ADJActivityKind)activityKind { + [ADJPackageBuilder addConsentDataToParameters:parameters + forActivityKind:activityKind + withAttStatus:[parameters objectForKey:@"att_status"] + configuration:self.adjustConfig + packageParams:self.packageParams]; +} + @end diff --git a/Adjust/ADJPackageHandler.h b/Adjust/ADJPackageHandler.h index 6916afc4b..a32ea8dbe 100644 --- a/Adjust/ADJPackageHandler.h +++ b/Adjust/ADJPackageHandler.h @@ -28,7 +28,7 @@ - (void)pauseSending; - (void)resumeSending; - (void)updatePackagesWithSessionParams:(ADJSessionParameters *)sessionParameters; -- (void)updatePackagesWithIdfaAndAttStatus; +- (void)updatePackagesWithAttStatus:(int)attStatus; - (void)flush; - (void)teardown; diff --git a/Adjust/ADJPackageHandler.m b/Adjust/ADJPackageHandler.m index 366ce2403..80918f180 100644 --- a/Adjust/ADJPackageHandler.m +++ b/Adjust/ADJPackageHandler.m @@ -111,9 +111,9 @@ - (void)sendNextPackage:(ADJResponseData *)responseData { [self.activityHandler finishedTracking:responseData]; } -- (void)closeFirstPackage:(ADJResponseData *)responseData -{ +- (void)closeFirstPackage:(ADJResponseData *)responseData { responseData.willRetry = YES; + [self.activityHandler finishedTracking:responseData]; self.lastPackageRetriesCount++; @@ -153,11 +153,12 @@ - (void)updatePackagesWithSessionParams:(ADJSessionParameters *)sessionParameter }]; } -- (void)updatePackagesWithIdfaAndAttStatus { +- (void)updatePackagesWithAttStatus:(int)attStatus { [ADJUtil launchInQueue:self.internalQueue selfInject:self block:^(ADJPackageHandler* selfI) { - [selfI updatePackagesWithIdfaAndAttStatusI:selfI]; + [selfI updatePackagesTrackingI:selfI + attStatus:attStatus]; }]; } @@ -299,18 +300,20 @@ - (void)updatePackagesI:(ADJPackageHandler *)selfI [selfI writePackageQueueS:selfI]; } -- (void)updatePackagesWithIdfaAndAttStatusI:(ADJPackageHandler *)selfI { - int attStatus = [ADJUtil attStatus]; +- (void)updatePackagesTrackingI:(ADJPackageHandler *)selfI + attStatus:(int)attStatus { [selfI.logger debug:@"Updating package queue with idfa and att_status: %d", (long)attStatus]; // create package queue copy for new state of array NSMutableArray *packageQueueCopy = [NSMutableArray array]; for (ADJActivityPackage *activityPackage in selfI.packageQueue) { [ADJPackageBuilder parameters:activityPackage.parameters setInt:attStatus forKey:@"att_status"]; - [ADJPackageBuilder addIdfaToParameters:activityPackage.parameters - withConfig:self.activityHandler.adjustConfig - logger:[ADJAdjustFactory logger] - packageParams:self.activityHandler.packageParams]; + + [ADJPackageBuilder addConsentDataToParameters:activityPackage.parameters + forActivityKind:activityPackage.activityKind + withAttStatus:[activityPackage.parameters objectForKey:@"att_status"] + configuration:selfI.activityHandler.adjustConfig + packageParams:selfI.activityHandler.packageParams]; // add to copy queue [packageQueueCopy addObject:activityPackage]; } diff --git a/Adjust/ADJPurchaseVerificationHandler.h b/Adjust/ADJPurchaseVerificationHandler.h index 64a28856b..2e8fd4e3e 100644 --- a/Adjust/ADJPurchaseVerificationHandler.h +++ b/Adjust/ADJPurchaseVerificationHandler.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)pauseSending; - (void)resumeSending; - (void)sendPurchaseVerificationPackage:(ADJActivityPackage *)purchaseVerificationPackage; -- (void)updatePackagesWithIdfaAndAttStatus; +- (void)updatePackagesWithAttStatus:(int)attStatus; - (void)teardown; @end diff --git a/Adjust/ADJPurchaseVerificationHandler.m b/Adjust/ADJPurchaseVerificationHandler.m index 08e997df6..49ebdbfe6 100644 --- a/Adjust/ADJPurchaseVerificationHandler.m +++ b/Adjust/ADJPurchaseVerificationHandler.m @@ -87,11 +87,12 @@ - (void)sendNextPurchaseVerificationPackage { }]; } -- (void)updatePackagesWithIdfaAndAttStatus { +- (void)updatePackagesWithAttStatus:(int)attStatus { [ADJUtil launchInQueue:self.internalQueue selfInject:self block:^(ADJPurchaseVerificationHandler *selfI) { - [selfI updatePackagesWithIdfaAndAttStatusI:selfI]; + [selfI updatePackagesTrackingI:selfI + attStatus:attStatus]; }]; } @@ -172,17 +173,19 @@ - (void)sendNextPurchaseVerificationPackageI:(ADJPurchaseVerificationHandler *)s dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(waitTime * NSEC_PER_SEC)), self.internalQueue, work); } -- (void)updatePackagesWithIdfaAndAttStatusI:(ADJPurchaseVerificationHandler *)selfI { - int attStatus = [ADJUtil attStatus]; +- (void)updatePackagesTrackingI:(ADJPurchaseVerificationHandler *)selfI + attStatus:(int)attStatus { [selfI.logger debug:@"Updating purchase_verification queue with idfa and att_status: %d", attStatus]; for (ADJActivityPackage *activityPackage in selfI.packageQueue) { [ADJPackageBuilder parameters:activityPackage.parameters setInt:attStatus forKey:@"att_status"]; - [ADJPackageBuilder addIdfaToParameters:activityPackage.parameters - withConfig:self.activityHandler.adjustConfig - logger:[ADJAdjustFactory logger] - packageParams:self.activityHandler.packageParams]; + + [ADJPackageBuilder addConsentDataToParameters:activityPackage.parameters + forActivityKind:activityPackage.activityKind + withAttStatus:[activityPackage.parameters objectForKey:@"att_status"] + configuration:selfI.activityHandler.adjustConfig + packageParams:selfI.activityHandler.packageParams]; } } diff --git a/Adjust/ADJRequestHandler.m b/Adjust/ADJRequestHandler.m index ed5891e9d..1b526e245 100644 --- a/Adjust/ADJRequestHandler.m +++ b/Adjust/ADJRequestHandler.m @@ -70,30 +70,39 @@ - (id)initWithResponseCallback:(id)responseCallback - (void)sendPackageByPOST:(ADJActivityPackage *)activityPackage sendingParameters:(NSDictionary *)sendingParameters { - [self signWithSigV2Plugin:activityPackage]; - NSDictionary *parameters = [[NSDictionary alloc] - initWithDictionary:activityPackage.parameters - copyItems:YES]; + NSMutableDictionary *parameters = [[NSMutableDictionary alloc] + initWithDictionary:activityPackage.parameters + copyItems:YES]; NSString *path = [activityPackage.path copy]; NSString *clientSdk = [activityPackage.clientSdk copy]; ADJActivityKind activityKind = activityPackage.activityKind; ADJResponseData *responseData = [ADJResponseData buildResponseData:activityPackage]; - responseData.sendingParameters = [[NSDictionary alloc] - initWithDictionary:sendingParameters - copyItems:YES]; - NSString * authorizationHeader = [self buildAuthorizationHeader:parameters activityKind:activityKind]; + NSString *urlHostString = [self urlWithParams:parameters + sendingParams:sendingParameters + responseData:responseData]; + + NSMutableDictionary *parametersCopy = [[NSMutableDictionary alloc] + initWithDictionary:parameters]; + [parametersCopy addEntriesFromDictionary:responseData.sendingParameters]; - NSString *urlHostString = [self.urlStrategy getUrlHostStringByPackageKind: - activityPackage.activityKind]; - NSMutableURLRequest *urlRequest = - [self requestForPostPackage:path - clientSdk:clientSdk - parameters:parameters - urlHostString:urlHostString - sendingParameters:sendingParameters]; + NSString * appSecret = [parametersCopy objectForKey:@"app_secret"]; + [parametersCopy removeObjectForKey:@"app_secret"]; + + [self signWithSigV2PluginWithParams:parametersCopy + activityKind:activityKind + clientSdk:clientSdk]; + NSString * authorizationHeader = [self buildAuthorizationHeader:parametersCopy + activityKind:activityKind + appSecret:appSecret]; + + NSMutableURLRequest *urlRequest = [self requestForPostPackage:path + clientSdk:clientSdk + parameters:parameters + urlHostString:urlHostString + sendingParameters:responseData.sendingParameters]; [self sendRequest:urlRequest authorizationHeader:authorizationHeader @@ -103,45 +112,83 @@ - (void)sendPackageByPOST:(ADJActivityPackage *)activityPackage - (void)sendPackageByGET:(ADJActivityPackage *)activityPackage sendingParameters:(NSDictionary *)sendingParameters { - [self signWithSigV2Plugin:activityPackage]; - NSDictionary *parameters = [[NSDictionary alloc] - initWithDictionary:activityPackage.parameters - copyItems:YES]; + NSMutableDictionary *parameters = [[NSMutableDictionary alloc] + initWithDictionary:activityPackage.parameters + copyItems:YES]; NSString *path = [activityPackage.path copy]; NSString *clientSdk = [activityPackage.clientSdk copy]; ADJActivityKind activityKind = activityPackage.activityKind; ADJResponseData *responseData = [ADJResponseData buildResponseData:activityPackage]; - responseData.sendingParameters = [[NSDictionary alloc] - initWithDictionary:sendingParameters - copyItems:YES]; - NSString * authorizationHeader = [self buildAuthorizationHeader:parameters - activityKind:activityKind]; + NSString *urlHostString = [self urlWithParams:parameters + sendingParams:sendingParameters + responseData:responseData]; + + NSMutableDictionary *parametersCopy = [[NSMutableDictionary alloc] + initWithDictionary:parameters]; + [parametersCopy addEntriesFromDictionary:responseData.sendingParameters]; + + NSString *appSecret = [parametersCopy objectForKey:@"app_secret"]; + [parametersCopy removeObjectForKey:@"app_secret"]; - NSString *urlHostString = [self.urlStrategy - getUrlHostStringByPackageKind:activityPackage.activityKind]; + [self signWithSigV2PluginWithParams:parametersCopy + activityKind:activityKind + clientSdk:clientSdk]; + NSString * authorizationHeader = [self buildAuthorizationHeader:parametersCopy + activityKind:activityKind + appSecret:appSecret]; - NSMutableURLRequest *urlRequest = - [self requestForGetPackage:path - clientSdk:clientSdk - parameters:parameters - urlHostString:urlHostString - sendingParameters:sendingParameters]; + NSMutableURLRequest *urlRequest = [self requestForGetPackage:path + clientSdk:clientSdk + parameters:parameters + urlHostString:urlHostString + sendingParameters:responseData.sendingParameters]; [self sendRequest:urlRequest - authorizationHeader:authorizationHeader + authorizationHeader:authorizationHeader responseData:responseData methodTypeInfo:ADJMethodGET]; } #pragma mark Internal methods +- (nonnull NSString *)urlWithParams:(nonnull NSMutableDictionary *)params + sendingParams:(NSDictionary *)sendingParams + responseData:(nonnull ADJResponseData *)responseData { + NSMutableDictionary * sendingParamsCopy = [NSMutableDictionary dictionaryWithDictionary:sendingParams]; + + NSString *attStatusString = [responseData.sdkPackage.parameters objectForKey:@"att_status"]; + BOOL wasConsentWhenCreated = [ADJUtil shouldUseConsentParamsForActivityKind:responseData.activityKind + andAttStatus:attStatusString]; + BOOL isConsentWhenSending = [ADJUtil shouldUseConsentParamsForActivityKind:responseData.activityKind]; + BOOL doesConsentDataExist = wasConsentWhenCreated && isConsentWhenSending; + + if (!doesConsentDataExist) { + [ADJPackageBuilder removeConsentDataFromParameters:params]; + } + + // if att_status was part of the payload at all + // make sure to have up to date value before sending + if (attStatusString != nil) { + [ADJPackageBuilder updateAttStatusInParameters:params]; + } + + NSString *urlHostString = [self.urlStrategy urlForActivityKind:responseData.activityKind + isConsentGiven:isConsentWhenSending + withSendingParams:sendingParamsCopy]; + + responseData.sendingParameters = [[NSDictionary alloc] + initWithDictionary:sendingParamsCopy + copyItems:YES]; + + return urlHostString; +} + - (void)sendRequest:(NSMutableURLRequest *)request authorizationHeader:(NSString *)authorizationHeader responseData:(ADJResponseData *)responseData methodTypeInfo:(NSString *)methodTypeInfo - { if (authorizationHeader != nil) { [ADJAdjustFactory.logger debug:@"Authorization header content: %@", authorizationHeader]; @@ -432,6 +479,7 @@ - (void)handleResponseWithData:(NSData *)data #pragma mark - Authorization Header - (NSString *)buildAuthorizationHeader:(NSDictionary *)parameters activityKind:(ADJActivityKind)activityKind + appSecret:(NSString *)appSecret { NSString *adjSigningId = [parameters objectForKey:@"adj_signing_id"]; NSString *signature = [parameters objectForKey:@"signature"]; @@ -457,7 +505,6 @@ - (NSString *)buildAuthorizationHeader:(NSDictionary *)parameters return authorizationHeaderWithSecretId; } - NSString * appSecret = [parameters objectForKey:@"app_secret"]; return [self buildAuthorizationHeaderV1:appSecret secretId:secretId parameters:parameters @@ -648,7 +695,10 @@ - (NSDictionary *)buildJsonDict:(NSData *)jsonData return jsonDict; } -- (void)signWithSigV2Plugin:(ADJActivityPackage *)activityPackage { +- (void)signWithSigV2PluginWithParams:(NSMutableDictionary *)params + activityKind:(ADJActivityKind)activityKind + clientSdk:(NSString *)clientSdk +{ Class signerClass = NSClassFromString(@"ADJSigner"); if (signerClass == nil) { return; @@ -658,21 +708,18 @@ - (void)signWithSigV2Plugin:(ADJActivityPackage *)activityPackage { return; } - [activityPackage.parameters removeObjectForKey:@"app_secret"]; - [activityPackage.parameters removeObjectForKey:@"secret_id"]; - NSMutableDictionary *parameters = activityPackage.parameters; - const char *activityKindChar = [[ADJActivityKindUtil activityKindToString:activityPackage.activityKind] UTF8String]; - const char *sdkVersionChar = [activityPackage.clientSdk UTF8String]; + const char *activityKindChar = [[ADJActivityKindUtil activityKindToString:activityKind] UTF8String]; + const char *sdkVersionChar = [clientSdk UTF8String]; // Stack allocated strings to ensure their lifetime stays until the next iteration - static char activityKind[64], sdkVersion[64]; - strncpy(activityKind, activityKindChar, strlen(activityKindChar) + 1); + static char packageActivityKind[64], sdkVersion[64]; + strncpy(packageActivityKind, activityKindChar, strlen(activityKindChar) + 1); strncpy(sdkVersion, sdkVersionChar, strlen(sdkVersionChar) + 1); // NSInvocation setArgument requires lvalue references with exact matching types to the executed function signature. // With this usage we ensure that the lifetime of the object remains until the next iteration, as it points to the // stack allocated string where we copied the buffer. - const char *lvalActivityKind = activityKind; + const char *lvalActivityKind = packageActivityKind; const char *lvalSdkVersion = sdkVersion; /* @@ -686,7 +733,7 @@ - (void)signWithSigV2Plugin:(ADJActivityPackage *)activityPackage { [signInvocation setSelector:signSEL]; [signInvocation setTarget:signerClass]; - [signInvocation setArgument:¶meters atIndex:2]; + [signInvocation setArgument:¶ms atIndex:2]; [signInvocation setArgument:&lvalActivityKind atIndex:3]; [signInvocation setArgument:&lvalSdkVersion atIndex:4]; @@ -710,7 +757,7 @@ - (void)signWithSigV2Plugin:(ADJActivityPackage *)activityPackage { } NSString *signerVersionString = (NSString *)signerVersion; - [ADJPackageBuilder parameters:parameters + [ADJPackageBuilder parameters:params setString:signerVersionString forKey:@"native_version"]; } diff --git a/Adjust/ADJSdkClickHandler.h b/Adjust/ADJSdkClickHandler.h index b298918fc..2ccf63e08 100644 --- a/Adjust/ADJSdkClickHandler.h +++ b/Adjust/ADJSdkClickHandler.h @@ -21,7 +21,7 @@ - (void)pauseSending; - (void)resumeSending; - (void)sendSdkClick:(ADJActivityPackage *)sdkClickPackage; -- (void)updatePackagesWithIdfaAndAttStatus; +- (void)updatePackagesWithAttStatus:(int)attStatus; - (void)teardown; @end diff --git a/Adjust/ADJSdkClickHandler.m b/Adjust/ADJSdkClickHandler.m index a35c5ac9e..0bbdb873f 100644 --- a/Adjust/ADJSdkClickHandler.m +++ b/Adjust/ADJSdkClickHandler.m @@ -91,11 +91,12 @@ - (void)sendNextSdkClick { }]; } -- (void)updatePackagesWithIdfaAndAttStatus { +- (void)updatePackagesWithAttStatus:(int)attStatus { [ADJUtil launchInQueue:self.internalQueue selfInject:self block:^(ADJSdkClickHandler *selfI) { - [selfI updatePackagesWithIdfaAndAttStatusI:selfI]; + [selfI updatePackagesTrackingI:selfI + attStatus:attStatus]; }]; } @@ -194,21 +195,22 @@ - (void)sendNextSdkClickI:(ADJSdkClickHandler *)selfI { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(waitTime * NSEC_PER_SEC)), self.internalQueue, work); } -- (void)updatePackagesWithIdfaAndAttStatusI:(ADJSdkClickHandler *)selfI { - int attStatus = [ADJUtil attStatus]; +- (void)updatePackagesTrackingI:(ADJSdkClickHandler *)selfI + attStatus:(int)attStatus { [selfI.logger debug:@"Updating sdk_click queue with idfa and att_status: %d", attStatus]; for (ADJActivityPackage *activityPackage in selfI.packageQueue) { [ADJPackageBuilder parameters:activityPackage.parameters setInt:attStatus forKey:@"att_status"]; - [ADJPackageBuilder addIdfaToParameters:activityPackage.parameters - withConfig:self.activityHandler.adjustConfig - logger:[ADJAdjustFactory logger] - packageParams:self.activityHandler.packageParams]; + + [ADJPackageBuilder addConsentDataToParameters:activityPackage.parameters + forActivityKind:activityPackage.activityKind + withAttStatus:[activityPackage.parameters objectForKey:@"att_status"] + configuration:selfI.activityHandler.adjustConfig + packageParams:selfI.activityHandler.packageParams]; } } - - (void)responseCallback:(ADJResponseData *)responseData { if (responseData.jsonResponse) { [self.logger debug: diff --git a/Adjust/ADJUrlStrategy.h b/Adjust/ADJUrlStrategy.h index 771297a55..08942faae 100644 --- a/Adjust/ADJUrlStrategy.h +++ b/Adjust/ADJUrlStrategy.h @@ -16,7 +16,9 @@ - (instancetype)initWithUrlStrategyInfo:(NSString *)urlStrategyInfo extraPath:(NSString *)extraPath; -- (NSString *)getUrlHostStringByPackageKind:(ADJActivityKind)activityKind; +- (nonnull NSString *)urlForActivityKind:(ADJActivityKind)activityKind + isConsentGiven:(BOOL)isConsentGiven + withSendingParams:(NSMutableDictionary *)sendingParams; - (void)resetAfterSuccess; - (BOOL)shouldRetryAfterFailure:(ADJActivityKind)activityKind; diff --git a/Adjust/ADJUrlStrategy.m b/Adjust/ADJUrlStrategy.m index 7c7f43409..eef16f68c 100644 --- a/Adjust/ADJUrlStrategy.m +++ b/Adjust/ADJUrlStrategy.m @@ -4,58 +4,68 @@ // // Created by Pedro S. on 11.08.20. // Copyright © 2020 adjust GmbH. All rights reserved. -// +//analytics.adjust.com + #import "ADJUrlStrategy.h" #import "Adjust.h" #import "ADJAdjustFactory.h" -static NSString * const baseUrl = @"https://app.adjust.com"; +static NSString * const baseUrlAnalytics = @"https://analytics.adjust.com"; +static NSString * const baseUrlConsent = @"https://consent.adjust.com"; static NSString * const gdprUrl = @"https://gdpr.adjust.com"; static NSString * const subscriptionUrl = @"https://subscription.adjust.com"; static NSString * const purchaseVerificationUrl = @"https://ssrv.adjust.com"; -static NSString * const baseUrlIndia = @"https://app.adjust.net.in"; +static NSString * const baseUrlIndiaAnalytics = @"https://analytics.adjust.net.in"; +static NSString * const baseUrlIndiaConsent = @"https://consent.adjust.net.in"; static NSString * const gdprUrlIndia = @"https://gdpr.adjust.net.in"; static NSString * const subscriptionUrlIndia = @"https://subscription.adjust.net.in"; static NSString * const purchaseVerificationUrlIndia = @"https://ssrv.adjust.net.in"; -static NSString * const baseUrlChina = @"https://app.adjust.world"; +static NSString * const baseUrlChinaAnalytics = @"https://analytics.adjust.world"; +static NSString * const baseUrlChinaConsent = @"https://consent.adjust.world"; static NSString * const gdprUrlChina = @"https://gdpr.adjust.world"; static NSString * const subscriptionUrlChina = @"https://subscription.adjust.world"; static NSString * const purchaseVerificationUrlChina = @"https://ssrv.adjust.world"; -static NSString * const baseUrlCn = @"https://app.adjust.cn"; +static NSString * const baseUrlCnAnalytics = @"https://analytics.adjust.cn"; +static NSString * const baseUrlCnConsent = @"https://consent.adjust.cn"; static NSString * const gdprUrlCn = @"https://gdpr.adjust.cn"; static NSString * const subscriptionUrlCn = @"https://subscription.adjust.cn"; static NSString * const purchaseVerificationUrlCn = @"https://ssrv.adjust.cn"; -static NSString * const baseUrlEU = @"https://app.eu.adjust.com"; +static NSString * const baseUrlEUAnalytics = @"https://analytics.eu.adjust.com"; +static NSString * const baseUrlEUConsent = @"https://consent.eu.adjust.com"; static NSString * const gdprUrlEU = @"https://gdpr.eu.adjust.com"; static NSString * const subscriptionUrlEU = @"https://subscription.eu.adjust.com"; static NSString * const purchaseVerificationUrlEU = @"https://ssrv.eu.adjust.com"; -static NSString * const baseUrlTR = @"https://app.tr.adjust.com"; +static NSString * const baseUrlTRAnalytics = @"https://analytics.tr.adjust.com"; +static NSString * const baseUrlTRConsent = @"https://consent.tr.adjust.com"; static NSString * const gdprUrlTR = @"https://gdpr.tr.adjust.com"; static NSString * const subscriptionUrlTR = @"https://subscription.tr.adjust.com"; static NSString * const purchaseVerificationUrlTR = @"https://ssrv.tr.adjust.com"; -static NSString * const baseUrlUS = @"https://app.us.adjust.com"; +static NSString * const baseUrlUSAnalytics = @"https://analytics.us.adjust.com"; +static NSString * const baseUrlUSConsent = @"https://consent.us.adjust.com"; static NSString * const gdprUrlUS = @"https://gdpr.us.adjust.com"; static NSString * const subscriptionUrlUS = @"https://subscription.us.adjust.com"; static NSString * const purchaseVerificationUrlUS = @"https://ssrv.us.adjust.com"; +static NSString *const testServerCustomEndPointKey = @"test_server_custom_end_point"; +static NSString *const testServerAdjustEndPointKey = @"test_server_adjust_end_point"; + + @interface ADJUrlStrategy () -@property (nonatomic, copy) NSArray *baseUrlChoicesArray; +@property (nonatomic, copy) NSArray *baseUrlAnalyticsChoicesArray; +@property (nonatomic, copy) NSArray *baseUrlConsentChoicesArray; @property (nonatomic, copy) NSArray *gdprUrlChoicesArray; @property (nonatomic, copy) NSArray *subscriptionUrlChoicesArray; @property (nonatomic, copy) NSArray *purchaseVerificationUrlChoicesArray; -@property (nonatomic, copy) NSString *overridenBaseUrl; -@property (nonatomic, copy) NSString *overridenGdprUrl; -@property (nonatomic, copy) NSString *overridenSubscriptionUrl; -@property (nonatomic, copy) NSString *overridenPurchaseVerificationUrl; +@property (nonatomic, copy) NSString *urlOverwrite; @property (nonatomic, assign) BOOL wasLastAttemptSuccess; @@ -72,17 +82,15 @@ - (instancetype)initWithUrlStrategyInfo:(NSString *)urlStrategyInfo _extraPath = extraPath ?: @""; - _baseUrlChoicesArray = [ADJUrlStrategy baseUrlChoicesWithUrlStrategyInfo:urlStrategyInfo]; + _baseUrlAnalyticsChoicesArray = [ADJUrlStrategy baseUrlAnalyticsChoicesWithUrlStrategyInfo:urlStrategyInfo]; + _baseUrlConsentChoicesArray = [ADJUrlStrategy baseUrlConsentChoicesWithUrlStrategyInfo:urlStrategyInfo]; _gdprUrlChoicesArray = [ADJUrlStrategy gdprUrlChoicesWithUrlStrategyInfo:urlStrategyInfo]; _subscriptionUrlChoicesArray = [ADJUrlStrategy subscriptionUrlChoicesWithUrlStrategyInfo:urlStrategyInfo]; _purchaseVerificationUrlChoicesArray = [ADJUrlStrategy purchaseVerificationUrlChoicesWithUrlStrategyInfo:urlStrategyInfo]; - _overridenBaseUrl = [ADJAdjustFactory baseUrl]; - _overridenGdprUrl = [ADJAdjustFactory gdprUrl]; - _overridenSubscriptionUrl = [ADJAdjustFactory subscriptionUrl]; - _overridenPurchaseVerificationUrl = [ADJAdjustFactory purchaseVerificationUrl]; + _urlOverwrite = [ADJAdjustFactory urlOverwrite]; _wasLastAttemptSuccess = NO; _choiceIndex = 0; @@ -91,23 +99,43 @@ - (instancetype)initWithUrlStrategyInfo:(NSString *)urlStrategyInfo return self; } -+ (NSArray *)baseUrlChoicesWithUrlStrategyInfo:(NSString *)urlStrategyInfo { ++ (NSArray *)baseUrlAnalyticsChoicesWithUrlStrategyInfo:(NSString *)urlStrategyInfo { + if ([urlStrategyInfo isEqualToString:ADJUrlStrategyIndia]) { + return @[baseUrlIndiaAnalytics, baseUrlAnalytics]; + } else if ([urlStrategyInfo isEqualToString:ADJUrlStrategyChina]) { + return @[baseUrlChinaAnalytics, baseUrlAnalytics]; + } else if ([urlStrategyInfo isEqualToString:ADJUrlStrategyCn]) { + return @[baseUrlCnAnalytics, baseUrlAnalytics]; + } else if ([urlStrategyInfo isEqualToString:ADJUrlStrategyCnOnly]) { + return @[baseUrlCnAnalytics]; + } else if ([urlStrategyInfo isEqualToString:ADJDataResidencyEU]) { + return @[baseUrlEUAnalytics]; + } else if ([urlStrategyInfo isEqualToString:ADJDataResidencyTR]) { + return @[baseUrlTRAnalytics]; + } else if ([urlStrategyInfo isEqualToString:ADJDataResidencyUS]) { + return @[baseUrlUSAnalytics]; + } else { + return @[baseUrlAnalytics, baseUrlIndiaAnalytics, baseUrlChinaAnalytics]; + } +} + ++ (NSArray *)baseUrlConsentChoicesWithUrlStrategyInfo:(NSString *)urlStrategyInfo { if ([urlStrategyInfo isEqualToString:ADJUrlStrategyIndia]) { - return @[baseUrlIndia, baseUrl]; + return @[baseUrlIndiaConsent, baseUrlConsent]; } else if ([urlStrategyInfo isEqualToString:ADJUrlStrategyChina]) { - return @[baseUrlChina, baseUrl]; + return @[baseUrlChinaConsent, baseUrlConsent]; } else if ([urlStrategyInfo isEqualToString:ADJUrlStrategyCn]) { - return @[baseUrlCn, baseUrl]; + return @[baseUrlCnConsent, baseUrlConsent]; } else if ([urlStrategyInfo isEqualToString:ADJUrlStrategyCnOnly]) { - return @[baseUrlCn]; + return @[baseUrlCnConsent]; } else if ([urlStrategyInfo isEqualToString:ADJDataResidencyEU]) { - return @[baseUrlEU]; + return @[baseUrlEUConsent]; } else if ([urlStrategyInfo isEqualToString:ADJDataResidencyTR]) { - return @[baseUrlTR]; + return @[baseUrlTRConsent]; } else if ([urlStrategyInfo isEqualToString:ADJDataResidencyUS]) { - return @[baseUrlUS]; + return @[baseUrlUSConsent]; } else { - return @[baseUrl, baseUrlIndia, baseUrlChina]; + return @[baseUrlConsent, baseUrlIndiaConsent, baseUrlChinaConsent]; } } @@ -171,31 +199,40 @@ - (instancetype)initWithUrlStrategyInfo:(NSString *)urlStrategyInfo } } -- (NSString *)getUrlHostStringByPackageKind:(ADJActivityKind)activityKind { +- (nonnull NSString *)urlForActivityKind:(ADJActivityKind)activityKind + isConsentGiven:(BOOL)isConsentGiven + withSendingParams:(NSMutableDictionary *)sendingParams { + NSString *_Nonnull urlByActivityKind = [self urlForActivityKind:activityKind + isConsentGiven:isConsentGiven]; + + if (self.urlOverwrite != nil) { + [sendingParams setObject:urlByActivityKind + forKey:testServerAdjustEndPointKey]; + + return self.urlOverwrite; + } + + return urlByActivityKind; +} + +- (nonnull NSString *)urlForActivityKind:(ADJActivityKind)activityKind + isConsentGiven:(BOOL)isConsentGiven { if (activityKind == ADJActivityKindGdpr) { - if (self.overridenGdprUrl != nil) { - return self.overridenGdprUrl; - } else { - return [self.gdprUrlChoicesArray objectAtIndex:self.choiceIndex]; - } - } else if (activityKind == ADJActivityKindSubscription) { - if (self.overridenSubscriptionUrl != nil) { - return self.overridenSubscriptionUrl; - } else { - return [self.subscriptionUrlChoicesArray objectAtIndex:self.choiceIndex]; - } - } else if (activityKind == ADJActivityKindPurchaseVerification) { - if (self.overridenPurchaseVerificationUrl != nil) { - return self.overridenPurchaseVerificationUrl; - } else { - return [self.purchaseVerificationUrlChoicesArray objectAtIndex:self.choiceIndex]; - } + return [self.gdprUrlChoicesArray objectAtIndex:self.choiceIndex]; + } + + if (activityKind == ADJActivityKindSubscription) { + return [self.subscriptionUrlChoicesArray objectAtIndex:self.choiceIndex]; + } + + if (activityKind == ADJActivityKindPurchaseVerification) { + return [self.purchaseVerificationUrlChoicesArray objectAtIndex:self.choiceIndex]; + } + + if (isConsentGiven) { + return [self.baseUrlConsentChoicesArray objectAtIndex:self.choiceIndex]; } else { - if (self.overridenBaseUrl != nil) { - return self.overridenBaseUrl; - } else { - return [self.baseUrlChoicesArray objectAtIndex:self.choiceIndex]; - } + return [self.baseUrlAnalyticsChoicesArray objectAtIndex:self.choiceIndex]; } } @@ -209,13 +246,14 @@ - (BOOL)shouldRetryAfterFailure:(ADJActivityKind)activityKind { NSUInteger choiceListSize; if (activityKind == ADJActivityKindGdpr) { - choiceListSize = [_gdprUrlChoicesArray count]; + choiceListSize = [self.gdprUrlChoicesArray count]; } else if (activityKind == ADJActivityKindSubscription) { - choiceListSize = [_subscriptionUrlChoicesArray count]; + choiceListSize = [self.subscriptionUrlChoicesArray count]; } else if (activityKind == ADJActivityKindPurchaseVerification) { - choiceListSize = [_purchaseVerificationUrlChoicesArray count]; + choiceListSize = [self.purchaseVerificationUrlChoicesArray count]; } else { - choiceListSize = [_baseUrlChoicesArray count]; + // baseUrlConsentChoicesArray or baseUrlAnalyticsChoicesArray should be of equal size + choiceListSize = [self.baseUrlConsentChoicesArray count]; } NSUInteger nextChoiceIndex = (self.choiceIndex + 1) % choiceListSize; diff --git a/Adjust/ADJUtil.h b/Adjust/ADJUtil.h index 733d61340..5b3ed8998 100644 --- a/Adjust/ADJUtil.h +++ b/Adjust/ADJUtil.h @@ -141,4 +141,9 @@ typedef void (^isInactiveInjected)(BOOL); + (NSMutableDictionary *)deepCopyOfDictionary:(NSDictionary *)dictionary; ++ (BOOL)shouldUseConsentParamsForActivityKind:(ADJActivityKind)activityKind; + ++ (BOOL)shouldUseConsentParamsForActivityKind:(ADJActivityKind)activityKind + andAttStatus:(nullable NSString *)attStatusString; + @end diff --git a/Adjust/ADJUtil.m b/Adjust/ADJUtil.m index b0a3646b5..239ef4456 100644 --- a/Adjust/ADJUtil.m +++ b/Adjust/ADJUtil.m @@ -35,7 +35,7 @@ static NSRegularExpression *shortUniversalLinkRegex = nil; static NSRegularExpression *excludedDeeplinkRegex = nil; -static NSString * const kClientSdk = @"ios4.37.2"; +static NSString * const kClientSdk = @"ios4.38.0"; static NSString * const kDeeplinkParam = @"deep_link="; static NSString * const kSchemeDelimiter = @"://"; static NSString * const kDefaultScheme = @"AdjustUniversalScheme"; @@ -1033,6 +1033,10 @@ + (BOOL)trackingEnabled { } + (NSString *)idfa { + if (ADJAdjustFactory.idfa != nil) { + return ADJAdjustFactory.idfa; + } + #if ADJUST_NO_IDFA return @""; #else @@ -1183,6 +1187,10 @@ + (NSUInteger)startedAt { } + (int)attStatus { + if (ADJAdjustFactory.attStatus != nil) { + return ADJAdjustFactory.attStatus.intValue; + } + Class appTrackingClass = [self appTrackingManager]; if (appTrackingClass != nil) { NSString *keyAuthorization = [NSString adjJoin:@"tracking", @"authorization", @"status", nil]; @@ -1438,4 +1446,36 @@ + (NSMutableDictionary *)deepCopyOfDictionary:(NSMutableDictionary *)dictionary return deepCopy; } ++ (BOOL)shouldUseConsentParamsForActivityKind:(ADJActivityKind)activityKind { + if (@available(iOS 14.0, tvOS 14.0, *)) { + if (activityKind == ADJActivityKindGdpr || + activityKind == ADJActivityKindSubscription || + activityKind == ADJActivityKindPurchaseVerification) { + return NO; + } + + int attStatus = [ADJUtil attStatus]; + return attStatus == 3; + } else { + // if iOS lower than 14 can assume consent + return YES; + } +} + ++ (BOOL)shouldUseConsentParamsForActivityKind:(ADJActivityKind)activityKind + andAttStatus:(nullable NSString *)attStatusString { + if (@available(iOS 14.0, tvOS 14.0, *)) { + if (activityKind == ADJActivityKindGdpr || + activityKind == ADJActivityKindSubscription || + activityKind == ADJActivityKindPurchaseVerification) { + return NO; + } + + return [@"3" isEqualToString:attStatusString]; + } else { + // if iOS lower than 14 can assume consent + return YES; + } +} + @end diff --git a/Adjust/Adjust.h b/Adjust/Adjust.h index 6c6ec0bda..47517abba 100644 --- a/Adjust/Adjust.h +++ b/Adjust/Adjust.h @@ -2,7 +2,7 @@ // Adjust.h // Adjust SDK // -// V4.37.2 +// V4.38.0 // Created by Christian Wellenbrock (@wellle) on 23rd July 2013. // Copyright (c) 2012-2021 Adjust GmbH. All rights reserved. // @@ -21,15 +21,14 @@ typedef void(^AdjustResolvedDeeplinkBlock)(NSString * _Nonnull resolvedLink); @interface AdjustTestOptions : NSObject -@property (nonatomic, copy, nullable) NSString *baseUrl; -@property (nonatomic, copy, nullable) NSString *gdprUrl; -@property (nonatomic, copy, nullable) NSString *subscriptionUrl; -@property (nonatomic, copy, nullable) NSString *purchaseVerificationUrl; +@property (nonatomic, copy, nullable) NSString *urlOverwrite; @property (nonatomic, copy, nullable) NSString *extraPath; @property (nonatomic, copy, nullable) NSNumber *timerIntervalInMilliseconds; @property (nonatomic, copy, nullable) NSNumber *timerStartInMilliseconds; @property (nonatomic, copy, nullable) NSNumber *sessionIntervalInMilliseconds; @property (nonatomic, copy, nullable) NSNumber *subsessionIntervalInMilliseconds; +@property (nonatomic, copy, nullable) NSNumber *attStatusInt; +@property (nonatomic, copy, nullable) NSString *idfa; @property (nonatomic, assign) BOOL teardown; @property (nonatomic, assign) BOOL deleteState; @property (nonatomic, assign) BOOL noBackoffWait; diff --git a/Adjust/Adjust.m b/Adjust/Adjust.m index 24472d616..fb3e52de0 100644 --- a/Adjust/Adjust.m +++ b/Adjust/Adjust.m @@ -728,17 +728,8 @@ - (void)setTestOptions:(AdjustTestOptions *)testOptions { if (testOptions.extraPath != nil) { self.savedPreLaunch.extraPath = testOptions.extraPath; } - if (testOptions.baseUrl != nil) { - [ADJAdjustFactory setBaseUrl:testOptions.baseUrl]; - } - if (testOptions.gdprUrl != nil) { - [ADJAdjustFactory setGdprUrl:testOptions.gdprUrl]; - } - if (testOptions.subscriptionUrl != nil) { - [ADJAdjustFactory setSubscriptionUrl:testOptions.subscriptionUrl]; - } - if (testOptions.purchaseVerificationUrl != nil) { - [ADJAdjustFactory setPurchaseVerificationUrl:testOptions.purchaseVerificationUrl]; + if (testOptions.urlOverwrite != nil) { + [ADJAdjustFactory setUrlOverwrite:testOptions.urlOverwrite]; } if (testOptions.timerIntervalInMilliseconds != nil) { NSTimeInterval timerIntervalInSeconds = [testOptions.timerIntervalInMilliseconds intValue] / 1000.0; @@ -756,6 +747,12 @@ - (void)setTestOptions:(AdjustTestOptions *)testOptions { NSTimeInterval subsessionIntervalInSeconds = [testOptions.subsessionIntervalInMilliseconds intValue] / 1000.0; [ADJAdjustFactory setSubsessionInterval:subsessionIntervalInSeconds]; } + if (testOptions.attStatusInt != nil) { + [ADJAdjustFactory setAttStatus:testOptions.attStatusInt]; + } + if (testOptions.idfa != nil) { + [ADJAdjustFactory setIdfa:testOptions.idfa]; + } if (testOptions.noBackoffWait) { [ADJAdjustFactory setSdkClickHandlerBackoffStrategy:[ADJBackoffStrategy backoffStrategyWithType:ADJNoWait]]; [ADJAdjustFactory setPackageHandlerBackoffStrategy:[ADJBackoffStrategy backoffStrategyWithType:ADJNoWait]]; diff --git a/Adjust/PrivacyInfo.xcprivacy b/Adjust/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..710a42d1e --- /dev/null +++ b/Adjust/PrivacyInfo.xcprivacy @@ -0,0 +1,80 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + https://consent.adjust.com + https://consent.adjust.net.in + https://consent.adjust.world + https://consent.adjust.cn + https://consent.eu.adjust.com + https://consent.tr.adjust.com + https://consent.us.adjust.com + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeDeviceID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAnalytics + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeAdvertisingData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeThirdPartyAdvertising + NSPrivacyCollectedDataTypePurposeDeveloperAdvertising + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeProductInteraction + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAnalytics + NSPrivacyCollectedDataTypePurposeAppFunctionality + NSPrivacyCollectedDataTypePurposeProductPersonalization + + + + + diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index d533c00f6..29f4ea80c 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -213,6 +213,7 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView NSString *deferredDeeplinkCallback = [data objectForKey:@"deferredDeeplinkCallback"]; NSString *urlStrategy = [data objectForKey:@"urlStrategy"]; NSNumber *readDeviceInfoOnceEnabled = [data objectForKey:@"readDeviceInfoOnceEnabled"]; + NSNumber *attConsentWaitingSeconds = [data objectForKey:@"attConsentWaitingSeconds"]; ADJConfig *adjustConfig; if ([self isFieldValid:allowSuppressLogLevel]) { @@ -268,6 +269,9 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView if ([self isFieldValid:allowIdfaReading]) { [adjustConfig setAllowIdfaReading:[allowIdfaReading boolValue]]; } + if ([self isFieldValid:attConsentWaitingSeconds]) { + [adjustConfig setAttConsentWaitingInterval:[attConsentWaitingSeconds doubleValue]]; + } if ([self isFieldValid:allowSkAdNetworkHandling]) { if ([allowSkAdNetworkHandling boolValue] == NO) { [adjustConfig deactivateSKAdNetworkHandling]; @@ -629,8 +633,7 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView }]; [self.bridgeRegister registerHandler:@"adjust_setTestOptions" handler:^(id data, WVJBResponseCallback responseCallback) { - NSString *baseUrl = [data objectForKey:@"baseUrl"]; - NSString *gdprUrl = [data objectForKey:@"gdprUrl"]; + NSString *urlOverwrite = [data objectForKey:@"urlOverwrite"]; NSString *extraPath = [data objectForKey:@"extraPath"]; NSNumber *timerIntervalInMilliseconds = [data objectForKey:@"timerIntervalInMilliseconds"]; NSNumber *timerStartInMilliseconds = [data objectForKey:@"timerStartInMilliseconds"]; @@ -640,14 +643,13 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView NSNumber *deleteState = [data objectForKey:@"deleteState"]; NSNumber *noBackoffWait = [data objectForKey:@"noBackoffWait"]; NSNumber *adServicesFrameworkEnabled = [data objectForKey:@"adServicesFrameworkEnabled"]; + NSNumber *attStatus = [data objectForKey:@"attStatus"]; + NSString *idfa = [data objectForKey:@"idfa"]; AdjustTestOptions *testOptions = [[AdjustTestOptions alloc] init]; - if ([self isFieldValid:baseUrl]) { - testOptions.baseUrl = baseUrl; - } - if ([self isFieldValid:gdprUrl]) { - testOptions.gdprUrl = gdprUrl; + if ([self isFieldValid:urlOverwrite]) { + testOptions.urlOverwrite = urlOverwrite; } if ([self isFieldValid:extraPath]) { testOptions.extraPath = extraPath; @@ -664,6 +666,12 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView if ([self isFieldValid:subsessionIntervalInMilliseconds]) { testOptions.subsessionIntervalInMilliseconds = subsessionIntervalInMilliseconds; } + if ([self isFieldValid:attStatus]) { + testOptions.attStatusInt = attStatus; + } + if ([self isFieldValid:idfa]) { + testOptions.idfa = idfa; + } if ([self isFieldValid:teardown]) { testOptions.teardown = [teardown boolValue]; if (testOptions.teardown) { diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index fb401ed69..c71cffaa6 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -280,7 +280,7 @@ + (NSString *)adjust_js { if (this.sdkPrefix) { return this.sdkPrefix; } else { - return 'web-bridge4.37.2'; + return 'web-bridge4.38.0'; } }, setTestOptions: function(testOptions) { @@ -388,6 +388,7 @@ + (NSString *)adjust_js { this.deferredDeeplinkCallback = null; this.urlStrategy = null; this.readDeviceInfoOnceEnabled = null; + this.attConsentWaitingSeconds = null; }; AdjustConfig.EnvironmentSandbox = 'sandbox'; @@ -518,6 +519,9 @@ + (NSString *)adjust_js { AdjustConfig.prototype.setReadDeviceInfoOnceEnabled = function(readDeviceInfoOnceEnabled) { this.readDeviceInfoOnceEnabled = readDeviceInfoOnceEnabled; }; + AdjustConfig.prototype.setAttConsentWaitingInterval = function(attConsentWaitingSeconds) { + this.attConsentWaitingSeconds = attConsentWaitingSeconds; + }; })();); // END preprocessorJSCode //, augmentedSection]; #undef __adj_js_func__ diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m index 6273946b9..5c4a3a011 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m +++ b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m @@ -110,10 +110,7 @@ - (void)executeCommand:(NSString *)className - (void)testOptions:(NSDictionary *)parameters { AdjustTestOptions *testOptions = [[AdjustTestOptions alloc] init]; - testOptions.baseUrl = baseUrl; - testOptions.gdprUrl = gdprUrl; - testOptions.subscriptionUrl = subscriptionUrl; - testOptions.purchaseVerificationUrl = purchaseVerificationUrl; + testOptions.urlOverwrite = urlOverwrite; if ([parameters objectForKey:@"basePath"]) { self.extraPath = [parameters objectForKey:@"basePath"][0]; @@ -134,6 +131,16 @@ - (void)testOptions:(NSDictionary *)parameters { NSString *subsessionIntervalMilliS = [parameters objectForKey:@"subsessionInterval"][0]; testOptions.subsessionIntervalInMilliseconds = [ATAAdjustCommandExecutor convertMilliStringToNumber:subsessionIntervalMilliS]; } + if ([parameters objectForKey:@"attStatus"]) { + NSString *attStatusS = [parameters objectForKey:@"attStatus"][0]; + NSNumber *attStatusN = [NSNumber numberWithInt:[attStatusS intValue]]; + + testOptions.attStatusInt = attStatusN; + } + if ([parameters objectForKey:@"idfa"]) { + NSString *idfa = [parameters objectForKey:@"idfa"][0]; + testOptions.idfa = idfa; + } if ([parameters objectForKey:@"noBackoffWait"]) { NSString *noBackoffWaitStr = [parameters objectForKey:@"noBackoffWait"][0]; testOptions.noBackoffWait = NO; @@ -393,6 +400,11 @@ - (void)config:(NSDictionary *)parameters { andReturnValue:[shouldOpenDeeplinkS boolValue]]; } + if ([parameters objectForKey:@"attConsentWaitingSeconds"]) { + NSString *attConsentWaitingSecondsS = [parameters objectForKey:@"attConsentWaitingSeconds"][0]; + [adjustConfig setAttConsentWaitingInterval:[attConsentWaitingSecondsS intValue]]; + } + [adjustConfig setDelegate:self.adjustDelegate]; } diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.h b/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.h index a6b48ee45..50497bd92 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.h +++ b/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.h @@ -9,16 +9,10 @@ #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 * purchaseVerificationUrl = @"http://127.0.0.1:8080"; +static NSString * urlOverwrite = @"http://127.0.0.1:8080"; static NSString * controlUrl = @"ws://127.0.0.1:1987"; // device -//static NSString * baseUrl = @"http://192.168.86.44:8080"; -//static NSString * gdprUrl = @"http://192.168.86.44:8080"; -//static NSString * subscriptionUrl = @"http://192.168.86.44:8080"; -//static NSString * purchaseVerificationUrl = @"http://192.168.86.44:8080"; +//static NSString * urlOverwrite = @"http://192.168.86.44:8080"; //static NSString * controlUrl = @"ws://192.168.86.44:1987"; @interface ViewController : UIViewController diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.m b/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.m index cd3837cb4..727a7ee9a 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.m +++ b/AdjustTests/AdjustTestApp/AdjustTestApp/ViewController.m @@ -25,7 +25,7 @@ - (void)viewDidLoad { [super viewDidLoad]; self.adjustCommandExecutor = [[ATAAdjustCommandExecutor alloc] init]; - self.testLibrary = [ATLTestLibrary testLibraryWithBaseUrl:baseUrl + self.testLibrary = [ATLTestLibrary testLibraryWithBaseUrl:urlOverwrite andControlUrl:controlUrl andCommandDelegate:self.adjustCommandExecutor]; [self.adjustCommandExecutor setTestLibrary:self.testLibrary]; diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj index bf4124e21..4d237fe01 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.pbxproj @@ -7,6 +7,9 @@ objects = { /* Begin PBXBuildFile section */ + 07077DC32BAB2D9200D44AC7 /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 07077DBE2BAB2D9200D44AC7 /* ADJPurchaseVerificationResult.m */; }; + 07077DC42BAB2D9200D44AC7 /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 07077DC02BAB2D9200D44AC7 /* ADJPurchaseVerificationHandler.m */; }; + 07077DC52BAB2D9200D44AC7 /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 07077DC12BAB2D9200D44AC7 /* ADJPurchase.m */; }; 6F6F75A223279D4D00F47E64 /* AdjustBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F6F759723279D4D00F47E64 /* AdjustBridge.m */; }; 6F6F75A323279D4D00F47E64 /* WebViewJavascriptBridgeBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F6F759A23279D4D00F47E64 /* WebViewJavascriptBridgeBase.m */; }; 6F6F75A423279D4D00F47E64 /* WKWebViewJavascriptBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F6F759B23279D4D00F47E64 /* WKWebViewJavascriptBridge.m */; }; @@ -81,6 +84,12 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 07077DBD2BAB2D9200D44AC7 /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; + 07077DBE2BAB2D9200D44AC7 /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; + 07077DBF2BAB2D9200D44AC7 /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; + 07077DC02BAB2D9200D44AC7 /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; + 07077DC12BAB2D9200D44AC7 /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; + 07077DC22BAB2D9200D44AC7 /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; 6F6F759723279D4D00F47E64 /* AdjustBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdjustBridge.m; sourceTree = ""; }; 6F6F759823279D4D00F47E64 /* AdjustBridgeRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdjustBridgeRegister.h; sourceTree = ""; }; 6F6F759A23279D4D00F47E64 /* WebViewJavascriptBridgeBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewJavascriptBridgeBase.m; sourceTree = ""; }; @@ -355,6 +364,12 @@ 6F7AF6EC21187CFE00F730B2 /* Adjust */ = { isa = PBXGroup; children = ( + 07077DBF2BAB2D9200D44AC7 /* ADJPurchase.h */, + 07077DC12BAB2D9200D44AC7 /* ADJPurchase.m */, + 07077DC22BAB2D9200D44AC7 /* ADJPurchaseVerificationHandler.h */, + 07077DC02BAB2D9200D44AC7 /* ADJPurchaseVerificationHandler.m */, + 07077DBD2BAB2D9200D44AC7 /* ADJPurchaseVerificationResult.h */, + 07077DBE2BAB2D9200D44AC7 /* ADJPurchaseVerificationResult.m */, 9D0B5C1729297B40007009C1 /* ADJSKAdNetwork.h */, 9D0B5C1929297B40007009C1 /* ADJSKAdNetwork.m */, 9D0B5C1829297B40007009C1 /* ADJSubscription.h */, @@ -535,6 +550,7 @@ 6F7AF73221187CFF00F730B2 /* ADJTimerOnce.m in Sources */, 6F7AF74521187CFF00F730B2 /* NSString+ADJAdditions.m in Sources */, 6F6F75CD2327C08B00F47E64 /* ATLUtil.m in Sources */, + 07077DC32BAB2D9200D44AC7 /* ADJPurchaseVerificationResult.m in Sources */, 6F7AF73821187CFF00F730B2 /* ADJSessionSuccess.m in Sources */, 6F7AF74E21187CFF00F730B2 /* ADJPackageBuilder.m in Sources */, 6F6F75D22327C08B00F47E64 /* PSWebSocketDriver.m in Sources */, @@ -544,6 +560,7 @@ 6F84513125B1B14E0004C7C0 /* ADJThirdPartySharing.m in Sources */, 6F7AF73721187CFF00F730B2 /* ADJEvent.m in Sources */, 6F7AF74621187CFF00F730B2 /* NSData+ADJAdditions.m in Sources */, + 07077DC42BAB2D9200D44AC7 /* ADJPurchaseVerificationHandler.m in Sources */, 6F6F75D82327C08B00F47E64 /* ATLTestLibrary.m in Sources */, 6F6F75D42327C08B00F47E64 /* PSWebSocketNetworkThread.m in Sources */, 9DF92D962630EDB0000FC3FC /* ADJPackageParams.m in Sources */, @@ -564,6 +581,7 @@ 6F6F75A523279D4D00F47E64 /* WebViewJavascriptBridge_JS.m in Sources */, 6F7AF639211878BC00F730B2 /* main.m in Sources */, 6F7AF74121187CFF00F730B2 /* Adjust.m in Sources */, + 07077DC52BAB2D9200D44AC7 /* ADJPurchase.m in Sources */, 6F6F75A223279D4D00F47E64 /* AdjustBridge.m in Sources */, 6FBEE92324E421C800FEF3F1 /* ADJUrlStrategy.m in Sources */, 6F6F75D32327C08B00F47E64 /* PSWebSocketBuffer.m in Sources */, diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/AdjustTestApp-WebView.html b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/AdjustTestApp-WebView.html index 212100334..364fdeeeb 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/AdjustTestApp-WebView.html +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/AdjustTestApp-WebView.html @@ -42,7 +42,6 @@

Adjust TestApp

btnTrackSimpleEvent.onclick = function(e) { e.preventDefault(); console.log('btnStartTestSession'); - // TestLibraryBridge.addTestDirectory('parameters'); TestLibraryBridge.startTestSession(); }; }); diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.h b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.h index cbd2dd1d6..6046b08ab 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.h +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.h @@ -11,13 +11,11 @@ #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"; +static NSString * urlOverwrite = @"http://127.0.0.1:8080"; +static NSString * controlUrl = @"ws://127.0.0.1:1987"; // device - static NSString * baseUrl = @"http://192.168.86.44:8080"; - static NSString * gdprUrl = @"http://192.168.86.44:8080"; - static NSString * controlUrl = @"ws://192.168.86.44:1987"; +//static NSString * urlOverwrite = @"http://192.168.86.44:8080"; +//static NSString * controlUrl = @"ws://192.168.86.44:1987"; @interface TestLibraryBridge : NSObject diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js index ce8abb6c8..070a1159e 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js @@ -1,9 +1,9 @@ // simulator -//var localBaseUrl = 'http://127.0.0.1:8080'; -//var localGdprUrl = 'http://127.0.0.1:8080'; +var urlOverwrite = 'http://127.0.0.1:8080'; +var controlUrl = 'ws://127.0.0.1:1987'; // device - var localBaseUrl = 'http://192.168.86.44:8080'; - var localGdprUrl = 'http://192.168.86.44:8080'; +// var urlOverwrite = 'http://192.168.86.44:8080'; +// var controlUrl = 'ws://192.168.86.44:1987'; // local reference of the command executor // originally it was this.adjustCommandExecutor of TestLibraryBridge var @@ -25,7 +25,7 @@ var TestLibraryBridge = { console.log('TestLibraryBridge startTestSession'); if (WebViewJavascriptBridge) { console.log('TestLibraryBridge startTestSession callHandler'); - localAdjustCommandExecutor = new AdjustCommandExecutor(localBaseUrl, localGdprUrl); + localAdjustCommandExecutor = new AdjustCommandExecutor(urlOverwrite, controlUrl); // register objc->JS function for commands WebViewJavascriptBridge.registerHandler('adjustJS_commandExecutor', TestLibraryBridge.adjustCommandExecutor); // start test session in obj-c @@ -42,9 +42,9 @@ var TestLibraryBridge = { } }; -var AdjustCommandExecutor = function(baseUrl, gdprUrl) { - this.baseUrl = baseUrl; - this.gdprUrl = gdprUrl; +var AdjustCommandExecutor = function(urlOverwrite, controlUrl) { + this.urlOverwrite = urlOverwrite; + this.controlUrl = controlUrl; this.extraPath = null; this.savedEvents = {}; this.savedConfigs = {}; @@ -57,13 +57,15 @@ AdjustCommandExecutor.prototype.testOptions = function(params) { console.log('params: ' + JSON.stringify(params)); var TestOptions = function() { - this.baseUrl = null; - this.gdprUrl = null; + this.urlOverwrite = null; + this.controlUrl = null; this.extraPath = null; this.timerIntervalInMilliseconds = null; this.timerStartInMilliseconds = null; this.sessionIntervalInMilliseconds = null; this.subsessionIntervalInMilliseconds = null; + this.idfa = null; + this.attStatus = null; this.teardown = null; this.deleteState = null; this.noBackoffWait = null; @@ -71,8 +73,8 @@ AdjustCommandExecutor.prototype.testOptions = function(params) { }; var testOptions = new TestOptions(); - testOptions.baseUrl = this.baseUrl; - testOptions.gdprUrl = this.gdprUrl; + testOptions.urlOverwrite = this.urlOverwrite; + testOptions.controlUrl = this.controlUrl; if ('basePath' in params) { this.extraPath = getFirstValue(params, 'basePath'); @@ -89,6 +91,14 @@ AdjustCommandExecutor.prototype.testOptions = function(params) { if ('subsessionInterval' in params) { testOptions.subsessionIntervalInMilliseconds = getFirstValue(params, 'subsessionInterval'); } + if ('attStatus' in params) { + var attStatus = getFirstValue(params, 'attStatus'); + testOptions.attStatus = attStatus; + } + if ('idfa' in params) { + var idfa = getFirstValue(params, 'idfa'); + testOptions.idfa = idfa; + } if ('noBackoffWait' in params) { var noBackoffWait = getFirstValue(params, 'noBackoffWait'); testOptions.noBackoffWait = noBackoffWait == 'true'; @@ -280,6 +290,12 @@ AdjustCommandExecutor.prototype.config = function(params) { adjustConfig.setUserAgent(userAgent); } + if ('attConsentWaitingSeconds' in params) { + var attConsentWaitingSecondsS = getFirstValue(params, 'attConsentWaitingSeconds'); + var attConsentWaitingSeconds = parseFloat(attConsentWaitingSecondsS); + adjustConfig.setAttConsentWaitingInterval(attConsentWaitingSeconds); + } + if ('attributionCallbackSendAll' in params) { console.log('AdjustCommandExecutor.prototype.config attributionCallbackSendAll'); var extraPath = this.extraPath; diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.m b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.m index b2056de25..4b004d810 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.m +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.m @@ -24,7 +24,7 @@ - (id)initWithAdjustBridgeRegister:(AdjustBridgeRegister *)adjustBridgeRegister return nil; } - self.testLibrary = [ATLTestLibrary testLibraryWithBaseUrl:baseUrl + self.testLibrary = [ATLTestLibrary testLibraryWithBaseUrl:urlOverwrite andControlUrl:controlUrl andCommandDelegate:self]; diff --git a/CHANGELOG.md b/CHANGELOG.md index 94aafa7f7..3458216e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +### Version 4.38.0 (22nd March 2024) +#### Added +- Added Privacy Manifest for the Adjust SDK. +- Added new domains and corresponding payload restrictions for the Adjust SDK to direct the iOS traffic to: + - https://consent.adjust.com - for consented users + - https://analytics.adjust.com - for non-consented users + +--- + ### Version 4.37.2 (28th February 2024) #### Changed - Added tracking of `third_party_sharing` and `measurement_consent` packages if invoked before SDK initialization in subsequent SDK initializations. diff --git a/Package.swift b/Package.swift index 300aead22..4fae4ef6f 100644 --- a/Package.swift +++ b/Package.swift @@ -16,6 +16,9 @@ let package = Package( name: "Adjust", path: "Adjust", exclude: ["Info.plist"], + resources: [ + .copy("PrivacyInfo.xcprivacy"), + ], cSettings: [ .headerSearchPath(""), .headerSearchPath("ADJAdditions") diff --git a/VERSION b/VERSION index 641d94f20..fff125e79 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.37.2 +4.38.0 diff --git a/examples/AdjustExample-FbPixel/AdjustExample-FbPixel.xcodeproj/project.pbxproj b/examples/AdjustExample-FbPixel/AdjustExample-FbPixel.xcodeproj/project.pbxproj index 34571a4d5..3a1b17440 100644 --- a/examples/AdjustExample-FbPixel/AdjustExample-FbPixel.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-FbPixel/AdjustExample-FbPixel.xcodeproj/project.pbxproj @@ -8,9 +8,9 @@ /* Begin PBXBuildFile section */ 07AF832327BD3CBF00C5DD9E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 07AF832227BD3CBF00C5DD9E /* Main.storyboard */; }; - 07C8C7F22B8F447B006979A1 /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7EC2B8F447B006979A1 /* ADJPurchaseVerificationResult.m */; }; - 07C8C7F32B8F447B006979A1 /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7ED2B8F447B006979A1 /* ADJPurchase.m */; }; - 07C8C7F42B8F447B006979A1 /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7EF2B8F447B006979A1 /* ADJPurchaseVerificationHandler.m */; }; + 0A4FE7AA2AD6A11C0085338A /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7A62AD6A11C0085338A /* ADJPurchaseVerificationHandler.m */; }; + 0A4FE7AB2AD6A11C0085338A /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7A82AD6A11C0085338A /* ADJPurchaseVerificationResult.m */; }; + 0A4FE7AC2AD6A11C0085338A /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7A92AD6A11C0085338A /* ADJPurchase.m */; }; 6FAB78C12636DDC400773869 /* ADJLinkResolution.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FAB78BF2636DDC400773869 /* ADJLinkResolution.m */; }; 9D49D17A290FEC2E00042345 /* ADJSKAdNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D49D179290FEC2E00042345 /* ADJSKAdNetwork.m */; }; 9D9D1533212EB3920081445E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D9D1532212EB3920081445E /* AppDelegate.m */; }; @@ -64,12 +64,12 @@ /* Begin PBXFileReference section */ 07AF832227BD3CBF00C5DD9E /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; - 07C8C7EC2B8F447B006979A1 /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; - 07C8C7ED2B8F447B006979A1 /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; - 07C8C7EE2B8F447B006979A1 /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; - 07C8C7EF2B8F447B006979A1 /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; - 07C8C7F02B8F447B006979A1 /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; - 07C8C7F12B8F447B006979A1 /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; + 0A4FE7A42AD6A11C0085338A /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; + 0A4FE7A52AD6A11C0085338A /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; + 0A4FE7A62AD6A11C0085338A /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; + 0A4FE7A72AD6A11C0085338A /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; + 0A4FE7A82AD6A11C0085338A /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; + 0A4FE7A92AD6A11C0085338A /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; 6FAB78BF2636DDC400773869 /* ADJLinkResolution.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJLinkResolution.m; sourceTree = ""; }; 6FAB78C02636DDC400773869 /* ADJLinkResolution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJLinkResolution.h; sourceTree = ""; }; 9D49D178290FEC2E00042345 /* ADJSKAdNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJSKAdNetwork.h; sourceTree = ""; }; @@ -298,12 +298,12 @@ 6FAB78BF2636DDC400773869 /* ADJLinkResolution.m */, 9D49D178290FEC2E00042345 /* ADJSKAdNetwork.h */, 9D49D179290FEC2E00042345 /* ADJSKAdNetwork.m */, - 07C8C7EE2B8F447B006979A1 /* ADJPurchase.h */, - 07C8C7ED2B8F447B006979A1 /* ADJPurchase.m */, - 07C8C7F02B8F447B006979A1 /* ADJPurchaseVerificationHandler.h */, - 07C8C7EF2B8F447B006979A1 /* ADJPurchaseVerificationHandler.m */, - 07C8C7F12B8F447B006979A1 /* ADJPurchaseVerificationResult.h */, - 07C8C7EC2B8F447B006979A1 /* ADJPurchaseVerificationResult.m */, + 0A4FE7A52AD6A11C0085338A /* ADJPurchase.h */, + 0A4FE7A92AD6A11C0085338A /* ADJPurchase.m */, + 0A4FE7A42AD6A11C0085338A /* ADJPurchaseVerificationHandler.h */, + 0A4FE7A62AD6A11C0085338A /* ADJPurchaseVerificationHandler.m */, + 0A4FE7A72AD6A11C0085338A /* ADJPurchaseVerificationResult.h */, + 0A4FE7A82AD6A11C0085338A /* ADJPurchaseVerificationResult.m */, ); name = Adjust; path = ../../../Adjust; @@ -427,13 +427,16 @@ 9DF92F202630F377000FC3FC /* ADJResponseData.m in Sources */, 9DF92F1C2630F377000FC3FC /* ADJActivityPackage.m in Sources */, 9DF92F0C2630F377000FC3FC /* ADJEventSuccess.m in Sources */, + 0A4FE7AB2AD6A11C0085338A /* ADJPurchaseVerificationResult.m in Sources */, 9DF92FB02630F3A1000FC3FC /* WKWebViewJavascriptBridge.m in Sources */, + 0A4FE7AA2AD6A11C0085338A /* ADJPurchaseVerificationHandler.m in Sources */, 9DF92F232630F377000FC3FC /* ADJUserDefaults.m in Sources */, 9DF92F182630F377000FC3FC /* NSData+ADJAdditions.m in Sources */, 9DF92F212630F377000FC3FC /* ADJPackageBuilder.m in Sources */, 9DF92F132630F377000FC3FC /* Adjust.m in Sources */, 9DF92F172630F377000FC3FC /* NSString+ADJAdditions.m in Sources */, 9DF92F052630F377000FC3FC /* ADJTimerOnce.m in Sources */, + 0A4FE7AC2AD6A11C0085338A /* ADJPurchase.m in Sources */, 9DF92F072630F377000FC3FC /* ADJRequestHandler.m in Sources */, 9DF92F122630F377000FC3FC /* ADJBackoffStrategy.m in Sources */, 9DF92F222630F377000FC3FC /* ADJSubscription.m in Sources */, diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj index e9d65b350..809657db5 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj @@ -146,9 +146,7 @@ TargetAttributes = { 9DF7A9C11CB4ECA600D3591F = { CreatedOnToolsVersion = 7.3; - DevelopmentTeam = QGUGW9AUMK; LastSwiftMigration = 1030; - ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.SafariKeychain = { enabled = 1; @@ -377,9 +375,9 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "AdjustExample-Swift/AdjustExample-Swift.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "AdjustExample-Swift/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; @@ -405,9 +403,9 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "AdjustExample-Swift/AdjustExample-Swift.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "AdjustExample-Swift/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift/AdjustExample-Swift.entitlements b/examples/AdjustExample-Swift/AdjustExample-Swift/AdjustExample-Swift.entitlements index c7476a337..0c67376eb 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift/AdjustExample-Swift.entitlements +++ b/examples/AdjustExample-Swift/AdjustExample-Swift/AdjustExample-Swift.entitlements @@ -1,10 +1,5 @@ - - com.apple.developer.associated-domains - - applinks:f6wc.adj.st - - + diff --git a/examples/AdjustExample-Swift/Podfile.lock b/examples/AdjustExample-Swift/Podfile.lock index c5ac9c983..4eaf23f76 100644 --- a/examples/AdjustExample-Swift/Podfile.lock +++ b/examples/AdjustExample-Swift/Podfile.lock @@ -11,7 +11,7 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - Adjust: a830d963025334aee8a62a7bac87825e297a841e + Adjust: 7034cf0249a9266fab2648286318b1b059645908 PODFILE CHECKSUM: 4c79da456db9adb90cdd42adc7f721c7bb6490cd diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj b/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj index 3f29f349d..ee4c3b97b 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj @@ -7,9 +7,9 @@ objects = { /* Begin PBXBuildFile section */ - 07C8C7E92B8F4404006979A1 /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7E32B8F4404006979A1 /* ADJPurchaseVerificationHandler.m */; }; - 07C8C7EA2B8F4404006979A1 /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7E52B8F4404006979A1 /* ADJPurchase.m */; }; - 07C8C7EB2B8F4404006979A1 /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7E82B8F4404006979A1 /* ADJPurchaseVerificationResult.m */; }; + 0A4FE7CE2AD6A3340085338A /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7C92AD6A3340085338A /* ADJPurchase.m */; }; + 0A4FE7CF2AD6A3340085338A /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7CA2AD6A3340085338A /* ADJPurchaseVerificationResult.m */; }; + 0A4FE7D02AD6A3340085338A /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7CD2AD6A3340085338A /* ADJPurchaseVerificationHandler.m */; }; 6F84513D25B1B1B40004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84513B25B1B1B40004C7C0 /* ADJThirdPartySharing.m */; }; 6FAB78AF2636DD6B00773869 /* ADJLinkResolution.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FAB78AE2636DD6B00773869 /* ADJLinkResolution.m */; }; 6FBEE91124E4213900FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91024E4213800FEF3F1 /* ADJUrlStrategy.m */; }; @@ -66,12 +66,12 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 07C8C7E32B8F4404006979A1 /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; - 07C8C7E42B8F4404006979A1 /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; - 07C8C7E52B8F4404006979A1 /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; - 07C8C7E62B8F4404006979A1 /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; - 07C8C7E72B8F4404006979A1 /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; - 07C8C7E82B8F4404006979A1 /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; + 0A4FE7C82AD6A3340085338A /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; + 0A4FE7C92AD6A3340085338A /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; + 0A4FE7CA2AD6A3340085338A /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; + 0A4FE7CB2AD6A3340085338A /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; + 0A4FE7CC2AD6A3340085338A /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; + 0A4FE7CD2AD6A3340085338A /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; 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 = ""; }; 6FAB78AD2636DD6B00773869 /* ADJLinkResolution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJLinkResolution.h; sourceTree = ""; }; @@ -319,12 +319,12 @@ 6FAB78AE2636DD6B00773869 /* ADJLinkResolution.m */, 9D49D16C290FEBEB00042345 /* ADJSKAdNetwork.h */, 9D49D16D290FEBEB00042345 /* ADJSKAdNetwork.m */, - 07C8C7E42B8F4404006979A1 /* ADJPurchase.h */, - 07C8C7E52B8F4404006979A1 /* ADJPurchase.m */, - 07C8C7E62B8F4404006979A1 /* ADJPurchaseVerificationHandler.h */, - 07C8C7E32B8F4404006979A1 /* ADJPurchaseVerificationHandler.m */, - 07C8C7E72B8F4404006979A1 /* ADJPurchaseVerificationResult.h */, - 07C8C7E82B8F4404006979A1 /* ADJPurchaseVerificationResult.m */, + 0A4FE7CC2AD6A3340085338A /* ADJPurchase.h */, + 0A4FE7C92AD6A3340085338A /* ADJPurchase.m */, + 0A4FE7CB2AD6A3340085338A /* ADJPurchaseVerificationHandler.h */, + 0A4FE7CD2AD6A3340085338A /* ADJPurchaseVerificationHandler.m */, + 0A4FE7C82AD6A3340085338A /* ADJPurchaseVerificationResult.h */, + 0A4FE7CA2AD6A3340085338A /* ADJPurchaseVerificationResult.m */, ); name = Adjust; path = ../../../Adjust; @@ -459,6 +459,7 @@ 9D449EEF1E6EDD4100E7E80B /* ADJRequestHandler.m in Sources */, 9D449EDC1E6EDD4100E7E80B /* ADJActivityPackage.m in Sources */, 9D449EF71E6EDD4100E7E80B /* ADJTimerOnce.m in Sources */, + 0A4FE7CF2AD6A3340085338A /* ADJPurchaseVerificationResult.m in Sources */, 9DF92D9F2630EE54000FC3FC /* ADJPackageParams.m in Sources */, 07C8C7E92B8F4404006979A1 /* ADJPurchaseVerificationHandler.m in Sources */, 9D449EF81E6EDD4100E7E80B /* Adjust.m in Sources */, @@ -485,11 +486,13 @@ 9D449EE21E6EDD4100E7E80B /* ADJAttribution.m in Sources */, 9D449EE81E6EDD4100E7E80B /* ADJEvent.m in Sources */, 9D49D16E290FEBEB00042345 /* ADJSKAdNetwork.m in Sources */, + 0A4FE7CE2AD6A3340085338A /* ADJPurchase.m in Sources */, 9D449EF11E6EDD4100E7E80B /* ADJSdkClickHandler.m in Sources */, 9D449EDB1E6EDD4100E7E80B /* ADJActivityKind.m in Sources */, 9D449EDE1E6EDD4100E7E80B /* NSData+ADJAdditions.m in Sources */, 9D449EED1E6EDD4100E7E80B /* ADJPackageBuilder.m in Sources */, 6FAB78AF2636DD6B00773869 /* ADJLinkResolution.m in Sources */, + 0A4FE7D02AD6A3340085338A /* ADJPurchaseVerificationHandler.m in Sources */, 9D449EF01E6EDD4100E7E80B /* ADJResponseData.m in Sources */, 9D1082A91CFDAF8E0050568B /* main.m in Sources */, 9D449EF91E6EDD4100E7E80B /* ADJUtil.m in Sources */, diff --git a/examples/AdjustExample-iMessage/AdjustExample-iMessage.xcodeproj/project.pbxproj b/examples/AdjustExample-iMessage/AdjustExample-iMessage.xcodeproj/project.pbxproj index 00af58cba..e1c25160b 100644 --- a/examples/AdjustExample-iMessage/AdjustExample-iMessage.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-iMessage/AdjustExample-iMessage.xcodeproj/project.pbxproj @@ -7,9 +7,9 @@ objects = { /* Begin PBXBuildFile section */ - 07C8C7E02B8F43AA006979A1 /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7DD2B8F43A9006979A1 /* ADJPurchase.m */; }; - 07C8C7E12B8F43AA006979A1 /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7DE2B8F43A9006979A1 /* ADJPurchaseVerificationHandler.m */; }; - 07C8C7E22B8F43AA006979A1 /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7DF2B8F43A9006979A1 /* ADJPurchaseVerificationResult.m */; }; + 0A4FE7B32AD6A14C0085338A /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7AD2AD6A14C0085338A /* ADJPurchase.m */; }; + 0A4FE7B42AD6A14C0085338A /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7B12AD6A14C0085338A /* ADJPurchaseVerificationHandler.m */; }; + 0A4FE7B52AD6A14C0085338A /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7B22AD6A14C0085338A /* ADJPurchaseVerificationResult.m */; }; 6F84514A25B1B1F40004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84514825B1B1F40004C7C0 /* ADJThirdPartySharing.m */; }; 6FAB78BC2636DDAF00773869 /* ADJLinkResolution.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FAB78BA2636DDAE00773869 /* ADJLinkResolution.m */; }; 6FBEE91A24E4218C00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91824E4218B00FEF3F1 /* ADJUrlStrategy.m */; }; @@ -79,12 +79,12 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 07C8C7DA2B8F43A9006979A1 /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; - 07C8C7DB2B8F43A9006979A1 /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; - 07C8C7DC2B8F43A9006979A1 /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; - 07C8C7DD2B8F43A9006979A1 /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; - 07C8C7DE2B8F43A9006979A1 /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; - 07C8C7DF2B8F43A9006979A1 /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; + 0A4FE7AD2AD6A14C0085338A /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; + 0A4FE7AE2AD6A14C0085338A /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; + 0A4FE7AF2AD6A14C0085338A /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; + 0A4FE7B02AD6A14C0085338A /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; + 0A4FE7B12AD6A14C0085338A /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; + 0A4FE7B22AD6A14C0085338A /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; 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 = ""; }; 6FAB78BA2636DDAE00773869 /* ADJLinkResolution.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJLinkResolution.m; sourceTree = ""; }; @@ -300,12 +300,12 @@ 6FAB78BA2636DDAE00773869 /* ADJLinkResolution.m */, 9D49D175290FEC2000042345 /* ADJSKAdNetwork.h */, 9D49D176290FEC2000042345 /* ADJSKAdNetwork.m */, - 07C8C7DB2B8F43A9006979A1 /* ADJPurchase.h */, - 07C8C7DD2B8F43A9006979A1 /* ADJPurchase.m */, - 07C8C7DA2B8F43A9006979A1 /* ADJPurchaseVerificationHandler.h */, - 07C8C7DE2B8F43A9006979A1 /* ADJPurchaseVerificationHandler.m */, - 07C8C7DC2B8F43A9006979A1 /* ADJPurchaseVerificationResult.h */, - 07C8C7DF2B8F43A9006979A1 /* ADJPurchaseVerificationResult.m */, + 0A4FE7AE2AD6A14C0085338A /* ADJPurchase.h */, + 0A4FE7AD2AD6A14C0085338A /* ADJPurchase.m */, + 0A4FE7AF2AD6A14C0085338A /* ADJPurchaseVerificationHandler.h */, + 0A4FE7B12AD6A14C0085338A /* ADJPurchaseVerificationHandler.m */, + 0A4FE7B02AD6A14C0085338A /* ADJPurchaseVerificationResult.h */, + 0A4FE7B22AD6A14C0085338A /* ADJPurchaseVerificationResult.m */, ); name = Adjust; path = ../../../Adjust; @@ -431,7 +431,7 @@ 9D01686920FF88F60029CFFF /* ADJActivityKind.m in Sources */, 9D01685F20FF88F60029CFFF /* ADJEventSuccess.m in Sources */, 9D01685920FF88F60029CFFF /* ADJRequestHandler.m in Sources */, - 07C8C7E12B8F43AA006979A1 /* ADJPurchaseVerificationHandler.m in Sources */, + 0A4FE7B42AD6A14C0085338A /* ADJPurchaseVerificationHandler.m in Sources */, 9D01686420FF88F60029CFFF /* ADJLogger.m in Sources */, 9D01687020FF88F60029CFFF /* ADJUtil.m in Sources */, 9D01685B20FF88F60029CFFF /* ADJSdkClickHandler.m in Sources */, @@ -449,10 +449,10 @@ 9D01685E20FF88F60029CFFF /* ADJEventFailure.m in Sources */, 9D3A2AE72626518E00BD6E44 /* ADJAdRevenue.m in Sources */, 9D01685720FF88F60029CFFF /* ADJTimerOnce.m in Sources */, - 07C8C7E02B8F43AA006979A1 /* ADJPurchase.m in Sources */, + 0A4FE7B32AD6A14C0085338A /* ADJPurchase.m in Sources */, 9D01686220FF88F60029CFFF /* ADJTimerCycle.m in Sources */, 9D01686D20FF88F60029CFFF /* ADJAttribution.m in Sources */, - 07C8C7E22B8F43AA006979A1 /* ADJPurchaseVerificationResult.m in Sources */, + 0A4FE7B52AD6A14C0085338A /* ADJPurchaseVerificationResult.m in Sources */, 9D01686320FF88F60029CFFF /* ADJSessionParameters.m in Sources */, 9D01686B20FF88F60029CFFF /* NSData+ADJAdditions.m in Sources */, 9D01685C20FF88F60029CFFF /* ADJEvent.m in Sources */, diff --git a/examples/AdjustExample-iWatch/AdjustExample-iWatch.xcodeproj/project.pbxproj b/examples/AdjustExample-iWatch/AdjustExample-iWatch.xcodeproj/project.pbxproj index f43dde39c..1f476eff6 100644 --- a/examples/AdjustExample-iWatch/AdjustExample-iWatch.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-iWatch/AdjustExample-iWatch.xcodeproj/project.pbxproj @@ -7,9 +7,9 @@ objects = { /* Begin PBXBuildFile section */ - 07C8C7FB2B8F45B1006979A1 /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7F52B8F45B1006979A1 /* ADJPurchaseVerificationResult.m */; }; - 07C8C7FC2B8F45B1006979A1 /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7F82B8F45B1006979A1 /* ADJPurchaseVerificationHandler.m */; }; - 07C8C7FD2B8F45B1006979A1 /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7F92B8F45B1006979A1 /* ADJPurchase.m */; }; + 0A4FE7BC2AD6A18C0085338A /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7B62AD6A18C0085338A /* ADJPurchaseVerificationHandler.m */; }; + 0A4FE7BD2AD6A18C0085338A /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7B92AD6A18C0085338A /* ADJPurchaseVerificationResult.m */; }; + 0A4FE7BE2AD6A18C0085338A /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7BA2AD6A18C0085338A /* ADJPurchase.m */; }; 6F84514425B1B1DB0004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84514325B1B1DB0004C7C0 /* ADJThirdPartySharing.m */; }; 6FAB78B62636DD9600773869 /* ADJLinkResolution.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FAB78B52636DD9600773869 /* ADJLinkResolution.m */; }; 6FBEE91724E4215E00FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91624E4215E00FEF3F1 /* ADJUrlStrategy.m */; }; @@ -110,12 +110,12 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 07C8C7F52B8F45B1006979A1 /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; - 07C8C7F62B8F45B1006979A1 /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; - 07C8C7F72B8F45B1006979A1 /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; - 07C8C7F82B8F45B1006979A1 /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; - 07C8C7F92B8F45B1006979A1 /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; - 07C8C7FA2B8F45B1006979A1 /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; + 0A4FE7B62AD6A18C0085338A /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; + 0A4FE7B72AD6A18C0085338A /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; + 0A4FE7B82AD6A18C0085338A /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; + 0A4FE7B92AD6A18C0085338A /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; + 0A4FE7BA2AD6A18C0085338A /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; + 0A4FE7BB2AD6A18C0085338A /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; 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 = ""; }; 6FAB78B42636DD9600773869 /* ADJLinkResolution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJLinkResolution.h; sourceTree = ""; }; @@ -278,6 +278,12 @@ 9DF92DA42630EE8E000FC3FC /* ADJPackageParams.m */, 9D449F8A1E6EE72000E7E80B /* ADJPackageHandler.h */, 9D449F8B1E6EE72000E7E80B /* ADJPackageHandler.m */, + 0A4FE7B72AD6A18C0085338A /* ADJPurchase.h */, + 0A4FE7BA2AD6A18C0085338A /* ADJPurchase.m */, + 0A4FE7BB2AD6A18C0085338A /* ADJPurchaseVerificationHandler.h */, + 0A4FE7B62AD6A18C0085338A /* ADJPurchaseVerificationHandler.m */, + 0A4FE7B82AD6A18C0085338A /* ADJPurchaseVerificationResult.h */, + 0A4FE7B92AD6A18C0085338A /* ADJPurchaseVerificationResult.m */, 9D449F8C1E6EE72000E7E80B /* ADJRequestHandler.h */, 9D449F8D1E6EE72000E7E80B /* ADJRequestHandler.m */, 9D449F8E1E6EE72000E7E80B /* ADJResponseData.h */, @@ -589,6 +595,9 @@ 9D49D174290FEC0F00042345 /* ADJSKAdNetwork.m in Sources */, 07C8C7FD2B8F45B1006979A1 /* ADJPurchase.m in Sources */, 6F84514425B1B1DB0004C7C0 /* ADJThirdPartySharing.m in Sources */, + 0A4FE7BE2AD6A18C0085338A /* ADJPurchase.m in Sources */, + 0A4FE7BC2AD6A18C0085338A /* ADJPurchaseVerificationHandler.m in Sources */, + 0A4FE7BD2AD6A18C0085338A /* ADJPurchaseVerificationResult.m in Sources */, 9D449FB61E6EE72000E7E80B /* ADJPackageBuilder.m in Sources */, 9D449FBD1E6EE72000E7E80B /* ADJSessionSuccess.m in Sources */, 07C8C7FB2B8F45B1006979A1 /* ADJPurchaseVerificationResult.m in Sources */, diff --git a/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj b/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj index f9d4852ea..9a1c21c68 100644 --- a/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj @@ -7,9 +7,9 @@ objects = { /* Begin PBXBuildFile section */ - 07C8C7D72B8F428F006979A1 /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7D12B8F428F006979A1 /* ADJPurchaseVerificationResult.m */; }; - 07C8C7D82B8F428F006979A1 /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7D22B8F428F006979A1 /* ADJPurchase.m */; }; - 07C8C7D92B8F428F006979A1 /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C8C7D32B8F428F006979A1 /* ADJPurchaseVerificationHandler.m */; }; + 0A4FE7C52AD6A2750085338A /* ADJPurchaseVerificationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7C22AD6A2750085338A /* ADJPurchaseVerificationResult.m */; }; + 0A4FE7C62AD6A2750085338A /* ADJPurchaseVerificationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7C32AD6A2750085338A /* ADJPurchaseVerificationHandler.m */; }; + 0A4FE7C72AD6A2750085338A /* ADJPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A4FE7C42AD6A2750085338A /* ADJPurchase.m */; }; 6F84514125B1B1C80004C7C0 /* ADJThirdPartySharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F84513F25B1B1C70004C7C0 /* ADJThirdPartySharing.m */; }; 6FAB78B32636DD8200773869 /* ADJLinkResolution.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FAB78B22636DD8200773869 /* ADJLinkResolution.m */; }; 6FBEE91424E4214800FEF3F1 /* ADJUrlStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBEE91324E4214800FEF3F1 /* ADJUrlStrategy.m */; }; @@ -70,12 +70,12 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 07C8C7D12B8F428F006979A1 /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; - 07C8C7D22B8F428F006979A1 /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; - 07C8C7D32B8F428F006979A1 /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; - 07C8C7D42B8F428F006979A1 /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; - 07C8C7D52B8F428F006979A1 /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; - 07C8C7D62B8F428F006979A1 /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; + 0A4FE7BF2AD6A2750085338A /* ADJPurchase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchase.h; sourceTree = ""; }; + 0A4FE7C02AD6A2750085338A /* ADJPurchaseVerificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationHandler.h; sourceTree = ""; }; + 0A4FE7C12AD6A2750085338A /* ADJPurchaseVerificationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJPurchaseVerificationResult.h; sourceTree = ""; }; + 0A4FE7C22AD6A2750085338A /* ADJPurchaseVerificationResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationResult.m; sourceTree = ""; }; + 0A4FE7C32AD6A2750085338A /* ADJPurchaseVerificationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchaseVerificationHandler.m; sourceTree = ""; }; + 0A4FE7C42AD6A2750085338A /* ADJPurchase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJPurchase.m; sourceTree = ""; }; 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 = ""; }; 6FAB78B12636DD8200773869 /* ADJLinkResolution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJLinkResolution.h; sourceTree = ""; }; @@ -234,6 +234,8 @@ 9D449F041E6EE6C500E7E80B /* ADJActivityState.m */, 9D449F0C1E6EE6C500E7E80B /* ADJAdjustFactory.h */, 9D449F0D1E6EE6C500E7E80B /* ADJAdjustFactory.m */, + 9D3A2ADF2626515900BD6E44 /* ADJAdRevenue.h */, + 9D3A2AE02626515900BD6E44 /* ADJAdRevenue.m */, 9D449F0E1E6EE6C500E7E80B /* ADJAttribution.h */, 9D449F0F1E6EE6C500E7E80B /* ADJAttribution.m */, 9D449F101E6EE6C500E7E80B /* ADJAttributionHandler.h */, @@ -248,6 +250,8 @@ 9D449F1D1E6EE6C500E7E80B /* ADJEventFailure.m */, 9D449F1E1E6EE6C500E7E80B /* ADJEventSuccess.h */, 9D449F1F1E6EE6C500E7E80B /* ADJEventSuccess.m */, + 6FAB78B12636DD8200773869 /* ADJLinkResolution.h */, + 6FAB78B22636DD8200773869 /* ADJLinkResolution.m */, 9D449F221E6EE6C500E7E80B /* ADJLogger.h */, 9D449F231E6EE6C500E7E80B /* ADJLogger.m */, 9D449F241E6EE6C500E7E80B /* ADJPackageBuilder.h */, @@ -256,6 +260,12 @@ 9DF92DA12630EE74000FC3FC /* ADJPackageParams.m */, 9D449F261E6EE6C500E7E80B /* ADJPackageHandler.h */, 9D449F271E6EE6C500E7E80B /* ADJPackageHandler.m */, + 0A4FE7BF2AD6A2750085338A /* ADJPurchase.h */, + 0A4FE7C42AD6A2750085338A /* ADJPurchase.m */, + 0A4FE7C02AD6A2750085338A /* ADJPurchaseVerificationHandler.h */, + 0A4FE7C32AD6A2750085338A /* ADJPurchaseVerificationHandler.m */, + 0A4FE7C12AD6A2750085338A /* ADJPurchaseVerificationResult.h */, + 0A4FE7C22AD6A2750085338A /* ADJPurchaseVerificationResult.m */, 9D449F281E6EE6C500E7E80B /* ADJRequestHandler.h */, 9D449F291E6EE6C500E7E80B /* ADJRequestHandler.m */, 9D449F2A1E6EE6C500E7E80B /* ADJResponseData.h */, @@ -268,34 +278,24 @@ 9D449F311E6EE6C500E7E80B /* ADJSessionParameters.m */, 9D449F321E6EE6C500E7E80B /* ADJSessionSuccess.h */, 9D449F331E6EE6C500E7E80B /* ADJSessionSuccess.m */, + 9D49D16F290FEBFC00042345 /* ADJSKAdNetwork.h */, + 9D49D170290FEBFC00042345 /* ADJSKAdNetwork.m */, + 9D2F24132447DE1F00B7CA90 /* ADJSubscription.h */, + 9D2F24122447DE1E00B7CA90 /* ADJSubscription.m */, + 6F84514025B1B1C80004C7C0 /* ADJThirdPartySharing.h */, + 6F84513F25B1B1C70004C7C0 /* ADJThirdPartySharing.m */, 9D449F361E6EE6C500E7E80B /* ADJTimerCycle.h */, 9D449F371E6EE6C500E7E80B /* ADJTimerCycle.m */, 9D449F381E6EE6C500E7E80B /* ADJTimerOnce.h */, 9D449F391E6EE6C500E7E80B /* ADJTimerOnce.m */, 9D449F3A1E6EE6C500E7E80B /* Adjust.h */, 9D449F3B1E6EE6C500E7E80B /* Adjust.m */, - 9D449F3C1E6EE6C500E7E80B /* ADJUtil.h */, - 9D449F3D1E6EE6C500E7E80B /* ADJUtil.m */, - 9DD0E9CD1F459ECE00B2A759 /* ADJUserDefaults.h */, - 9DD0E9CE1F459ECE00B2A759 /* ADJUserDefaults.m */, - 9D2F24132447DE1F00B7CA90 /* ADJSubscription.h */, - 9D2F24122447DE1E00B7CA90 /* ADJSubscription.m */, 6FBEE91224E4214800FEF3F1 /* ADJUrlStrategy.h */, 6FBEE91324E4214800FEF3F1 /* ADJUrlStrategy.m */, - 6F84514025B1B1C80004C7C0 /* ADJThirdPartySharing.h */, - 6F84513F25B1B1C70004C7C0 /* ADJThirdPartySharing.m */, - 9D3A2ADF2626515900BD6E44 /* ADJAdRevenue.h */, - 9D3A2AE02626515900BD6E44 /* ADJAdRevenue.m */, - 6FAB78B12636DD8200773869 /* ADJLinkResolution.h */, - 6FAB78B22636DD8200773869 /* ADJLinkResolution.m */, - 9D49D16F290FEBFC00042345 /* ADJSKAdNetwork.h */, - 9D49D170290FEBFC00042345 /* ADJSKAdNetwork.m */, - 07C8C7D62B8F428F006979A1 /* ADJPurchase.h */, - 07C8C7D22B8F428F006979A1 /* ADJPurchase.m */, - 07C8C7D42B8F428F006979A1 /* ADJPurchaseVerificationHandler.h */, - 07C8C7D32B8F428F006979A1 /* ADJPurchaseVerificationHandler.m */, - 07C8C7D52B8F428F006979A1 /* ADJPurchaseVerificationResult.h */, - 07C8C7D12B8F428F006979A1 /* ADJPurchaseVerificationResult.m */, + 9DD0E9CD1F459ECE00B2A759 /* ADJUserDefaults.h */, + 9DD0E9CE1F459ECE00B2A759 /* ADJUserDefaults.m */, + 9D449F3C1E6EE6C500E7E80B /* ADJUtil.h */, + 9D449F3D1E6EE6C500E7E80B /* ADJUtil.m */, ); name = Adjust; path = ../../../Adjust; @@ -433,12 +433,14 @@ 9D449F5C1E6EE6C500E7E80B /* ADJTimerOnce.m in Sources */, 9D449F401E6EE6C500E7E80B /* ADJActivityKind.m in Sources */, 9D449F481E6EE6C500E7E80B /* ADJAttributionHandler.m in Sources */, + 0A4FE7C72AD6A2750085338A /* ADJPurchase.m in Sources */, 9D449F541E6EE6C500E7E80B /* ADJRequestHandler.m in Sources */, 9DF92DA22630EE75000FC3FC /* ADJPackageParams.m in Sources */, 9D449F4D1E6EE6C500E7E80B /* ADJEvent.m in Sources */, 963909B71BCC0D8300A2E8A4 /* main.m in Sources */, 6FBEE91424E4214800FEF3F1 /* ADJUrlStrategy.m in Sources */, - 07C8C7D72B8F428F006979A1 /* ADJPurchaseVerificationResult.m in Sources */, + 0A4FE7C52AD6A2750085338A /* ADJPurchaseVerificationResult.m in Sources */, + 0A4FE7C62AD6A2750085338A /* ADJPurchaseVerificationHandler.m in Sources */, 9D449F491E6EE6C500E7E80B /* ADJBackoffStrategy.m in Sources */, 9D449F581E6EE6C500E7E80B /* ADJSessionParameters.m in Sources */, 9D49D171290FEBFC00042345 /* ADJSKAdNetwork.m in Sources */, diff --git a/scripts/build_definitions.sh b/scripts/build_definitions.sh index 46f6f7139..76d51df39 100755 --- a/scripts/build_definitions.sh +++ b/scripts/build_definitions.sh @@ -1,22 +1,22 @@ #!/usr/bin/env bash -if [ -z ${NC+x} ]; then - # Colors for output - NC='\033[0m' - RED='\033[0;31m' - CYAN='\033[1;36m' - GREEN='\033[0;32m' - YELLOW='\033[1;33m' +if [ -z ${NC+x} ]; then + # Colors for output + NC='\033[0m' + RED='\033[0;31m' + CYAN='\033[1;36m' + GREEN='\033[0;32m' + YELLOW='\033[1;33m' fi -if [ -z ${XCF_OUTPUT_FOLDER+x} ]; then - - echo "Executing the definitions script..."; - set -o pipefail +if [ -z ${XCF_OUTPUT_FOLDER+x} ]; then - function usage(){ + echo "Executing the definitions script..."; + set -o pipefail - echo -e "${RED}[ADJUST][BUILD]:${GREEN} + function usage(){ + + echo -e "${RED}[ADJUST][BUILD]:${GREEN} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Usage: $0 [options] @@ -24,27 +24,27 @@ Usage: $0 [options] * For a certain Build Types, specify any of the following arguments: - Build Types: + Build Types: - [-fs] Build static library frameworks - [-fd] Build dynamic library frameworks - [-xs] Build static library xcframeworks - [-xd] Build dynamic library xcframeworks + [-fs] Build static library frameworks + [-fd] Build dynamic library frameworks + [-xs] Build static library xcframeworks + [-xd] Build dynamic library xcframeworks * For a certain Platform Targets, specify any of the following arguments: - Platform Targets: + Platform Targets: - [-ios] iOS platform target - [-tv] tvOS platform target - [-im] iMessaging platform target - [-web] Web-Bridge platform target + [-ios] iOS platform target + [-tv] tvOS platform target + [-im] iMessaging platform target + [-web] Web-Bridge platform target * If none of Platform Target arguments is specified, all Platform Targets are built. * For a Test Framework, specify the following argument: - [-test] Test Framework + [-test] Test Framework * Examples: @@ -58,324 +58,312 @@ Usage: $0 [options] ./scripts/build_frameworks.sh -fs -xs -ios -tv - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -${NC}" - exit 1 - } - - - BUILD_DYNAMIC_FRAMEWORK=0 - BUILD_STATIC_FRAMEWORK=0 - BUILD_DYNAMIC_XCFRAMEWORK=0 - BUILD_STATIC_XCFRAMEWORK=0 - BUILD_TARGET_IOS=0 - BUILD_TARGET_TVOS=0 - BUILD_TARGET_IM=0 - BUILD_TARGET_WEB_BRIDGE=0 - BUILD_TEST_FRAMEWORK=0 - BUILD_ALL=0 - - for an_arg in "$@" ; do - case "$an_arg" in - '-fd') BUILD_DYNAMIC_FRAMEWORK=1 - ;; - '-fs') BUILD_STATIC_FRAMEWORK=1 - ;; - '-xd') BUILD_DYNAMIC_XCFRAMEWORK=1 - ;; - '-xs') BUILD_STATIC_XCFRAMEWORK=1 - ;; - '-ios') BUILD_TARGET_IOS=1 - ;; - '-tv') BUILD_TARGET_TVOS=1 - ;; - '-im') BUILD_TARGET_IM=1 - ;; - '-web') BUILD_TARGET_WEB_BRIDGE=1 - ;; - '-test') BUILD_TEST_FRAMEWORK=1 - ;; - '-all') BUILD_ALL=1 - ;; - esac - done - - if [[ BUILD_ALL -eq 1 ]] - then - BUILD_DYNAMIC_FRAMEWORK=1 - BUILD_STATIC_FRAMEWORK=1 - BUILD_DYNAMIC_XCFRAMEWORK=1 - BUILD_STATIC_XCFRAMEWORK=1 - BUILD_TARGET_IOS=1 - BUILD_TARGET_TVOS=1 - BUILD_TARGET_IM=1 - BUILD_TARGET_WEB_BRIDGE=1 - BUILD_TEST_FRAMEWORK=1 - fi - - if [[ $BUILD_DYNAMIC_FRAMEWORK -eq 0 ]] && [[ $BUILD_STATIC_FRAMEWORK -eq 0 ]] && [[ $BUILD_DYNAMIC_XCFRAMEWORK -eq 0 ]] && [[ $BUILD_STATIC_XCFRAMEWORK -eq 0 ]] && [[ $BUILD_TEST_FRAMEWORK -eq 0 ]] - then - usage - fi - - if [[ $BUILD_TARGET_IOS -eq 0 ]] && [[ $BUILD_TARGET_TVOS -eq 0 ]] && [[ $BUILD_TARGET_IM -eq 0 ]] && [[ $BUILD_TARGET_WEB_BRIDGE -eq 0 ]] - then - # If no platform variant is provided, all platform variants will be built. - BUILD_TARGET_IOS=1 - BUILD_TARGET_TVOS=1 - BUILD_TARGET_IM=1 - BUILD_TARGET_WEB_BRIDGE=1 - fi - - echo "BUILD_DYNAMIC_FRAMEWORK: $BUILD_DYNAMIC_FRAMEWORK"; - echo "BUILD_STATIC_FRAMEWORK: $BUILD_STATIC_FRAMEWORK"; - echo "BUILD_DYNAMIC_XCFRAMEWORK: $BUILD_DYNAMIC_XCFRAMEWORK"; - echo "BUILD_STATIC_XCFRAMEWORK: $BUILD_STATIC_XCFRAMEWORK"; - echo "BUILD_TARGET_IOS: $BUILD_TARGET_IOS"; - echo "BUILD_TARGET_TVOS: $BUILD_TARGET_TVOS"; - echo "BUILD_TARGET_IM: $BUILD_TARGET_IM"; - echo "BUILD_TARGET_WEB_BRIDGE: $BUILD_TARGET_WEB_BRIDGE"; - echo "BUILD_TEST_FRAMEWORK: $BUILD_TEST_FRAMEWORK"; - - - # Output folder for frameworks and xcframeworks - XCF_OUTPUT_FOLDER="sdk_distribution" - XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER="xcframeworks-dynamic" - XCF_OUTPUT_STATIC_XCFRMK_FOLDER="xcframeworks-static" - XCF_OUTPUT_DYNAMIC_FRMK_FOLDER="frameworks-dynamic" - XCF_OUTPUT_STATIC_FRMK_FOLDER="frameworks-static" - XCF_OUTPUT_STATIC_TEST_FRMK_FOLDER="test-static-framework" - - # SDK Schema names - Dynamic - SCHEMA_NAME__ADJUST_IOS="AdjustSdk" - SCHEMA_NAME__ADJUST_TV="AdjustSdkTv" - SCHEMA_NAME__ADJUST_IM="AdjustSdkIm" - SCHEMA_NAME__ADJUST_WEB_BRIDGE="AdjustSdkWebBridge" - - # SDK Schema names - Static - SCHEMA_NAME__ADJUST_IOS_STATIC="AdjustSdkStatic" - SCHEMA_NAME__ADJUST_TV_STATIC="AdjustSdkTvStatic" - SCHEMA_NAME__ADJUST_IM_STATIC="AdjustSdkImStatic" - SCHEMA_NAME__ADJUST_WEB_BRIDGE_STATIC="AdjustSdkWebBridgeStatic" - - # SDK frameworks and xcframework names - XCF_FRM_NAME__ADJUST_IOS="AdjustSdk" - XCF_FRM_NAME__ADJUST_TV="AdjustSdkTv" - XCF_FRM_NAME__ADJUST_IM="AdjustSdkIm" - XCF_FRM_NAME__ADJUST_WEB_BRIDGE="AdjustSdkWebBridge" - - # xcode archive names - ARCHIVE_NAME__IOS_DEVICE="AdjustSdk-Device" - ARCHIVE_NAME__IOS_SIMULATOR="AdjustSdk-Simulator" - ARCHIVE_NAME__TV_DEVICE="AdjustSdkTv-Device" - ARCHIVE_NAME__TV_SIMULATOR="AdjustSdkTv-Simulator" - ARCHIVE_NAME__IM_DEVICE="AdjustSdkIm-Device" - ARCHIVE_NAME__IM_SIMULATOR="AdjustSdkIm-Simulator" - ARCHIVE_NAME__WEB_DEVICE="AdjustSdkWebBridge-Device" - ARCHIVE_NAME__WEB_SIMULATOR="AdjustSdkWebBridge-Simulator" - - # XCFrameworks and Frameworks archive (ZIP) names - XCF_FRM_ZIP_NAME__IOS_TV_DYNAMIC="AdjustSdk-iOS-tvOS-Dynamic" - XCF_FRM_ZIP_NAME__IOS_TV_STATIC="AdjustSdk-iOS-tvOS-Static" - XCF_FRM_ZIP_NAME__IOS_DYNAMIC="AdjustSdk-iOS-Dynamic" - XCF_FRM_ZIP_NAME__IOS_STATIC="AdjustSdk-iOS-Static" - XCF_FRM_ZIP_NAME__TV_DYNAMIC="AdjustSdk-tvOS-Dynamic" - XCF_FRM_ZIP_NAME__TV_STATIC="AdjustSdk-tvOS-Static" - XCF_FRM_ZIP_NAME__IM_DYNAMIC="AdjustSdk-iMessage-Dynamic" - XCF_FRM_ZIP_NAME__IM_STATIC="AdjustSdk-iMessage-Static" - XCF_FRM_ZIP_NAME__WEB_BRIDGE_DYNAMIC="AdjustSdk-WebBridge-Dynamic" - XCF_FRM_ZIP_NAME__WEB_BRIDGE_STATIC="AdjustSdk-WebBridge-Static" - - # Xcode version impacts the way we build frameworks - XCODE12PLUS=0 - XCODE14PLUS=0 - product_version=$(xcodebuild -version) - xcode_version=( ${product_version//./ } ) - xcode="${xcode_version[0]}" - major="${xcode_version[1]}" - minor="${xcode_version[2]}" - echo "${xcode}.${major}.${minor}" - if [[ $major > 11 ]]; then - XCODE12PLUS=1 - fi - if [[ $major > 13 ]]; then - XCODE14PLUS=1 - fi - - SDK_VERSION=$(head -n 1 VERSION) - echo "$SDK_VERSION" - - # previous builds artefacts cleanup - rm -rf ${XCF_OUTPUT_FOLDER} - mkdir ${XCF_OUTPUT_FOLDER} - - # previous xcode build folder cleanup - xcodebuild clean - - function build_archive() { - # Prameters: - # 1 - scheme name - # 2 - sdk - # 3 - destination - # 4 - archive path - - local target_scheme="$1" - local target_sdk="$2" - local platform_destination="$3" - local output_path="$4" - - echo "XCFramework: Building $target_scheme - $target_sdk Archive..." - - xcodebuild clean archive \ - -scheme "$target_scheme" \ - -configuration Release \ - -sdk "$target_sdk" \ - -destination "$platform_destination" \ - -archivePath "$output_path" \ - SKIP_INSTALL=NO \ - BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ - GCC_GENERATE_DEBUGGING_SYMBOLS=YES - - } - - function generate_bcsymbols_command_parameter() { - # Prameters: - # 1 - Archive name - # 2 - Archive location folder - #echo "XCFramework: Generating BCSymbolMap paths command from $1 ..." - BCSYMBOLMAP_PATHS=" " - if [[ $XCODE14PLUS == 0 ]]; then - BCSYMBOLMAP_PATHS=("$(pwd -P)"/$2/$1.xcarchive/BCSymbolMaps/*) - BCSYMBOLMAP_COMMANDS="" - for path in "${BCSYMBOLMAP_PATHS[@]}"; do - BCSYMBOLMAP_COMMANDS="$BCSYMBOLMAP_COMMANDS -debug-symbols $path " - done - fi - echo $BCSYMBOLMAP_COMMANDS - } - - - function archive_framework() { - - local input_folder="$1" - local input_file="$2" - local output_file="$3" - - cd "$input_folder" - zip -r -X -y "$output_file" "$input_file" - cd - - } - - - XCODE12PLUS=0 - product_version=$(xcodebuild -version) - xcode_version=( ${product_version//./ } ) - xcode="${xcode_version[0]}" - major="${xcode_version[1]}" - minor="${xcode_version[2]}" - echo "${xcode}.${major}.${minor}" - if [[ $major > 11 ]]; then - XCODE12PLUS=1 - fi - - SDK_VERSION=$(head -n 1 VERSION) - echo "$SDK_VERSION" - - # Build, Lipo an Zip framework function - function build_static_fat_framework() { - # Prameters: - # 1 - Target scheme name - # 2 - Target OS ('ios', 'tvos') - # 3 - Resulting SDK Framework name - # 4 - SDK scheme build root folder - # 5 - Framework output folder - # 6 - Zip archive name - - local target_scheme="$1" - local os="$2" - local framework_name="$3" - local build_root_folder="$4" - local output_folder="$5" - local zip_file_name="$6" - - - echo "= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =" - echo "Target Scheme - $target_scheme" - echo "Target OS - $os" - echo "Resulting SDK Framework name - $framework_name" - echo "SDK scheme build root folder - $build_root_folder" - echo "Framework output folder - $output_folder" - echo "Zip file name - $zip_file_name" - echo "= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =" - - xcodebuild clean - - if [[ $os == "ios" ]]; then - - if [[ $XCODE14PLUS > 0 ]]; then - # Xcode14 dropped 32-bit support, so we have to drop 'i386' arc. - xcodebuild -configuration Release \ - -target "$target_scheme" \ - -sdk iphonesimulator \ - -arch x86_64 \ - build - else - xcodebuild -configuration Release \ - -target "$target_scheme" \ - -sdk iphonesimulator \ - -arch x86_64 -arch i386 \ - build - fi - - xcodebuild -configuration Release \ - -target "$target_scheme" \ - -sdk iphoneos \ - build - - ditto "./$build_root_folder/$target_scheme/iphoneos/$framework_name.framework" "./$build_root_folder/$target_scheme/universal/$framework_name.framework" - - xcrun lipo -create \ - "./$build_root_folder/$target_scheme/iphoneos/$framework_name.framework/Versions/A/$framework_name" \ - "./$build_root_folder/$target_scheme/iphonesimulator/$framework_name.framework/Versions/A/$framework_name" \ - -output "./$build_root_folder/$target_scheme/universal/$framework_name.framework/Versions/A/$framework_name" - - - - elif [[ $os == "tvos" ]]; then - - xcodebuild -configuration Release \ - -target "$target_scheme" \ - -sdk appletvsimulator \ - -arch x86_64 \ - build - - xcodebuild -configuration Release \ - -target "$target_scheme" \ - -sdk appletvos \ - build - - ditto "./$build_root_folder/$target_scheme/appletvos/$framework_name.framework" "./$build_root_folder/$target_scheme/universal/$framework_name.framework" - - xcrun lipo -create \ - "./$build_root_folder/$target_scheme/appletvos/$framework_name.framework/Versions/A/$framework_name" \ - "./$build_root_folder/$target_scheme/appletvsimulator/$framework_name.framework/Versions/A/$framework_name" \ - -output "./$build_root_folder/$target_scheme/universal/$framework_name.framework/Versions/A/$framework_name" - - else - - echo "ERROR: Unsupported OS type!" - return 1 - - fi - - cd "$build_root_folder/$target_scheme/universal" - zip -r -X -y "$zip_file_name" "$framework_name.framework" - cd - - mv "$build_root_folder/$target_scheme/universal/$zip_file_name" "$output_folder" - mv "$build_root_folder/$target_scheme/universal/$framework_name.framework" "$output_folder" - rm -rf "$build_root_folder/$target_scheme" - - } -else - # echo "The definitions script has been already executed. Skipping it..."; + exit 1 + } + + + BUILD_DYNAMIC_FRAMEWORK=0 + BUILD_STATIC_FRAMEWORK=0 + BUILD_DYNAMIC_XCFRAMEWORK=0 + BUILD_STATIC_XCFRAMEWORK=0 + BUILD_TARGET_IOS=0 + BUILD_TARGET_TVOS=0 + BUILD_TARGET_IM=0 + BUILD_TARGET_WEB_BRIDGE=0 + BUILD_TEST_FRAMEWORK=0 + BUILD_ALL=0 + + for an_arg in "$@" ; do + case "$an_arg" in + '-fd') BUILD_DYNAMIC_FRAMEWORK=1 + ;; + '-fs') BUILD_STATIC_FRAMEWORK=1 + ;; + '-xd') BUILD_DYNAMIC_XCFRAMEWORK=1 + ;; + '-xs') BUILD_STATIC_XCFRAMEWORK=1 + ;; + '-ios') BUILD_TARGET_IOS=1 + ;; + '-tv') BUILD_TARGET_TVOS=1 + ;; + '-im') BUILD_TARGET_IM=1 + ;; + '-web') BUILD_TARGET_WEB_BRIDGE=1 + ;; + '-test') BUILD_TEST_FRAMEWORK=1 + ;; + '-all') BUILD_ALL=1 + ;; + esac + done + + if [[ BUILD_ALL -eq 1 ]] + then + BUILD_DYNAMIC_FRAMEWORK=1 + BUILD_STATIC_FRAMEWORK=1 + BUILD_DYNAMIC_XCFRAMEWORK=1 + BUILD_STATIC_XCFRAMEWORK=1 + BUILD_TARGET_IOS=1 + BUILD_TARGET_TVOS=1 + BUILD_TARGET_IM=1 + BUILD_TARGET_WEB_BRIDGE=1 + BUILD_TEST_FRAMEWORK=1 + fi + + if [[ $BUILD_DYNAMIC_FRAMEWORK -eq 0 ]] && [[ $BUILD_STATIC_FRAMEWORK -eq 0 ]] && [[ $BUILD_DYNAMIC_XCFRAMEWORK -eq 0 ]] && [[ $BUILD_STATIC_XCFRAMEWORK -eq 0 ]] && [[ $BUILD_TEST_FRAMEWORK -eq 0 ]] + then + usage + fi + + if [[ $BUILD_TARGET_IOS -eq 0 ]] && [[ $BUILD_TARGET_TVOS -eq 0 ]] && [[ $BUILD_TARGET_IM -eq 0 ]] && [[ $BUILD_TARGET_WEB_BRIDGE -eq 0 ]] + then + # If no platform variant is provided, all platform variants will be built. + BUILD_TARGET_IOS=1 + BUILD_TARGET_TVOS=1 + BUILD_TARGET_IM=1 + BUILD_TARGET_WEB_BRIDGE=1 + fi + + echo "BUILD_DYNAMIC_FRAMEWORK: $BUILD_DYNAMIC_FRAMEWORK"; + echo "BUILD_STATIC_FRAMEWORK: $BUILD_STATIC_FRAMEWORK"; + echo "BUILD_DYNAMIC_XCFRAMEWORK: $BUILD_DYNAMIC_XCFRAMEWORK"; + echo "BUILD_STATIC_XCFRAMEWORK: $BUILD_STATIC_XCFRAMEWORK"; + echo "BUILD_TARGET_IOS: $BUILD_TARGET_IOS"; + echo "BUILD_TARGET_TVOS: $BUILD_TARGET_TVOS"; + echo "BUILD_TARGET_IM: $BUILD_TARGET_IM"; + echo "BUILD_TARGET_WEB_BRIDGE: $BUILD_TARGET_WEB_BRIDGE"; + echo "BUILD_TEST_FRAMEWORK: $BUILD_TEST_FRAMEWORK"; + + + # Output folder for frameworks and xcframeworks + XCF_OUTPUT_FOLDER="sdk_distribution" + XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER="xcframeworks-dynamic" + XCF_OUTPUT_STATIC_XCFRMK_FOLDER="xcframeworks-static" + XCF_OUTPUT_DYNAMIC_FRMK_FOLDER="frameworks-dynamic" + XCF_OUTPUT_STATIC_FRMK_FOLDER="frameworks-static" + XCF_OUTPUT_STATIC_TEST_FRMK_FOLDER="test-static-framework" + + # SDK Schema names - Dynamic + SCHEMA_NAME__ADJUST_IOS="AdjustSdk" + SCHEMA_NAME__ADJUST_TV="AdjustSdkTv" + SCHEMA_NAME__ADJUST_IM="AdjustSdkIm" + SCHEMA_NAME__ADJUST_WEB_BRIDGE="AdjustSdkWebBridge" + + # SDK Schema names - Static + SCHEMA_NAME__ADJUST_IOS_STATIC="AdjustSdkStatic" + SCHEMA_NAME__ADJUST_TV_STATIC="AdjustSdkTvStatic" + SCHEMA_NAME__ADJUST_IM_STATIC="AdjustSdkImStatic" + SCHEMA_NAME__ADJUST_WEB_BRIDGE_STATIC="AdjustSdkWebBridgeStatic" + + # SDK frameworks and xcframework names + XCF_FRM_NAME__ADJUST_IOS="AdjustSdk" + XCF_FRM_NAME__ADJUST_TV="AdjustSdkTv" + XCF_FRM_NAME__ADJUST_IM="AdjustSdkIm" + XCF_FRM_NAME__ADJUST_WEB_BRIDGE="AdjustSdkWebBridge" + + # xcode archive names + ARCHIVE_NAME__IOS_DEVICE="AdjustSdk-Device" + ARCHIVE_NAME__IOS_SIMULATOR="AdjustSdk-Simulator" + ARCHIVE_NAME__TV_DEVICE="AdjustSdkTv-Device" + ARCHIVE_NAME__TV_SIMULATOR="AdjustSdkTv-Simulator" + ARCHIVE_NAME__IM_DEVICE="AdjustSdkIm-Device" + ARCHIVE_NAME__IM_SIMULATOR="AdjustSdkIm-Simulator" + ARCHIVE_NAME__WEB_DEVICE="AdjustSdkWebBridge-Device" + ARCHIVE_NAME__WEB_SIMULATOR="AdjustSdkWebBridge-Simulator" + + # XCFrameworks and Frameworks archive (ZIP) names + XCF_FRM_ZIP_NAME__IOS_TV_DYNAMIC="AdjustSdk-iOS-tvOS-Dynamic" + XCF_FRM_ZIP_NAME__IOS_TV_STATIC="AdjustSdk-iOS-tvOS-Static" + XCF_FRM_ZIP_NAME__IOS_DYNAMIC="AdjustSdk-iOS-Dynamic" + XCF_FRM_ZIP_NAME__IOS_STATIC="AdjustSdk-iOS-Static" + XCF_FRM_ZIP_NAME__TV_DYNAMIC="AdjustSdk-tvOS-Dynamic" + XCF_FRM_ZIP_NAME__TV_STATIC="AdjustSdk-tvOS-Static" + XCF_FRM_ZIP_NAME__IM_DYNAMIC="AdjustSdk-iMessage-Dynamic" + XCF_FRM_ZIP_NAME__IM_STATIC="AdjustSdk-iMessage-Static" + XCF_FRM_ZIP_NAME__WEB_BRIDGE_DYNAMIC="AdjustSdk-WebBridge-Dynamic" + XCF_FRM_ZIP_NAME__WEB_BRIDGE_STATIC="AdjustSdk-WebBridge-Static" + + # Xcode version impacts the way we build frameworks + XCODE12PLUS=0 + XCODE14PLUS=0 + product_version=$(xcodebuild -version) + xcode_version=( ${product_version//./ } ) + xcode="${xcode_version[0]}" + major="${xcode_version[1]}" + minor="${xcode_version[2]}" + echo "${xcode}.${major}.${minor}" + if [[ $major > 11 ]]; then + XCODE12PLUS=1 + fi + if [[ $major > 13 ]]; then + XCODE14PLUS=1 + fi + + SDK_VERSION=$(head -n 1 VERSION) + echo "$SDK_VERSION" + + # dynamic xcframework signing identity + SDK_CODE_SIGN_IDENTITY="Apple Distribution: adeven GmbH (QGUGW9AUMK)" + + # previous builds artefacts cleanup + rm -rf ${XCF_OUTPUT_FOLDER} + mkdir ${XCF_OUTPUT_FOLDER} + + # previous xcode build folder cleanup + xcodebuild clean + + function build_archive() { + # Prameters: + # 1 - scheme name + # 2 - sdk + # 3 - destination + # 4 - archive path + + local target_scheme="$1" + local target_sdk="$2" + local platform_destination="$3" + local output_path="$4" + + echo "XCFramework: Building $target_scheme - $target_sdk Archive..." + + xcodebuild clean archive \ + -scheme "$target_scheme" \ + -configuration Release \ + -sdk "$target_sdk" \ + -destination "$platform_destination" \ + -archivePath "$output_path" \ + SKIP_INSTALL=NO \ + BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ + GCC_GENERATE_DEBUGGING_SYMBOLS=YES + + } + + function generate_bcsymbols_command_parameter() { + # Prameters: + # 1 - Archive name + # 2 - Archive location folder + #echo "XCFramework: Generating BCSymbolMap paths command from $1 ..." + BCSYMBOLMAP_PATHS=" " + if [[ $XCODE14PLUS == 0 ]]; then + BCSYMBOLMAP_PATHS=("$(pwd -P)"/$2/$1.xcarchive/BCSymbolMaps/*) + BCSYMBOLMAP_COMMANDS="" + for path in "${BCSYMBOLMAP_PATHS[@]}"; do + BCSYMBOLMAP_COMMANDS="$BCSYMBOLMAP_COMMANDS -debug-symbols $path " + done + fi + echo $BCSYMBOLMAP_COMMANDS + } + + + function archive_framework() { + + local input_folder="$1" + local input_file="$2" + local output_file="$3" + + cd "$input_folder" + zip -r -X -y "$output_file" "$input_file" + cd - + } + + # Build, Lipo an Zip framework function + function build_static_fat_framework() { + # Prameters: + # 1 - Target scheme name + # 2 - Target OS ('ios', 'tvos') + # 3 - Resulting SDK Framework name + # 4 - SDK scheme build root folder + # 5 - Framework output folder + # 6 - Zip archive name + + local target_scheme="$1" + local os="$2" + local framework_name="$3" + local build_root_folder="$4" + local output_folder="$5" + local zip_file_name="$6" + + + echo "= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =" + echo "Target Scheme - $target_scheme" + echo "Target OS - $os" + echo "Resulting SDK Framework name - $framework_name" + echo "SDK scheme build root folder - $build_root_folder" + echo "Framework output folder - $output_folder" + echo "Zip file name - $zip_file_name" + echo "= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =" + + xcodebuild clean + + if [[ $os == "ios" ]]; then + + if [[ $XCODE14PLUS > 0 ]]; then + # Xcode14 dropped 32-bit support, so we have to drop 'i386' arc. + xcodebuild -configuration Release \ + -target "$target_scheme" \ + -sdk iphonesimulator \ + -arch x86_64 \ + build + else + xcodebuild -configuration Release \ + -target "$target_scheme" \ + -sdk iphonesimulator \ + -arch x86_64 -arch i386 \ + build + fi + + xcodebuild -configuration Release \ + -target "$target_scheme" \ + -sdk iphoneos \ + build + + ditto "./$build_root_folder/$target_scheme/iphoneos/$framework_name.framework" "./$build_root_folder/$target_scheme/universal/$framework_name.framework" + + xcrun lipo -create \ + "./$build_root_folder/$target_scheme/iphoneos/$framework_name.framework/Versions/A/$framework_name" \ + "./$build_root_folder/$target_scheme/iphonesimulator/$framework_name.framework/Versions/A/$framework_name" \ + -output "./$build_root_folder/$target_scheme/universal/$framework_name.framework/Versions/A/$framework_name" + + + + elif [[ $os == "tvos" ]]; then + + xcodebuild -configuration Release \ + -target "$target_scheme" \ + -sdk appletvsimulator \ + -arch x86_64 \ + build + + xcodebuild -configuration Release \ + -target "$target_scheme" \ + -sdk appletvos \ + build + + ditto "./$build_root_folder/$target_scheme/appletvos/$framework_name.framework" "./$build_root_folder/$target_scheme/universal/$framework_name.framework" + + xcrun lipo -create \ + "./$build_root_folder/$target_scheme/appletvos/$framework_name.framework/Versions/A/$framework_name" \ + "./$build_root_folder/$target_scheme/appletvsimulator/$framework_name.framework/Versions/A/$framework_name" \ + -output "./$build_root_folder/$target_scheme/universal/$framework_name.framework/Versions/A/$framework_name" + + else + + echo "ERROR: Unsupported OS type!" + return 1 + + fi + + cd "$build_root_folder/$target_scheme/universal" + zip -r -X -y "$zip_file_name" "$framework_name.framework" + cd - + mv "$build_root_folder/$target_scheme/universal/$zip_file_name" "$output_folder" + mv "$build_root_folder/$target_scheme/universal/$framework_name.framework" "$output_folder" + rm -rf "$build_root_folder/$target_scheme" + + } +else + # echo "The definitions script has been already executed. Skipping it..."; echo -e "${CYAN}[ADJUST][BUILD]:${YELLOW} The definitions script has been already executed. Skipping it... ${NC}" fi diff --git a/scripts/dynamic_frameworks.sh b/scripts/dynamic_frameworks.sh index d3c9532e0..5b84f1044 100755 --- a/scripts/dynamic_frameworks.sh +++ b/scripts/dynamic_frameworks.sh @@ -43,7 +43,7 @@ then mv "Carthage/Build/${XCF_FRM_ZIP_NAME__IOS_DYNAMIC}-"${SDK_VERSION}".framework.zip" "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_FRMK_FOLDER}" mv "Carthage/Build/${XCF_FRM_ZIP_NAME__IOS_DYNAMIC}" "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_FRMK_FOLDER}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Done! ${NC}" -else +else echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Skipping iOS SDK framework build ... ${NC}" fi @@ -72,7 +72,7 @@ then mv "Carthage/Build/${XCF_FRM_ZIP_NAME__TV_DYNAMIC}-"${SDK_VERSION}".framework.zip" "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_FRMK_FOLDER}" mv "Carthage/Build/${XCF_FRM_ZIP_NAME__TV_DYNAMIC}" "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_FRMK_FOLDER}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Done! ${NC}" -else +else echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Skipping tvOS SDK framework build ... ${NC}" fi @@ -102,7 +102,7 @@ then mv "Carthage/Build/${XCF_FRM_ZIP_NAME__IM_DYNAMIC}-"${SDK_VERSION}".framework.zip" "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_FRMK_FOLDER}" mv "Carthage/Build/${XCF_FRM_ZIP_NAME__IM_DYNAMIC}" "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_FRMK_FOLDER}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Done! ${NC}" -else +else echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Skipping iMessage SDK framework build ... ${NC}" fi @@ -132,7 +132,7 @@ then mv "Carthage/Build/${XCF_FRM_ZIP_NAME__WEB_BRIDGE_DYNAMIC}-"${SDK_VERSION}".framework.zip" "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_FRMK_FOLDER}" mv "Carthage/Build/${XCF_FRM_ZIP_NAME__WEB_BRIDGE_DYNAMIC}" "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_FRMK_FOLDER}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Done! ${NC}" -else +else echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Skipping WebBridge SDK framework build ... ${NC}" fi diff --git a/scripts/dynamic_xcframeworks.sh b/scripts/dynamic_xcframeworks.sh index 37659ed5d..be5a08781 100755 --- a/scripts/dynamic_xcframeworks.sh +++ b/scripts/dynamic_xcframeworks.sh @@ -7,11 +7,11 @@ echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Dynamic XCFrameworks build - START... $ # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = if [[ $BUILD_TARGET_IOS -eq 1 ]] || [[ $BUILD_TARGET_TVOS -eq 1 ]] -then +then TRAGET_PLATFORM_DESCRIPTION="" if [[ $BUILD_TARGET_IOS -eq 1 ]] && [[ $BUILD_TARGET_TVOS -eq 1 ]] - then + then TRAGET_PLATFORM_DESCRIPTION="iOS and tvOS" elif [[ $BUILD_TARGET_IOS -eq 1 ]] then @@ -44,7 +44,7 @@ then echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" if [[ $BUILD_TARGET_IOS -eq 1 ]] && [[ $BUILD_TARGET_TVOS -eq 1 ]] - then + then if [[ $XCODE12PLUS > 0 ]]; then xcodebuild -create-xcframework \ -framework "./${XCF_OUTPUT_FOLDER}/${ARCHIVE_NAME__IOS_DEVICE}.xcarchive/Products/Library/Frameworks/${XCF_FRM_NAME__ADJUST_IOS}.framework" \ @@ -114,18 +114,21 @@ then fi echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" - echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Archiving (ZIP) Dynamic XCFramework for ${TRAGET_PLATFORM_DESCRIPTION} ...${NC}" + echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Signing and Archiving (ZIP) Dynamic XCFramework for ${TRAGET_PLATFORM_DESCRIPTION} ...${NC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" # VERIFY if [[ $BUILD_TARGET_IOS -eq 1 ]] && [[ $BUILD_TARGET_TVOS -eq 1 ]] then + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_IOS}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_IOS}.xcframework" "${XCF_FRM_ZIP_NAME__IOS_TV_DYNAMIC}-"${SDK_VERSION}".xcframework.zip" elif [[ $BUILD_TARGET_IOS -eq 1 ]] then + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_IOS}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_IOS}.xcframework" "${XCF_FRM_ZIP_NAME__IOS_DYNAMIC}-"${SDK_VERSION}".xcframework.zip" else + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_TV}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_TV}.xcframework" "${XCF_FRM_ZIP_NAME__TV_DYNAMIC}-"${SDK_VERSION}".xcframework.zip" fi @@ -168,8 +171,9 @@ then rm -rf "./${XCF_OUTPUT_FOLDER}/${ARCHIVE_NAME__IM_SIMULATOR}.xcarchive" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" - echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Archiving (ZIP) Dynamic XCFramework for iOS (iMessage) ...${NC}" + echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Signing and Archiving (ZIP) Dynamic XCFramework for iOS (iMessage) ...${NC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_IM}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_IM}.xcframework" "${XCF_FRM_ZIP_NAME__IM_DYNAMIC}-"${SDK_VERSION}".xcframework.zip" fi @@ -214,8 +218,9 @@ then rm -rf "./${XCF_OUTPUT_FOLDER}/${ARCHIVE_NAME__WEB_SIMULATOR}.xcarchive" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" - echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Archiving (ZIP) Dynamic XCFramework for iOS (WebBridge) ...${NC}" + echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Signing and Archiving (ZIP) Dynamic XCFramework for iOS (WebBridge) ...${NC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_WEB_BRIDGE}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_DYNAMIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_WEB_BRIDGE}.xcframework" "${XCF_FRM_ZIP_NAME__WEB_BRIDGE_DYNAMIC}-"${SDK_VERSION}".xcframework.zip" fi diff --git a/scripts/static_xcframeworks.sh b/scripts/static_xcframeworks.sh index 7ea3ae4cd..28ca6f11b 100755 --- a/scripts/static_xcframeworks.sh +++ b/scripts/static_xcframeworks.sh @@ -5,11 +5,11 @@ source ./scripts/build_definitions.sh -xs echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} Static XCFrameworks build - START... ${NC}" if [[ $BUILD_TARGET_IOS -eq 1 ]] || [[ $BUILD_TARGET_TVOS -eq 1 ]] -then +then TRAGET_PLATFORM_DESCRIPTION="" if [[ $BUILD_TARGET_IOS -eq 1 ]] && [[ $BUILD_TARGET_TVOS -eq 1 ]] - then + then TRAGET_PLATFORM_DESCRIPTION="iOS and tvOS" elif [[ $BUILD_TARGET_IOS -eq 1 ]] then @@ -25,8 +25,8 @@ then xcodebuild clean - if [[ $BUILD_TARGET_IOS -eq 1 ]] - then + if [[ $BUILD_TARGET_IOS -eq 1 ]] + then xcodebuild -configuration Release \ -target "${SCHEMA_NAME__ADJUST_IOS_STATIC}" \ -sdk iphonesimulator \ @@ -40,7 +40,7 @@ then if [[ $BUILD_TARGET_TVOS -eq 1 ]] - then + then xcodebuild -configuration Release \ -target "${SCHEMA_NAME__ADJUST_TV_STATIC}" \ -sdk appletvsimulator \ @@ -58,7 +58,7 @@ then echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" if [[ $BUILD_TARGET_IOS -eq 1 ]] && [[ $BUILD_TARGET_TVOS -eq 1 ]] - then + then xcodebuild -create-xcframework \ -framework "./${XCF_OUTPUT_FOLDER}/${SCHEMA_NAME__ADJUST_IOS_STATIC}/iphoneos/${XCF_FRM_NAME__ADJUST_IOS}.framework" \ -framework "./${XCF_OUTPUT_FOLDER}/${SCHEMA_NAME__ADJUST_IOS_STATIC}/iphonesimulator/${XCF_FRM_NAME__ADJUST_IOS}.framework" \ @@ -90,16 +90,19 @@ then fi echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" - echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Archiving (ZIP) Static XCFramework for ${TRAGET_PLATFORM_DESCRIPTION} ...${NC}" + echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Signing and Archiving (ZIP) Static XCFramework for ${TRAGET_PLATFORM_DESCRIPTION} ...${NC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" if [[ $BUILD_TARGET_IOS -eq 1 ]] && [[ $BUILD_TARGET_TVOS -eq 1 ]] then + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_IOS}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_IOS}.xcframework" "${XCF_FRM_ZIP_NAME__IOS_TV_STATIC}-"${SDK_VERSION}".xcframework.zip" elif [[ $BUILD_TARGET_IOS -eq 1 ]] then + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_IOS}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_IOS}.xcframework" "${XCF_FRM_ZIP_NAME__IOS_STATIC}-"${SDK_VERSION}".xcframework.zip" else + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_TV}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_TV}.xcframework" "${XCF_FRM_ZIP_NAME__TV_STATIC}-"${SDK_VERSION}".xcframework.zip" fi fi @@ -107,7 +110,7 @@ fi # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = if [[ $BUILD_TARGET_IM -eq 1 ]] -then +then echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Buiding Static XCFramework for iOS (iMessage)...${NC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" @@ -133,8 +136,9 @@ then rm -rf "./${XCF_OUTPUT_FOLDER}/${SCHEMA_NAME__ADJUST_IM_STATIC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" - echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Archiving (ZIP) Static XCFramework for iOS (iMessage)...${NC}" + echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Signing and Archiving (ZIP) Static XCFramework for iOS (iMessage)...${NC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_IM}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_IM}.xcframework" "${XCF_FRM_ZIP_NAME__IM_STATIC}-"${SDK_VERSION}".xcframework.zip" fi @@ -168,8 +172,9 @@ then rm -rf "./${XCF_OUTPUT_FOLDER}/${SCHEMA_NAME__ADJUST_WEB_BRIDGE_STATIC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" - echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Archiving (ZIP) Static XCFramework for iOS (WebBridge)...${NC}" + echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} XCFramework: Signing and Archiving (ZIP) Static XCFramework for iOS (WebBridge)...${NC}" echo -e "${CYAN}[ADJUST][BUILD]:${GREEN} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =${NC}" + codesign -s "$SDK_CODE_SIGN_IDENTITY" -f --timestamp "./${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}/${XCF_FRM_NAME__ADJUST_WEB_BRIDGE}.xcframework" archive_framework "${XCF_OUTPUT_FOLDER}/${XCF_OUTPUT_STATIC_XCFRMK_FOLDER}" "${XCF_FRM_NAME__ADJUST_WEB_BRIDGE}.xcframework" "${XCF_FRM_ZIP_NAME__WEB_BRIDGE_STATIC}-"${SDK_VERSION}".xcframework.zip" fi