Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3e0ee99
Create bridge test app
nonelse Sep 7, 2018
7074c88
Link test library and sdk
nonelse Aug 6, 2018
6c6c30b
Clean and reorder linking
nonelse Sep 7, 2018
ace755d
Add test options to bridge
nonelse Sep 7, 2018
ea59e62
Reset callbacks in web bridge for testing
nonelse Sep 7, 2018
a9a5619
Send valid jsonResponse
nonelse Sep 7, 2018
00da5a5
Treat secret and info as strings
nonelse Sep 7, 2018
bb7ea28
Fix reset session parameters
nonelse Sep 7, 2018
705771c
Clean comments
nonelse Sep 7, 2018
8b40b2d
First commands
nonelse Sep 7, 2018
6df0e55
Increase isFieldValid checks
nonelse Sep 10, 2018
327aa0c
Use local reference instead of this
nonelse Sep 10, 2018
014e483
Fix JS typos
nonelse Sep 10, 2018
c0a4fb6
Rename handlers and add send info handlers
nonelse Sep 10, 2018
9322ff0
Add test callbacks
nonelse Sep 10, 2018
7fa777b
Add remaining commands
nonelse Sep 10, 2018
44bb1b4
Update sdk client version
nonelse Sep 10, 2018
6202134
Cleanup comments and logs
nonelse Sep 10, 2018
294d7a7
Add callback id for testing
nonelse Sep 10, 2018
26266a9
Set test app iOS deployment target to 9.0
uerceg Sep 11, 2018
24fa20c
Run all tests + minor cleanup
uerceg Sep 11, 2018
5a5c5d8
AdjustWebBridgeTestApp cleanup
uerceg Sep 11, 2018
c4e8029
Various cleanups
uerceg Sep 20, 2018
7ab0f3d
Add deep link exclusion regex
uerceg Nov 6, 2018
1e4834e
Project settings update
uerceg Nov 6, 2018
0abfb86
Package builder cleanup
uerceg Nov 6, 2018
24e8de2
Build attribuiton package per request
nonelse Nov 6, 2018
d3c5c98
Fix swift example callbacks
nonelse Nov 6, 2018
a7bab99
Update example ios project
nonelse Nov 6, 2018
ca3f096
Add iOS frameworks to test app
uerceg Nov 6, 2018
06c1c85
Check regex for nil value
uerceg Nov 7, 2018
e2aa7b7
New version 4.16.0
uerceg Nov 7, 2018
da02e66
Update CHANGELOG.md
uerceg Nov 7, 2018
1c3abb3
Add additional params to attribution and GDPR request
uerceg Nov 7, 2018
0eca9de
Changelog update
uerceg Nov 8, 2018
a7b8ef2
A bit of web view cleanups
uerceg Nov 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.15.0"
s.version = "4.16.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 = { "Christian Wellenbrock" => "welle@adjust.com" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.15.0" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.16.0" }
s.ios.deployment_target = '6.0'
s.tvos.deployment_target = '9.0'
s.framework = 'SystemConfiguration'
Expand Down
36 changes: 30 additions & 6 deletions Adjust.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,13 @@
remoteGlobalIDString = 6F0842272007769F00568A31;
remoteInfo = AdjustTestApp;
};
6F7AF64F211878BD00F730B2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 6F7AF626211878B900F730B2;
remoteInfo = AdjustWebBridgeTestApp;
};
9679922318BBAE2800394606 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9679920518BBAE2800394606 /* Project object */;
Expand Down Expand Up @@ -557,6 +564,7 @@
/* Begin PBXFileReference section */
6F0842182007766700568A31 /* AdjustTestLibrary.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustTestLibrary.xcodeproj; path = AdjustTestLibrary/AdjustTestLibrary.xcodeproj; sourceTree = "<group>"; };
6F084240200776A000568A31 /* AdjustTestApp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustTestApp.xcodeproj; path = AdjustTestApp/AdjustTestApp.xcodeproj; sourceTree = "<group>"; };
6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AdjustWebBridgeTestApp.xcodeproj; path = AdjustWebBridgeTestApp/AdjustWebBridgeTestApp.xcodeproj; sourceTree = "<group>"; };
6FCC84F71F278CF300D6A0ED /* ADJReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJReachability.m; sourceTree = "<group>"; };
6FCC84F81F278CF300D6A0ED /* ADJReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJReachability.h; sourceTree = "<group>"; };
6FCC85021F27944600D6A0ED /* ADJReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ADJReachability.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -767,12 +775,10 @@
9D0E2E5C210B575600133B4F /* AdjustBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdjustBridge.m; sourceTree = "<group>"; };
9D0E2E5D210B575600133B4F /* AdjustBridgeRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdjustBridgeRegister.h; sourceTree = "<group>"; };
9D0E2E5F210B575600133B4F /* WebViewJavascriptBridgeBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewJavascriptBridgeBase.m; sourceTree = "<group>"; };
9D0E2E60210B575600133B4F /* AdjustBridge_JS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdjustBridge_JS.m; sourceTree = "<group>"; };
9D0E2E61210B575600133B4F /* WKWebViewJavascriptBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WKWebViewJavascriptBridge.m; sourceTree = "<group>"; };
9D0E2E62210B575600133B4F /* WebViewJavascriptBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewJavascriptBridge.m; sourceTree = "<group>"; };
9D0E2E63210B575600133B4F /* WebViewJavascriptBridge_JS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewJavascriptBridge_JS.h; sourceTree = "<group>"; };
9D0E2E64210B575600133B4F /* WebViewJavascriptBridgeBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewJavascriptBridgeBase.h; sourceTree = "<group>"; };
9D0E2E65210B575600133B4F /* AdjustBridge_JS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdjustBridge_JS.h; sourceTree = "<group>"; };
9D0E2E66210B575600133B4F /* WebViewJavascriptBridge_JS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewJavascriptBridge_JS.m; sourceTree = "<group>"; };
9D0E2E67210B575600133B4F /* WebViewJavascriptBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewJavascriptBridge.h; sourceTree = "<group>"; };
9D0E2E68210B575600133B4F /* WKWebViewJavascriptBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewJavascriptBridge.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1140,6 +1146,14 @@
name = Products;
sourceTree = "<group>";
};
6F7AF640211878BC00F730B2 /* Products */ = {
isa = PBXGroup;
children = (
6F7AF650211878BD00F730B2 /* AdjustWebBridgeTestApp.app */,
);
name = Products;
sourceTree = "<group>";
};
9648C5E41CD1765E00A3B049 /* AdjustBridge */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1296,8 +1310,9 @@
96E5E39A18BBB49E008E7B30 /* AdjustTests */ = {
isa = PBXGroup;
children = (
6F084240200776A000568A31 /* AdjustTestApp.xcodeproj */,
6F0842182007766700568A31 /* AdjustTestLibrary.xcodeproj */,
6F084240200776A000568A31 /* AdjustTestApp.xcodeproj */,
6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */,
6F0841FB2007749C00568A31 /* AdjustUnitTests */,
);
path = AdjustTests;
Expand Down Expand Up @@ -1419,8 +1434,6 @@
9D0E2E5E210B575600133B4F /* WebViewJavascriptBridge */ = {
isa = PBXGroup;
children = (
9D0E2E65210B575600133B4F /* AdjustBridge_JS.h */,
9D0E2E60210B575600133B4F /* AdjustBridge_JS.m */,
9D0E2E63210B575600133B4F /* WebViewJavascriptBridge_JS.h */,
9D0E2E66210B575600133B4F /* WebViewJavascriptBridge_JS.m */,
9D0E2E67210B575600133B4F /* WebViewJavascriptBridge.h */,
Expand Down Expand Up @@ -2155,7 +2168,7 @@
9679920518BBAE2800394606 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = "adjust GmbH";
TargetAttributes = {
9615158E1CD2CB2C0022D336 = {
Expand Down Expand Up @@ -2236,6 +2249,10 @@
ProductGroup = 6F0842192007766700568A31 /* Products */;
ProjectRef = 6F0842182007766700568A31 /* AdjustTestLibrary.xcodeproj */;
},
{
ProductGroup = 6F7AF640211878BC00F730B2 /* Products */;
ProjectRef = 6F7AF63F211878BC00F730B2 /* AdjustWebBridgeTestApp.xcodeproj */;
},
);
projectRoot = "";
targets = (
Expand Down Expand Up @@ -2267,6 +2284,13 @@
remoteRef = 6F084244200776A100568A31 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
6F7AF650211878BD00F730B2 /* AdjustWebBridgeTestApp.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = AdjustWebBridgeTestApp.app;
remoteRef = 6F7AF64F211878BD00F730B2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
9D01680420FF88DE0029CFFF /* AdjustExample-iMessage.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
Expand Down
2 changes: 1 addition & 1 deletion Adjust.xcodeproj/xcshareddata/xcschemes/AdjustSdk.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
9 changes: 8 additions & 1 deletion Adjust/ADJActivityHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

#import "Adjust.h"
#import "ADJResponseData.h"
#import "ADJActivityState.h"
#import "ADJDeviceInfo.h"
#import "ADJSessionParameters.h"

@interface ADJInternalState : NSObject

Expand Down Expand Up @@ -83,7 +86,6 @@
retriesLeft:(int)retriesLeft;

- (void)setOfflineMode:(BOOL)offline;
- (ADJInternalState*) internalState;
- (void)sendFirstPackages;

- (void)addSessionCallbackParameter:(NSString *)key
Expand All @@ -97,6 +99,11 @@
- (NSString *)getBasePath;
- (NSString *)getGdprPath;

- (ADJDeviceInfo *)deviceInfo;
- (ADJActivityState *)activityState;
- (ADJConfig *)adjustConfig;
- (ADJSessionParameters *)sessionParameters;

- (void)teardown;
+ (void)deleteState;
@end
Expand Down
38 changes: 11 additions & 27 deletions Adjust/ADJActivityHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#import "ADJActivityPackage.h"
#import "ADJActivityHandler.h"
#import "ADJActivityState.h"
#import "ADJPackageBuilder.h"
#import "ADJPackageHandler.h"
#import "ADJLogger.h"
Expand All @@ -20,7 +19,6 @@
#import "ADJAttributionHandler.h"
#import "NSString+ADJAdditions.h"
#import "ADJSdkClickHandler.h"
#import "ADJSessionParameters.h"
#import "ADJUserDefaults.h"

typedef void (^activityHandlerBlockI)(ADJActivityHandler * activityHandler);
Expand Down Expand Up @@ -727,16 +725,7 @@ - (void)initI:(ADJActivityHandler *)selfI
[selfI updatePackagesI:selfI];
}

double now = [NSDate.date timeIntervalSince1970];
ADJPackageBuilder *attributionBuilder = [[ADJPackageBuilder alloc]
initWithDeviceInfo:selfI.deviceInfo
activityState:selfI.activityState
config:selfI.adjustConfig
sessionParameters:selfI.sessionParameters
createdAt:now];
ADJActivityPackage *attributionPackage = [attributionBuilder buildAttributionPackage];
selfI.attributionHandler = [ADJAdjustFactory attributionHandlerForActivityHandler:selfI
withAttributionPackage:attributionPackage
startsSending:[selfI toSendI:selfI
sdkClickHandlerOnly:NO]];

Expand Down Expand Up @@ -1258,40 +1247,35 @@ - (void)checkStatusI:(ADJActivityHandler *)selfI
- (void)appWillOpenUrlI:(ADJActivityHandler *)selfI
url:(NSURL *)url
clickTime:(NSDate *)clickTime {
if ([ADJUtil isNull:url]) {
if (![selfI isEnabledI:selfI]) {
return;
}

if (![selfI isEnabledI:selfI]) {
if ([ADJUtil isNull:url]) {
return;
}

if ([[url absoluteString] length] == 0) {
if (![ADJUtil isDeeplinkValid:url]) {
return;
}

NSArray* queryArray = [url.query componentsSeparatedByString:@"&"];
NSArray *queryArray = [url.query componentsSeparatedByString:@"&"];
if (queryArray == nil) {
queryArray = @[];
}

NSMutableDictionary* adjustDeepLinks = [NSMutableDictionary dictionary];
NSMutableDictionary *adjustDeepLinks = [NSMutableDictionary dictionary];
ADJAttribution *deeplinkAttribution = [[ADJAttribution alloc] init];

for (NSString* fieldValuePair in queryArray) {
for (NSString *fieldValuePair in queryArray) {
[selfI readDeeplinkQueryStringI:selfI queryString:fieldValuePair adjustDeepLinks:adjustDeepLinks attribution:deeplinkAttribution];
}

double now = [NSDate.date timeIntervalSince1970];
double lastInterval = now - selfI.activityState.lastActivity;
selfI.activityState.lastInterval = lastInterval;

ADJPackageBuilder *clickBuilder = [[ADJPackageBuilder alloc]
initWithDeviceInfo:selfI.deviceInfo
activityState:selfI.activityState
config:selfI.adjustConfig
sessionParameters:selfI.sessionParameters
createdAt:now];
ADJPackageBuilder *clickBuilder = [[ADJPackageBuilder alloc] initWithDeviceInfo:selfI.deviceInfo
activityState:selfI.activityState
config:selfI.adjustConfig
sessionParameters:selfI.sessionParameters
createdAt:now];
clickBuilder.deeplinkParameters = adjustDeepLinks;
clickBuilder.attribution = deeplinkAttribution;
clickBuilder.clickTime = clickTime;
Expand Down
1 change: 0 additions & 1 deletion Adjust/ADJAdjustFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
+ (ADJBackoffStrategy *)sdkClickHandlerBackoffStrategy;

+ (id<ADJAttributionHandler>)attributionHandlerForActivityHandler:(id<ADJActivityHandler>)activityHandler
withAttributionPackage:(ADJActivityPackage *) attributionPackage
startsSending:(BOOL)startsSending;
+ (BOOL)testing;
+ (NSTimeInterval)maxDelayStart;
Expand Down
3 changes: 0 additions & 3 deletions Adjust/ADJAdjustFactory.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,14 @@ + (ADJBackoffStrategy *)sdkClickHandlerBackoffStrategy {
}

+ (id<ADJAttributionHandler>)attributionHandlerForActivityHandler:(id<ADJActivityHandler>)activityHandler
withAttributionPackage:(ADJActivityPackage *) attributionPackage
startsSending:(BOOL)startsSending
{
if (internalAttributionHandler == nil) {
return [ADJAttributionHandler handlerWithActivityHandler:activityHandler
withAttributionPackage:attributionPackage
startsSending:startsSending];
}

return [internalAttributionHandler initWithActivityHandler:activityHandler
withAttributionPackage:attributionPackage
startsSending:startsSending];
}

Expand Down
2 changes: 0 additions & 2 deletions Adjust/ADJAttributionHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
@protocol ADJAttributionHandler

- (id)initWithActivityHandler:(id<ADJActivityHandler>) activityHandler
withAttributionPackage:(ADJActivityPackage *) attributionPackage
startsSending:(BOOL)startsSending;

- (void)checkSessionResponse:(ADJSessionResponseData *)sessionResponseData;
Expand All @@ -35,7 +34,6 @@
@interface ADJAttributionHandler : NSObject <ADJAttributionHandler>

+ (id<ADJAttributionHandler>)handlerWithActivityHandler:(id<ADJActivityHandler>)activityHandler
withAttributionPackage:(ADJActivityPackage *) attributionPackage
startsSending:(BOOL)startsSending;

@end
Loading