Skip to content

Commit 6ae0388

Browse files
authored
Merge pull request #653 from adjust/v4334
Version 4.33.4
2 parents 85f1ac8 + 7adafae commit 6ae0388

File tree

96 files changed

+99
-8300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+99
-8300
lines changed

Adjust.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Pod::Spec.new do |s|
22
s.name = "Adjust"
3-
s.version = "4.33.3"
3+
s.version = "4.33.4"
44
s.summary = "This is the iOS SDK of adjust. You can read more about it at http://adjust.com."
55
s.homepage = "https://github.com/adjust/ios_sdk"
66
s.license = { :type => 'MIT', :file => 'MIT-LICENSE' }
7-
s.author = { "Adjust GmbH" => "[email protected]" }
8-
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.33.3" }
7+
s.author = { "Adjust" => "[email protected]" }
8+
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.33.4" }
99
s.ios.deployment_target = '9.0'
1010
s.tvos.deployment_target = '9.0'
1111
s.framework = 'SystemConfiguration'
12-
s.ios.weak_framework = 'AdSupport', 'iAd'
12+
s.ios.weak_framework = 'AdSupport'
1313
s.tvos.weak_framework = 'AdSupport'
1414
s.requires_arc = true
1515
s.default_subspec = 'Core'

Adjust.xcodeproj/project.pbxproj

Lines changed: 1 addition & 222 deletions
Large diffs are not rendered by default.

Adjust.xcodeproj/xcshareddata/xcschemes/AdjustSdk.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1250"
3+
LastUpgradeVersion = "1420"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Adjust.xcodeproj/xcshareddata/xcschemes/AdjustSdkIm.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1250"
3+
LastUpgradeVersion = "1420"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Adjust.xcodeproj/xcshareddata/xcschemes/AdjustSdkTv.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1250"
3+
LastUpgradeVersion = "1420"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Adjust.xcodeproj/xcshareddata/xcschemes/AdjustSdkWebBridge.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1250"
3+
LastUpgradeVersion = "1420"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Adjust/ADJActivityHandler.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@
8787

8888
- (BOOL)updateAttributionI:(id<ADJActivityHandler> _Nullable)selfI
8989
attribution:(ADJAttribution * _Nullable)attribution;
90-
- (void)setAttributionDetails:(NSDictionary * _Nullable)attributionDetails
91-
error:(NSError * _Nullable)error;
9290
- (void)setAdServicesAttributionToken:(NSString * _Nullable)token
9391
error:(NSError * _Nullable)error;
9492

@@ -157,5 +155,4 @@
157155

158156
@end
159157

160-
extern NSString * _Nullable const ADJiAdPackageKey;
161158
extern NSString * _Nullable const ADJAdServicesPackageKey;

Adjust/ADJActivityHandler.m

Lines changed: 0 additions & 189 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#import "ADJUrlStrategy.h"
2525
#import "ADJSKAdNetwork.h"
2626

27-
NSString * const ADJiAdPackageKey = @"iad3";
2827
NSString * const ADJAdServicesPackageKey = @"apple_ads";
2928

3029
typedef void (^activityHandlerBlockI)(ADJActivityHandler * activityHandler);
@@ -44,7 +43,6 @@
4443
static NSTimeInterval kBackgroundTimerInterval;
4544
static double kSessionInterval;
4645
static double kSubSessionInterval;
47-
static const int kiAdRetriesCount = 3;
4846
static const int kAdServicesdRetriesCount = 1;
4947

5048
@implementation ADJInternalState
@@ -86,7 +84,6 @@ @interface ADJActivityHandler()
8684
@property (nonatomic, strong) ADJActivityState *activityState;
8785
@property (nonatomic, strong) ADJTimerCycle *foregroundTimer;
8886
@property (nonatomic, strong) ADJTimerOnce *backgroundTimer;
89-
@property (nonatomic, assign) NSInteger iAdRetriesLeft;
9087
@property (nonatomic, assign) NSInteger adServicesRetriesLeft;
9188
@property (nonatomic, strong) ADJInternalState *internalState;
9289
@property (nonatomic, strong) ADJPackageParams *packageParams;
@@ -108,19 +105,6 @@ - (void)prepareDeeplinkI:(ADJActivityHandler *_Nullable)selfI
108105

109106
@end
110107

