Skip to content

Commit

Permalink
Merge pull request #563 from adjust/v4296
Browse files Browse the repository at this point in the history
Version 4.29.6
  • Loading branch information
uerceg authored Sep 13, 2021
2 parents 340a26c + 6111449 commit 43c5bb5
Show file tree
Hide file tree
Showing 25 changed files with 125 additions and 48 deletions.
4 changes: 2 additions & 2 deletions Adjust.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = "Adjust"
s.version = "4.29.5"
s.version = "4.29.6"
s.summary = "This is the iOS SDK of adjust. You can read more about it at http://adjust.com."
s.homepage = "https://github.com/adjust/ios_sdk"
s.license = { :type => 'MIT', :file => 'MIT-LICENSE' }
s.author = { "Christian Wellenbrock" => "[email protected]" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.29.5" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.29.6" }
s.ios.deployment_target = '6.0'
s.tvos.deployment_target = '9.0'
s.framework = 'SystemConfiguration'
Expand Down
54 changes: 42 additions & 12 deletions Adjust/ADJPackageBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ - (NSMutableDictionary *)getSessionParameters:(BOOL)isInDelay {
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"];
[self addIdfaIfPossibleToParameters:parameters];
Expand Down Expand Up @@ -418,6 +417,8 @@ - (NSMutableDictionary *)getSessionParameters:(BOOL)isInDelay {
[ADJPackageBuilder parameters:parameters setDictionary:[self.sessionParameters.partnerParameters copy] forKey:@"partner_params"];
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -435,7 +436,6 @@ - (NSMutableDictionary *)getEventParameters:(BOOL)isInDelay forEventPackage:(ADJ
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:event.callbackId forKey:@"event_callback_id"];
[ADJPackageBuilder parameters:parameters setString:event.eventToken forKey:@"event_token"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
Expand Down Expand Up @@ -502,6 +502,8 @@ - (NSMutableDictionary *)getEventParameters:(BOOL)isInDelay forEventPackage:(ADJ
[ADJPackageBuilder parameters:parameters setString:event.transactionId forKey:@"transaction_id"];
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -523,7 +525,6 @@ - (NSMutableDictionary *)getInfoParameters:(NSString *)source {
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"];
[self addIdfaIfPossibleToParameters:parameters];
Expand Down Expand Up @@ -576,6 +577,8 @@ - (NSMutableDictionary *)getInfoParameters:(NSString *)source {
[ADJPackageBuilder parameters:parameters setString:self.attribution.trackerName forKey:@"tracker"];
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -593,7 +596,6 @@ - (NSMutableDictionary *)getAdRevenueParameters:(NSString *)source payload:(NSDa
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"];
[self addIdfaIfPossibleToParameters:parameters];
Expand Down Expand Up @@ -637,6 +639,8 @@ - (NSMutableDictionary *)getAdRevenueParameters:(NSString *)source payload:(NSDa
}
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -654,7 +658,6 @@ - (NSMutableDictionary *)getAdRevenueParameters:(ADJAdRevenue *)adRevenue isInDe
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"];
[self addIdfaIfPossibleToParameters:parameters];
Expand Down Expand Up @@ -716,6 +719,8 @@ - (NSMutableDictionary *)getAdRevenueParameters:(ADJAdRevenue *)adRevenue isInDe
}
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -737,7 +742,6 @@ - (NSMutableDictionary *)getClickParameters:(NSString *)source {
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"];
[self addIdfaIfPossibleToParameters:parameters];
Expand Down Expand Up @@ -790,6 +794,8 @@ - (NSMutableDictionary *)getClickParameters:(NSString *)source {
[ADJPackageBuilder parameters:parameters setString:self.attribution.trackerName forKey:@"tracker"];
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -806,7 +812,6 @@ - (NSMutableDictionary *)getAttributionParameters:(NSString *)initiatedBy {
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[self addIdfaIfPossibleToParameters:parameters];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.idfv forKey:@"idfv"];
Expand Down Expand Up @@ -842,6 +847,8 @@ - (NSMutableDictionary *)getAttributionParameters:(NSString *)initiatedBy {
}
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -858,7 +865,6 @@ - (NSMutableDictionary *)getGdprParameters {
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[self addIdfaIfPossibleToParameters:parameters];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.idfv forKey:@"idfv"];
Expand Down Expand Up @@ -893,6 +899,8 @@ - (NSMutableDictionary *)getGdprParameters {
}
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -914,7 +922,6 @@ - (NSMutableDictionary *)getDisableThirdPartySharingParameters {
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"];
[self addIdfaIfPossibleToParameters:parameters];
Expand Down Expand Up @@ -959,6 +966,8 @@ - (NSMutableDictionary *)getDisableThirdPartySharingParameters {
}
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -980,7 +989,6 @@ - (NSMutableDictionary *)getThirdPartySharingParameters:(nonnull ADJThirdPartySh
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"];
[self addIdfaIfPossibleToParameters:parameters];
Expand Down Expand Up @@ -1031,6 +1039,8 @@ - (NSMutableDictionary *)getThirdPartySharingParameters:(nonnull ADJThirdPartySh
}
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -1052,7 +1062,6 @@ - (NSMutableDictionary *)getMeasurementConsentParameters:(BOOL)enabled {
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"];
[self addIdfaIfPossibleToParameters:parameters];
Expand Down Expand Up @@ -1100,6 +1109,8 @@ - (NSMutableDictionary *)getMeasurementConsentParameters:(BOOL)enabled {
}
}

[self injectFeatureFlagsWithParameters:parameters];

return parameters;
}
- (NSMutableDictionary *)getSubscriptionParameters:(BOOL)isInDelay forSubscriptionPackage:(ADJSubscription *)subscription {
Expand All @@ -1115,7 +1126,6 @@ - (NSMutableDictionary *)getSubscriptionParameters:(BOOL)isInDelay forSubscripti
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceName forKey:@"device_name"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.deviceType forKey:@"device_type"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.environment forKey:@"environment"];
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled forKey:@"event_buffering_enabled"];
[ADJPackageBuilder parameters:parameters setString:self.adjustConfig.externalDeviceId forKey:@"external_device_id"];
[ADJPackageBuilder parameters:parameters setString:self.packageParams.fbAnonymousId forKey:@"fb_anon_id"];
[self addIdfaIfPossibleToParameters:parameters];
Expand Down Expand Up @@ -1176,6 +1186,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 injectFeatureFlagsWithParameters:parameters];

return parameters;
}

Expand All @@ -1196,6 +1208,24 @@ - (void)addIdfaIfPossibleToParameters:(NSMutableDictionary *)parameters {
[ADJPackageBuilder parameters:parameters setString:idfa forKey:@"idfa"];
}

- (void)injectFeatureFlagsWithParameters:(NSMutableDictionary *)parameters {
[ADJPackageBuilder parameters:parameters setBool:self.adjustConfig.eventBufferingEnabled
forKey:@"event_buffering_enabled"];

if (self.adjustConfig.isSKAdNetworkHandlingActive == NO) {
[ADJPackageBuilder parameters:parameters setBool:YES forKey:@"ff_skadn_disabled"];
}
if (self.adjustConfig.allowIdfaReading == NO) {
[ADJPackageBuilder parameters:parameters setBool:YES forKey:@"ff_idfa_disabled"];
}
if (self.adjustConfig.allowiAdInfoReading == NO) {
[ADJPackageBuilder parameters:parameters setBool:YES forKey:@"ff_iad_disabled"];
}
if (self.adjustConfig.allowAdServicesInfoReading == NO) {
[ADJPackageBuilder parameters:parameters setBool:YES forKey:@"ff_adserv_disabled"];
}
}

- (ADJActivityPackage *)defaultActivityPackage {
ADJActivityPackage *activityPackage = [[ADJActivityPackage alloc] init];
activityPackage.clientSdk = self.packageParams.clientSdk;
Expand Down
2 changes: 1 addition & 1 deletion Adjust/ADJRequestHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ - (void)sendRequest:(NSMutableURLRequest *)request

{
if (authorizationHeader != nil) {
[ADJAdjustFactory.logger debug:@"Authorzation header content: %@", authorizationHeader];
[ADJAdjustFactory.logger debug:@"Authorization header content: %@", authorizationHeader];
[request setValue:authorizationHeader forHTTPHeaderField:@"Authorization"];
}
if (self.userAgent != nil) {
Expand Down
2 changes: 1 addition & 1 deletion Adjust/ADJUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
static NSRegularExpression *shortUniversalLinkRegex = nil;
static NSRegularExpression *excludedDeeplinkRegex = nil;

static NSString * const kClientSdk = @"ios4.29.5";
static NSString * const kClientSdk = @"ios4.29.6";
static NSString * const kDeeplinkParam = @"deep_link=";
static NSString * const kSchemeDelimiter = @"://";
static NSString * const kDefaultScheme = @"AdjustUniversalScheme";
Expand Down
3 changes: 2 additions & 1 deletion Adjust/Adjust.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Adjust.h
// Adjust SDK
//
// V4.29.5
// V4.29.6
// Created by Christian Wellenbrock (@wellle) on 23rd July 2013.
// Copyright (c) 2012-2021 Adjust GmbH. All rights reserved.
//
Expand Down Expand Up @@ -48,6 +48,7 @@ extern NSString * __nonnull const ADJAdRevenueSourceAppLovinMAX;
extern NSString * __nonnull const ADJAdRevenueSourceMopub;
extern NSString * __nonnull const ADJAdRevenueSourceAdMob;
extern NSString * __nonnull const ADJAdRevenueSourceIronSource;
extern NSString * __nonnull const ADJAdRevenueSourceAdMost;

/**
* Constants for country app's URL strategies.
Expand Down
1 change: 1 addition & 0 deletions Adjust/Adjust.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
NSString * const ADJAdRevenueSourceMopub = @"mopub";
NSString * const ADJAdRevenueSourceAdMob = @"admob_sdk";
NSString * const ADJAdRevenueSourceIronSource = @"ironsource_sdk";
NSString * const ADJAdRevenueSourceAdMost = @"admost_sdk";

NSString * const ADJUrlStrategyIndia = @"UrlStrategyIndia";
NSString * const ADJUrlStrategyChina = @"UrlStrategyChina";
Expand Down
6 changes: 6 additions & 0 deletions AdjustBridge/AdjustBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView
NSNumber *allowiAdInfoReading = [data objectForKey:@"allowiAdInfoReading"];
NSNumber *allowAdServicesInfoReading = [data objectForKey:@"allowAdServicesInfoReading"];
NSNumber *allowIdfaReading = [data objectForKey:@"allowIdfaReading"];
NSNumber *allowSkAdNetworkHandling = [data objectForKey:@"allowSkAdNetworkHandling"];
NSNumber *secretId = [data objectForKey:@"secretId"];
NSString *info1 = [data objectForKey:@"info1"];
NSString *info2 = [data objectForKey:@"info2"];
Expand Down Expand Up @@ -262,6 +263,11 @@ - (void)loadWKWebViewBridge:(WKWebView *)wkWebView
if ([self isFieldValid:allowIdfaReading]) {
[adjustConfig setAllowIdfaReading:[allowIdfaReading boolValue]];
}
if ([self isFieldValid:allowSkAdNetworkHandling]) {
if ([allowSkAdNetworkHandling boolValue] == NO) {
[adjustConfig deactivateSKAdNetworkHandling];
}
}
BOOL isAppSecretDefined = [self isFieldValid:secretId]
&& [self isFieldValid:info1]
&& [self isFieldValid:info2]
Expand Down
6 changes: 5 additions & 1 deletion AdjustBridge/AdjustBridgeRegister.m
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ + (NSString *)adjust_js {
if (this.sdkPrefix) {
return this.sdkPrefix;
} else {
return 'web-bridge4.29.5';
return 'web-bridge4.29.6';
}
},
setTestOptions: function(testOptions) {
Expand Down Expand Up @@ -331,6 +331,7 @@ + (NSString *)adjust_js {
this.allowiAdInfoReading = null;
this.allowAdServicesInfoReading = null;
this.allowIdfaReading = null;
this.allowSkAdNetworkHandling = null;
this.secretId = null;
this.info1 = null;
this.info2 = null;
Expand Down Expand Up @@ -424,6 +425,9 @@ + (NSString *)adjust_js {
AdjustConfig.prototype.setAllowIdfaReading = function(allowIdfaReading) {
this.allowIdfaReading = allowIdfaReading;
};
AdjustConfig.prototype.deactivateSkAdNetworkHandling = function() {
this.allowSkAdNetworkHandling = false;
};
AdjustConfig.prototype.setAppSecret = function(secretId, info1, info2, info3, info4) {
this.secretId = secretId;
this.info1 = info1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,13 @@ - (void)config:(NSDictionary *)parameters {
NSString *allowAdServicesInfoReadingS = [parameters objectForKey:@"allowAdServicesInfoReading"][0];
[adjustConfig setAllowAdServicesInfoReading:[allowAdServicesInfoReadingS boolValue]];
}

if ([parameters objectForKey:@"allowSkAdNetworkHandling"]) {
NSString *allowSkAdNetworkHandlingS = [parameters objectForKey:@"allowSkAdNetworkHandling"][0];
if ([allowSkAdNetworkHandlingS boolValue] == NO) {
[adjustConfig deactivateSKAdNetworkHandling];
}
}

if ([parameters objectForKey:@"userAgent"]) {
NSString *userAgent = [parameters objectForKey:@"userAgent"][0];
Expand Down
Loading

0 comments on commit 43c5bb5

Please sign in to comment.