Skip to content

Commit

Permalink
Merge pull request #747 from adjust/v502
Browse files Browse the repository at this point in the history
Version 5.0.2
  • Loading branch information
uerceg authored Jan 10, 2025
2 parents 5a48793 + 9431332 commit 96e1b62
Show file tree
Hide file tree
Showing 17 changed files with 599 additions and 320 deletions.
6 changes: 3 additions & 3 deletions Adjust.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Adjust"
s.module_name = "AdjustSdk"
s.version = "5.0.1"
s.version = "5.0.2"
s.summary = "This is the iOS SDK of Adjust. You can read more about it at https://adjust.com."
s.homepage = "https://github.com/adjust/ios_sdk"
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand All @@ -20,7 +20,7 @@ Pod::Spec.new do |s|
adj.exclude_files = 'Adjust/include/**/*.h'
adj.resource_bundle = {'Adjust' => ['Adjust/*.xcprivacy']}
adj.header_dir = 'AdjustSdk'
adj.dependency 'AdjustSignature', '~> 3.18'
adj.dependency 'AdjustSignature', '3.35.2'
end

s.subspec 'AdjustWebBridge' do |awb|
Expand All @@ -30,6 +30,6 @@ Pod::Spec.new do |s|
awb.resource_bundle = {'Adjust' => ['Adjust/*.xcprivacy']}
awb.header_dir = 'AdjustSdk'
awb.ios.deployment_target = '12.0'
awb.dependency 'AdjustSignature', '~> 3.18'
awb.dependency 'AdjustSignature', '3.35.2'
end
end
2 changes: 1 addition & 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
//
// V5.0.1
// V5.0.2
// Created by Christian Wellenbrock (@wellle) on 23rd July 2013.
// Copyright (c) 2012-Present Adjust GmbH. All rights reserved.
//
Expand Down
50 changes: 20 additions & 30 deletions Adjust/Adjust.m
Original file line number Diff line number Diff line change
Expand Up @@ -367,19 +367,15 @@ - (void)trackSubsessionEnd {
- (void)enable {
self.savedPreLaunch.enabled = @YES;

if ([self checkActivityHandler:YES
trueMessage:@"enabled mode"
falseMessage:@"disabled mode"]) {
if ([self checkActivityHandler:@"enable SDK"]) {
[self.activityHandler setEnabled:YES];
}
}

- (void)disable {
self.savedPreLaunch.enabled = @NO;

if ([self checkActivityHandler:NO
trueMessage:@"enabled mode"
falseMessage:@"disabled mode"]) {
if ([self checkActivityHandler:@"disable SDK"]) {
[self.activityHandler setEnabled:NO];
}
}
Expand All @@ -400,7 +396,7 @@ - (void)isEnabledWithCompletionHandler:(nonnull ADJIsEnabledGetterBlock)completi
- (void)processDeeplink:(ADJDeeplink *)deeplink {
[ADJUserDefaults cacheDeeplinkUrl:deeplink.deeplink];
NSDate *clickTime = [NSDate date];
if (![self checkActivityHandler]) {
if (![self checkActivityHandler:@"process deep link"]) {
[ADJUserDefaults saveDeeplinkUrl:deeplink.deeplink
clickTime:clickTime];
return;
Expand All @@ -418,7 +414,7 @@ - (void)processAndResolveDeeplink:(nonnull ADJDeeplink *)deeplink
// if deep link processing is triggered prior to SDK being initialized
[ADJUserDefaults cacheDeeplinkUrl:deeplink.deeplink];
NSDate *clickTime = [NSDate date];
if (![self checkActivityHandler]) {
if (![self checkActivityHandler:@"process and resolve deep link"]) {
[ADJUserDefaults saveDeeplinkUrl:deeplink.deeplink
clickTime:clickTime];
self.cachedResolvedDeeplinkBlock = completion;
Expand Down Expand Up @@ -447,19 +443,15 @@ - (void)setPushTokenAsString:(NSString *)pushToken {
}

- (void)switchToOfflineMode {
if (![self checkActivityHandler:YES
trueMessage:@"offline mode"
falseMessage:@"online mode"]) {
if (![self checkActivityHandler:@"switch to offline mode"]) {
self.savedPreLaunch.offline = YES;
} else {
[self.activityHandler setOfflineMode:YES];
}
}

- (void)switchBackToOnlineMode {
if (![self checkActivityHandler:NO
trueMessage:@"offline mode"
falseMessage:@"online mode"]) {
if (![self checkActivityHandler:@"switch back to online mode"]) {
self.savedPreLaunch.offline = NO;
} else {
[self.activityHandler setOfflineMode:NO];
Expand Down Expand Up @@ -587,7 +579,7 @@ - (void)gdprForgetMe {
}

- (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing {
if (![self checkActivityHandler]) {
if (![self checkActivityHandler:@"track third party sharing"]) {
if (self.savedPreLaunch.preLaunchAdjustThirdPartySharingArray == nil) {
self.savedPreLaunch.preLaunchAdjustThirdPartySharingArray =
[[NSMutableArray alloc] init];
Expand All @@ -599,7 +591,7 @@ - (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing
}

- (void)trackMeasurementConsent:(BOOL)enabled {
if (![self checkActivityHandler]) {
if (![self checkActivityHandler:@"track measurement consent"]) {
self.savedPreLaunch.lastMeasurementConsentTracked = [NSNumber numberWithBool:enabled];
return;
}
Expand Down Expand Up @@ -633,10 +625,18 @@ - (void)updateSkanConversionValue:(NSInteger)conversionValue
coarseValue:(nullable NSString *)coarseValue
lockWindow:(nullable NSNumber *)lockWindow
withCompletionHandler:(void (^_Nullable)(NSError *_Nullable error))completion {
[[ADJSKAdNetwork getInstance] updateConversionValue:conversionValue
[[ADJSKAdNetwork getInstance] updateConversionValue:[NSNumber numberWithInteger:conversionValue]
coarseValue:coarseValue
lockWindow:lockWindow
withCompletionHandler:completion];
source:ADJSkanSourceClient
withCompletionHandler:^(NSDictionary * _Nonnull result) {
if ([self checkActivityHandler]) {
[self.activityHandler invokeClientSkanUpdateCallbackWithResult:result];
}
if (completion != nil) {
completion([result objectForKey:ADJSkanClientCompletionErrorKey]);
}
}];
}

- (void)trackAdRevenue:(ADJAdRevenue *)adRevenue {
Expand All @@ -652,7 +652,7 @@ - (void)attributionWithCompletionHandler:(nonnull ADJAttributionGetterBlock)comp
return;
}

if (![self checkActivityHandler]) {
if (![self checkActivityHandler:@"read attribution request"]) {
if (self.savedPreLaunch.cachedAttributionReadCallbacksArray == nil) {
self.savedPreLaunch.cachedAttributionReadCallbacksArray = [NSMutableArray array];
}
Expand All @@ -669,7 +669,7 @@ - (void)adidWithCompletionHandler:(nonnull ADJAdidGetterBlock)completion {
return;
}

if (![self checkActivityHandler]) {
if (![self checkActivityHandler:@"read adid request"]) {
if (self.savedPreLaunch.cachedAdidReadCallbacksArray == nil) {
self.savedPreLaunch.cachedAdidReadCallbacksArray = [NSMutableArray array];
}
Expand Down Expand Up @@ -789,16 +789,6 @@ - (BOOL)checkActivityHandler {
return [self checkActivityHandler:nil];
}

- (BOOL)checkActivityHandler:(BOOL)status
trueMessage:(NSString *)trueMessage
falseMessage:(NSString *)falseMessage {
if (status) {
return [self checkActivityHandler:trueMessage];
} else {
return [self checkActivityHandler:falseMessage];
}
}

- (BOOL)checkActivityHandler:(NSString *)savedForLaunchWarningSuffixMessage {
if (self.activityHandler == nil) {
if (savedForLaunchWarningSuffixMessage != nil) {
Expand Down
1 change: 1 addition & 0 deletions Adjust/Internal/ADJActivityHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
- (void)adidWithCompletionHandler:(nonnull ADJAdidGetterBlock)completion;
- (void)verifyAndTrackAppStorePurchase:(nonnull ADJEvent *)event
withCompletionHandler:(nonnull ADJVerificationResultBlock)completion;
- (void)invokeClientSkanUpdateCallbackWithResult:(NSDictionary * _Nonnull)result;

- (ADJPackageParams * _Nullable)packageParams;
- (ADJActivityState * _Nullable)activityState;
Expand Down
Loading

0 comments on commit 96e1b62

Please sign in to comment.