111-
// copy from ADClientError
112-
typedef NS_ENUM(NSInteger, AdjADClientError) {
113-
AdjADClientErrorUnknown = 0,
114-
AdjADClientErrorTrackingRestrictedOrDenied = 1,
115-
AdjADClientErrorMissingData = 2,
116-
AdjADClientErrorCorruptResponse = 3,
117-
AdjADClientErrorRequestClientError = 4,
118-
AdjADClientErrorRequestServerError = 5,
119-
AdjADClientErrorRequestNetworkError = 6,
120-
AdjADClientErrorUnsupportedPlatform = 7,
121-
AdjCustomErrorTimeout = 100,
122-
};
123-
124108
#pragma mark -
125109
@implementation ADJActivityHandler
126110

@@ -147,9 +131,6 @@ - (id)initWithConfig:(ADJConfig *)adjustConfig
147131
if (adjustConfig.allowIdfaReading == NO) {
148132
[ADJAdjustFactory.logger warn:@"IDFA reading has been switched off"];
149133
}
150-
if (adjustConfig.allowiAdInfoReading == NO) {
151-
[ADJAdjustFactory.logger warn:@"iAd info reading has been switched off"];
152-
}
153134
if (adjustConfig.allowAdServicesInfoReading == NO) {
154135
[ADJAdjustFactory.logger warn:@"AdServices info reading has been switched off"];
155136
}
@@ -217,7 +198,6 @@ - (id)initWithConfig:(ADJConfig *)adjustConfig
217198
// does not have the session response by default
218199
self.internalState.sessionResponseProcessed = NO;
219200

220-
self.iAdRetriesLeft = kiAdRetriesCount;
221201
self.adServicesRetriesLeft = kAdServicesdRetriesCount;
222202

223203
self.trackingStatusManager = [[ADJTrackingStatusManager alloc] initWithActivityHandler:self];
@@ -438,154 +418,6 @@ - (void)setAdServicesAttributionToken:(NSString *)token
438418
}
439419
}
440420

