Skip to content

Commit 7c2d055

Browse files
authored
Merge pull request #356 from adjust/v4160
Version 4.16.0
2 parents d746f71 + a7b8ef2 commit 7c2d055

File tree

55 files changed

+2645
-495
lines changed

Some content is hidden

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

55 files changed

+2645
-495
lines changed

Adjust.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Pod::Spec.new do |s|
22
s.name = "Adjust"
3-
s.version = "4.15.0"
3+
s.version = "4.16.0"
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' }
77
s.author = { "Christian Wellenbrock" => "[email protected]" }
8-
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.15.0" }
8+
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.16.0" }
99
s.ios.deployment_target = '6.0'
1010
s.tvos.deployment_target = '9.0'
1111
s.framework = 'SystemConfiguration'

Adjust.xcodeproj/project.pbxproj

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,13 @@
439439
remoteGlobalIDString = 6F0842272007769F00568A31;
440440
remoteInfo = AdjustTestApp;
441441
};
442+
6F7AF64F211878BD00F730B2 /* PBXContainerItemProxy */ = {
443+
isa = PBXContainerItemProxy;
444+
containerPortal = 6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */;
445+
proxyType = 2;
446+
remoteGlobalIDString = 6F7AF626211878B900F730B2;
447+
remoteInfo = AdjustWebBridgeTestApp;
448+
};
442449
9679922318BBAE2800394606 /* PBXContainerItemProxy */ = {
443450
isa = PBXContainerItemProxy;
444451
containerPortal = 9679920518BBAE2800394606 /* Project object */;
@@ -557,6 +564,7 @@
557564
/* Begin PBXFileReference section */
558565
6F0842182007766700568A31 /* AdjustTestLibrary.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustTestLibrary.xcodeproj; path = AdjustTestLibrary/AdjustTestLibrary.xcodeproj; sourceTree = "<group>"; };
559566
6F084240200776A000568A31 /* AdjustTestApp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustTestApp.xcodeproj; path = AdjustTestApp/AdjustTestApp.xcodeproj; sourceTree = "<group>"; };
567+
6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustWebBridgeTestApp.xcodeproj; path = AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj; sourceTree = "<group>"; };
560568
6FCC84F71F278CF300D6A0ED /* ADJReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJReachability.m; sourceTree = "<group>"; };
561569
6FCC84F81F278CF300D6A0ED /* ADJReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJReachability.h; sourceTree = "<group>"; };
562570
6FCC85021F27944600D6A0ED /* ADJReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJReachability.h; sourceTree = "<group>"; };
@@ -767,12 +775,10 @@
767775
9D0E2E5C210B575600133B4F /* AdjustBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdjustBridge.m; sourceTree = "<group>"; };
768776
9D0E2E5D210B575600133B4F /* AdjustBridgeRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdjustBridgeRegister.h; sourceTree = "<group>"; };
769777
9D0E2E5F210B575600133B4F /* WebViewJavascriptBridgeBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewJavascriptBridgeBase.m; sourceTree = "<group>"; };
770-
9D0E2E60210B575600133B4F /* AdjustBridge_JS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdjustBridge_JS.m; sourceTree = "<group>"; };
771778
9D0E2E61210B575600133B4F /* WKWebViewJavascriptBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WKWebViewJavascriptBridge.m; sourceTree = "<group>"; };
772779
9D0E2E62210B575600133B4F /* WebViewJavascriptBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewJavascriptBridge.m; sourceTree = "<group>"; };
773780
9D0E2E63210B575600133B4F /* WebViewJavascriptBridge_JS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewJavascriptBridge_JS.h; sourceTree = "<group>"; };
774781
9D0E2E64210B575600133B4F /* WebViewJavascriptBridgeBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewJavascriptBridgeBase.h; sourceTree = "<group>"; };
775-
9D0E2E65210B575600133B4F /* AdjustBridge_JS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdjustBridge_JS.h; sourceTree = "<group>"; };
776782
9D0E2E66210B575600133B4F /* WebViewJavascriptBridge_JS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewJavascriptBridge_JS.m; sourceTree = "<group>"; };
777783
9D0E2E67210B575600133B4F /* WebViewJavascriptBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewJavascriptBridge.h; sourceTree = "<group>"; };
778784
9D0E2E68210B575600133B4F /* WKWebViewJavascriptBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewJavascriptBridge.h; sourceTree = "<group>"; };
@@ -1140,6 +1146,14 @@
11401146
name = Products;
11411147
sourceTree = "<group>";
11421148
};
1149+
6F7AF640211878BC00F730B2 /* Products */ = {
1150+
isa = PBXGroup;
1151+
children = (
1152+
6F7AF650211878BD00F730B2 /* AdjustWebBridgeTestApp.app */,
1153+
);
1154+
name = Products;
1155+
sourceTree = "<group>";
1156+
};
11431157
9648C5E41CD1765E00A3B049 /* AdjustBridge */ = {
11441158
isa = PBXGroup;
11451159
children = (
@@ -1296,8 +1310,9 @@
12961310
96E5E39A18BBB49E008E7B30 /* AdjustTests */ = {
12971311
isa = PBXGroup;
12981312
children = (
1299-
6F084240200776A000568A31 /* AdjustTestApp.xcodeproj */,
13001313
6F0842182007766700568A31 /* AdjustTestLibrary.xcodeproj */,
1314+
6F084240200776A000568A31 /* AdjustTestApp.xcodeproj */,
1315+
6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */,
13011316
6F0841FB2007749C00568A31 /* AdjustUnitTests */,
13021317
);
13031318
path = AdjustTests;
@@ -1419,8 +1434,6 @@
14191434
9D0E2E5E210B575600133B4F /* WebViewJavascriptBridge */ = {
14201435
isa = PBXGroup;
14211436
children = (
1422-
9D0E2E65210B575600133B4F /* AdjustBridge_JS.h */,
1423-
9D0E2E60210B575600133B4F /* AdjustBridge_JS.m */,
14241437
9D0E2E63210B575600133B4F /* WebViewJavascriptBridge_JS.h */,
14251438
9D0E2E66210B575600133B4F /* WebViewJavascriptBridge_JS.m */,
14261439
9D0E2E67210B575600133B4F /* WebViewJavascriptBridge.h */,
@@ -2155,7 +2168,7 @@
21552168
9679920518BBAE2800394606 /* Project object */ = {
21562169
isa = PBXProject;
21572170
attributes = {
2158-
LastUpgradeCheck = 0940;
2171+
LastUpgradeCheck = 1010;
21592172
ORGANIZATIONNAME = "adjust GmbH";
21602173
TargetAttributes = {
21612174
9615158E1CD2CB2C0022D336 = {
@@ -2236,6 +2249,10 @@
22362249
ProductGroup = 6F0842192007766700568A31 /* Products */;
22372250
ProjectRef = 6F0842182007766700568A31 /* AdjustTestLibrary.xcodeproj */;
22382251
},
2252+
{
2253+
ProductGroup = 6F7AF640211878BC00F730B2 /* Products */;
2254+
ProjectRef = 6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */;
2255+
},
22392256
);
22402257
projectRoot = "";
22412258
targets = (
@@ -2267,6 +2284,13 @@
22672284
remoteRef = 6F084244200776A100568A31 /* PBXContainerItemProxy */;
22682285
sourceTree = BUILT_PRODUCTS_DIR;
22692286
};
2287+
6F7AF650211878BD00F730B2 /* AdjustWebBridgeTestApp.app */ = {
2288+
isa = PBXReferenceProxy;
2289+
fileType = wrapper.application;
2290+
path = AdjustWebBridgeTestApp.app;
2291+
remoteRef = 6F7AF64F211878BD00F730B2 /* PBXContainerItemProxy */;
2292+
sourceTree = BUILT_PRODUCTS_DIR;
2293+
};
22702294
9D01680420FF88DE0029CFFF /* AdjustExample-iMessage.app */ = {
22712295
isa = PBXReferenceProxy;
22722296
fileType = wrapper.application;

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 = "0940"
3+
LastUpgradeVersion = "1010"
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 = "0940"
3+
LastUpgradeVersion = "1010"
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 = "0940"
3+
LastUpgradeVersion = "1010"
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 = "0940"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Adjust/ADJActivityHandler.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
#import "Adjust.h"
1010
#import "ADJResponseData.h"
11+
#import "ADJActivityState.h"
12+
#import "ADJDeviceInfo.h"
13+
#import "ADJSessionParameters.h"
1114

1215
@interface ADJInternalState : NSObject
1316

@@ -83,7 +86,6 @@
8386
retriesLeft:(int)retriesLeft;
8487

8588
- (void)setOfflineMode:(BOOL)offline;
86-
- (ADJInternalState*) internalState;
8789
- (void)sendFirstPackages;
8890

8991
- (void)addSessionCallbackParameter:(NSString *)key
@@ -97,6 +99,11 @@
9799
- (NSString *)getBasePath;
98100
- (NSString *)getGdprPath;
99101

102+
- (ADJDeviceInfo *)deviceInfo;
103+
- (ADJActivityState *)activityState;
104+
- (ADJConfig *)adjustConfig;
105+
- (ADJSessionParameters *)sessionParameters;
106+
100107
- (void)teardown;
101108
+ (void)deleteState;
102109
@end

Adjust/ADJActivityHandler.m

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#import "ADJActivityPackage.h"
1010
#import "ADJActivityHandler.h"
11-
#import "ADJActivityState.h"
1211
#import "ADJPackageBuilder.h"
1312
#import "ADJPackageHandler.h"
1413
#import "ADJLogger.h"
@@ -20,7 +19,6 @@
2019
#import "ADJAttributionHandler.h"
2120
#import "NSString+ADJAdditions.h"
2221
#import "ADJSdkClickHandler.h"
23-
#import "ADJSessionParameters.h"
2422
#import "ADJUserDefaults.h"
2523

2624
typedef void (^activityHandlerBlockI)(ADJActivityHandler * activityHandler);
@@ -727,16 +725,7 @@ - (void)initI:(ADJActivityHandler *)selfI
727725
[selfI updatePackagesI:selfI];
728726
}
729727

730-
double now = [NSDate.date timeIntervalSince1970];
731-
ADJPackageBuilder *attributionBuilder = [[ADJPackageBuilder alloc]
732-
initWithDeviceInfo:selfI.deviceInfo
733-
activityState:selfI.activityState
734-
config:selfI.adjustConfig
735-
sessionParameters:selfI.sessionParameters
736-
createdAt:now];
737-
ADJActivityPackage *attributionPackage = [attributionBuilder buildAttributionPackage];
738728
selfI.attributionHandler = [ADJAdjustFactory attributionHandlerForActivityHandler:selfI
739-
withAttributionPackage:attributionPackage
740729
startsSending:[selfI toSendI:selfI
741730
sdkClickHandlerOnly:NO]];
742731

@@ -1258,40 +1247,35 @@ - (void)checkStatusI:(ADJActivityHandler *)selfI
12581247
- (void)appWillOpenUrlI:(ADJActivityHandler *)selfI
12591248
url:(NSURL *)url
12601249
clickTime:(NSDate *)clickTime {
1261-
if ([ADJUtil isNull:url]) {
1250+
if (![selfI isEnabledI:selfI]) {
12621251
return;
12631252
}
1264-
1265-
if (![selfI isEnabledI:selfI]) {
1253+
if ([ADJUtil isNull:url]) {
12661254
return;
12671255
}
1268-
1269-
if ([[url absoluteString] length] == 0) {
1256+
if (![ADJUtil isDeeplinkValid:url]) {
12701257
return;
12711258
}
12721259

1273-
NSArray* queryArray = [url.query componentsSeparatedByString:@"&"];
1260+
NSArray *queryArray = [url.query componentsSeparatedByString:@"&"];
12741261
if (queryArray == nil) {
12751262
queryArray = @[];
12761263
}
12771264

1278-
NSMutableDictionary* adjustDeepLinks = [NSMutableDictionary dictionary];
1265+
NSMutableDictionary *adjustDeepLinks = [NSMutableDictionary dictionary];
12791266
ADJAttribution *deeplinkAttribution = [[ADJAttribution alloc] init];
1280-
1281-
for (NSString* fieldValuePair in queryArray) {
1267+
for (NSString *fieldValuePair in queryArray) {
12821268
[selfI readDeeplinkQueryStringI:selfI queryString:fieldValuePair adjustDeepLinks:adjustDeepLinks attribution:deeplinkAttribution];
12831269
}
12841270

12851271
double now = [NSDate.date timeIntervalSince1970];
12861272
double lastInterval = now - selfI.activityState.lastActivity;
12871273
selfI.activityState.lastInterval = lastInterval;
1288-
1289-
ADJPackageBuilder *clickBuilder = [[ADJPackageBuilder alloc]
1290-
initWithDeviceInfo:selfI.deviceInfo
1291-
activityState:selfI.activityState
1292-
config:selfI.adjustConfig
1293-
sessionParameters:selfI.sessionParameters
1294-
createdAt:now];
1274+
ADJPackageBuilder *clickBuilder = [[ADJPackageBuilder alloc] initWithDeviceInfo:selfI.deviceInfo
1275+
activityState:selfI.activityState
1276+
config:selfI.adjustConfig
1277+
sessionParameters:selfI.sessionParameters
1278+
createdAt:now];
12951279
clickBuilder.deeplinkParameters = adjustDeepLinks;
12961280
clickBuilder.attribution = deeplinkAttribution;
12971281
clickBuilder.clickTime = clickTime;

Adjust/ADJAdjustFactory.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
+ (ADJBackoffStrategy *)sdkClickHandlerBackoffStrategy;
3737

3838
+ (id<ADJAttributionHandler>)attributionHandlerForActivityHandler:(id<ADJActivityHandler>)activityHandler
39-
withAttributionPackage:(ADJActivityPackage *) attributionPackage
4039
startsSending:(BOOL)startsSending;
4140
+ (BOOL)testing;
4241
+ (NSTimeInterval)maxDelayStart;

Adjust/ADJAdjustFactory.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,14 @@ + (ADJBackoffStrategy *)sdkClickHandlerBackoffStrategy {
114114
}
115115

116116
+ (id<ADJAttributionHandler>)attributionHandlerForActivityHandler:(id<ADJActivityHandler>)activityHandler
117-
withAttributionPackage:(ADJActivityPackage *) attributionPackage
118117
startsSending:(BOOL)startsSending
119118
{
120119
if (internalAttributionHandler == nil) {
121120
return [ADJAttributionHandler handlerWithActivityHandler:activityHandler
122-
withAttributionPackage:attributionPackage
123121
startsSending:startsSending];
124122
}
125123

126124
return [internalAttributionHandler initWithActivityHandler:activityHandler
127-
withAttributionPackage:attributionPackage
128125
startsSending:startsSending];
129126
}
130127

0 commit comments

Comments
 (0)