441-
- (void)setAttributionDetails:(NSDictionary *)attributionDetails
442-
error:(NSError *)error
443-
{
444-
if (![ADJUtil isNull:error]) {
445-
[self.logger warn:@"Unable to read iAd details"];
446-
447-
if (self.iAdRetriesLeft < 0) {
448-
[self.logger warn:@"Number of retries to get iAd information surpassed"];
449-
return;
450-
}
451-
452-
switch (error.code) {
453-
// if first request was unsuccessful and ended up with one of the following error codes:
454-
// apply following retry logic:
455-
// - 1st retry after 5 seconds
456-
// - 2nd retry after 2 seconds
457-
// - 3rd retry after 2 seconds
458-
case AdjADClientErrorUnknown:
459-
case AdjADClientErrorMissingData:
460-
case AdjADClientErrorCorruptResponse:
461-
case AdjADClientErrorRequestClientError:
462-
case AdjADClientErrorRequestServerError:
463-
case AdjADClientErrorRequestNetworkError:
464-
case AdjCustomErrorTimeout: {
465-
466-
[self saveiAdErrorCode:error.code];
467-
468-
int64_t iAdRetryDelay = 0;
469-
switch (self.iAdRetriesLeft) {
470-
case 2:
471-
iAdRetryDelay = 5 * NSEC_PER_SEC;
472-
break;
473-
default:
474-
iAdRetryDelay = 2 * NSEC_PER_SEC;
475-
break;
476-
}
477-
self.iAdRetriesLeft = self.iAdRetriesLeft - 1;
478-
dispatch_time_t retryTime = dispatch_time(DISPATCH_TIME_NOW, iAdRetryDelay);
479-
dispatch_after(retryTime, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
480-
[self checkForiAdI:self];
481-
});
482-
return;
483-
}
484-
case AdjADClientErrorTrackingRestrictedOrDenied:
485-
case AdjADClientErrorUnsupportedPlatform:
486-
return;
487-
default:
488-
return;
489-
}
490-
}
491-
492-
// check if it's a valid attribution details
493-
if (![ADJUtil checkAttributionDetails:attributionDetails]) {
494-
return;
495-
}
496-
497-
// send immediately if there is no previous attribution details
498-
if (self.activityState == nil ||
499-
self.activityState.attributionDetails == nil)
500-
{
501-
// send immediately
502-
[self sendIad3ClickPackage:self attributionDetails:attributionDetails];
503-
// save in the background queue
504-
[ADJUtil launchInQueue:self.internalQueue
505-
selfInject:self
506-
block:^(ADJActivityHandler * selfI) {
507-
[selfI saveAttributionDetailsI:selfI
508-
attributionDetails:attributionDetails];
509-
510-
}];
511-
return;
512-
}
513-
514-
// check if new updates previous written one
515-
[ADJUtil launchInQueue:self.internalQueue
516-
selfInject:self
517-
block:^(ADJActivityHandler * selfI) {
518-
if ([attributionDetails isEqualToDictionary:selfI.activityState.attributionDetails]) {
519-
return;
520-
}
521-
522-
[selfI sendIad3ClickPackage:selfI attributionDetails:attributionDetails];
523-
524-
// save new iAd details
525-
[selfI saveAttributionDetailsI:selfI
526-
attributionDetails:attributionDetails];
527-
}];
528-
}
529-
530-
- (void)saveiAdErrorCode:(NSInteger)code {
531-
NSString *codeKey;
532-
switch (code) {
533-
case AdjADClientErrorUnknown:
534-
codeKey = @"AdjADClientErrorUnknown";
535-
break;
536-
case AdjADClientErrorMissingData:
537-
codeKey = @"AdjADClientErrorMissingData";
538-
break;
539-
case AdjADClientErrorCorruptResponse:
540-
codeKey = @"AdjADClientErrorCorruptResponse";
541-
break;
542-
case AdjCustomErrorTimeout:
543-
codeKey = @"AdjCustomErrorTimeout";
544-
break;
545-
default:
546-
codeKey = @"";
547-
break;
548-
}
549-
550-
if (![codeKey isEqualToString:@""]) {
551-
[ADJUserDefaults saveiAdErrorKey:codeKey];
552-
}
553-
}
554-
555-
- (void)sendIad3ClickPackage:(ADJActivityHandler *)selfI
556-
attributionDetails:(NSDictionary *)attributionDetails
557-
{
558-
if (![selfI isEnabledI:selfI]) {
559-
return;
560-
}
561-
562-
if (ADJAdjustFactory.iAdFrameworkEnabled == NO) {
563-
[self.logger verbose:@"Sending iAd details to server suppressed."];
564-
return;
565-
}
566-
567-
double now = [NSDate.date timeIntervalSince1970];
568-
if (selfI.activityState != nil) {
569-
[ADJUtil launchSynchronisedWithObject:[ADJActivityState class]
570-
block:^{
571-
double lastInterval = now - selfI.activityState.lastActivity;
572-
selfI.activityState.lastInterval = lastInterval;
573-
}];
574-
}
575-
ADJPackageBuilder *clickBuilder = [[ADJPackageBuilder alloc]
576-
initWithPackageParams:selfI.packageParams
577-
activityState:selfI.activityState
578-
config:selfI.adjustConfig
579-
sessionParameters:self.sessionParameters
580-
trackingStatusManager:self.trackingStatusManager
581-
createdAt:now];
582-
583-
clickBuilder.attributionDetails = attributionDetails;
584-
585-
ADJActivityPackage *clickPackage = [clickBuilder buildClickPackage:ADJiAdPackageKey];
586-
[selfI.sdkClickHandler sendSdkClick:clickPackage];
587-
}
588-
589421
- (void)sendAdServicesClickPackage:(ADJActivityHandler *)selfI
590422
token:(NSString *)token
591423
errorCodeNumber:(NSNumber *)errorCodeNumber
@@ -622,17 +454,6 @@ - (void)sendAdServicesClickPackage:(ADJActivityHandler *)selfI
622454
[selfI.sdkClickHandler sendSdkClick:clickPackage];
623455
}
624456

625-
- (void)saveAttributionDetailsI:(ADJActivityHandler *)selfI
626-
attributionDetails:(NSDictionary *)attributionDetails
627-
{
628-
// save new iAd details
629-
[ADJUtil launchSynchronisedWithObject:[ADJActivityState class]
630-
block:^{
631-
selfI.activityState.attributionDetails = attributionDetails;
632-
}];
633-
[selfI writeAttributionI:selfI];
634-
}
635-
636457
- (void)setAskingAttribution:(BOOL)askingAttribution {
637458
[ADJUtil launchInQueue:self.internalQueue
638459
selfInject:self
@@ -1117,9 +938,6 @@ - (void)processSessionI:(ADJActivityHandler *)selfI {
1117938
selfI.activityState.updatePackages = [selfI.internalState itHasToUpdatePackages];
1118939
}];
1119940

1120-
if (selfI.adjustConfig.allowiAdInfoReading == YES) {
1121-
[selfI checkForiAdI:selfI];
1122-
}
1123941
if (selfI.adjustConfig.allowAdServicesInfoReading == YES) {
1124942
[selfI checkForAdServicesAttributionI:selfI];
1125943
}
@@ -1789,9 +1607,6 @@ - (void)setEnabledI:(ADJActivityHandler *)selfI enabled:(BOOL)enabled {
17891607
if (pushToken != nil && ![selfI.activityState.deviceToken isEqualToString:pushToken]) {
17901608
[self setPushToken:pushToken];
17911609
}
1792-
if (selfI.adjustConfig.allowiAdInfoReading == YES) {
1793-
[selfI checkForiAdI:selfI];
1794-
}
17951610
if (selfI.adjustConfig.allowAdServicesInfoReading == YES) {
17961611
[selfI checkForAdServicesAttributionI:selfI];
17971612
}
@@ -1804,10 +1619,6 @@ - (void)setEnabledI:(ADJActivityHandler *)selfI enabled:(BOOL)enabled {
18041619
unPausingMessage:@"Resuming handlers due to SDK being enabled"];
18051620
}
18061621

1807-
- (void)checkForiAdI:(ADJActivityHandler *)selfI {
1808-
[ADJUtil checkForiAd:selfI queue:selfI.internalQueue];
1809-
}
1810-
18111622
- (BOOL)shouldFetchAdServicesI:(ADJActivityHandler *)selfI {
18121623
if (selfI.adjustConfig.allowAdServicesInfoReading == NO) {
18131624
return NO;

Adjust/ADJAdjustFactory.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
+ (NSString *)baseUrl;
3030
+ (NSString *)gdprUrl;
3131
+ (NSString *)subscriptionUrl;
32-
+ (BOOL)iAdFrameworkEnabled;
3332
+ (BOOL)adServicesFrameworkEnabled;
3433

3534
+ (void)setLogger:(id<ADJLogger>)logger;
@@ -41,7 +40,6 @@
4140
+ (void)setPackageHandlerBackoffStrategy:(ADJBackoffStrategy *)backoffStrategy;
4241
+ (void)setSdkClickHandlerBackoffStrategy:(ADJBackoffStrategy *)backoffStrategy;
4342
+ (void)setTesting:(BOOL)testing;
44-
+ (void)setiAdFrameworkEnabled:(BOOL)iAdFrameworkEnabled;
4543
+ (void)setAdServicesFrameworkEnabled:(BOOL)adServicesFrameworkEnabled;
4644
+ (void)setMaxDelayStart:(NSTimeInterval)maxDelayStart;
4745
+ (void)setBaseUrl:(NSString *)baseUrl;

Adjust/ADJAdjustFactory.m

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
static ADJBackoffStrategy * installSessionBackoffStrategy = nil;
2323
static BOOL internalTesting = NO;
2424
static NSTimeInterval internalMaxDelayStart = -1;
25-
static BOOL internaliAdFrameworkEnabled = YES;
2625
static BOOL internalAdServicesFrameworkEnabled = YES;
2726

2827
static NSString * internalBaseUrl = nil;
@@ -99,10 +98,6 @@ + (BOOL)testing {
9998
return internalTesting;
10099
}
101100

102-
+ (BOOL)iAdFrameworkEnabled {
103-
return internaliAdFrameworkEnabled;
104-
}
105-
106101
+ (BOOL)adServicesFrameworkEnabled {
107102
return internalAdServicesFrameworkEnabled;
108103
}
@@ -162,10 +157,6 @@ + (void)setTesting:(BOOL)testing {
162157
internalTesting = testing;
163158
}
164159

165-
+ (void)setiAdFrameworkEnabled:(BOOL)iAdFrameworkEnabled {
166-
internaliAdFrameworkEnabled = iAdFrameworkEnabled;
167-
}
168-
169160
+ (void)setAdServicesFrameworkEnabled:(BOOL)adServicesFrameworkEnabled {
170161
internalAdServicesFrameworkEnabled = adServicesFrameworkEnabled;
171162
}
@@ -248,7 +239,6 @@ + (void)teardown:(BOOL)deleteState {
248239
internalBaseUrl = nil;
249240
internalGdprUrl = nil;
250241
internalSubscriptionUrl = nil;
251-
internaliAdFrameworkEnabled = YES;
252242
internalAdServicesFrameworkEnabled = YES;
253243
}
254244
@end

0 commit comments

Comments
 (0)