From bf2990394091ba9631b4fb15c838313842ece636 Mon Sep 17 00:00:00 2001 From: Hans Pfau Date: Thu, 9 Apr 2015 12:33:53 +0200 Subject: [PATCH 1/7] added click label parameter to the ADJAttribution object --- Adjust/ADJAttribution.h | 3 +++ Adjust/ADJAttribution.m | 33 ++++++++++++++++++++++----------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Adjust/ADJAttribution.h b/Adjust/ADJAttribution.h index 7be2c12e7..21faee13e 100644 --- a/Adjust/ADJAttribution.h +++ b/Adjust/ADJAttribution.h @@ -31,6 +31,9 @@ // tracker creative @property (nonatomic, copy) NSString *creative; +// tracker click_label +@property (nonatomic, copy) NSString *clickLabel; + - (BOOL)isEqualToAttribution:(ADJAttribution *)attribution; + (ADJAttribution *)dataWithJsonDict:(NSDictionary *)jsonDict; diff --git a/Adjust/ADJAttribution.m b/Adjust/ADJAttribution.m index aaa58571f..77441f01d 100644 --- a/Adjust/ADJAttribution.m +++ b/Adjust/ADJAttribution.m @@ -29,7 +29,8 @@ - (id)initWithJsonDict:(NSDictionary *)jsonDict { self.campaign = [jsonDict objectForKey:@"campaign"]; self.adgroup = [jsonDict objectForKey:@"adgroup"]; self.creative = [jsonDict objectForKey:@"creative"]; - + self.clickLabel = [jsonDict objectForKey:@"click_label"]; + return self; } @@ -55,7 +56,10 @@ - (BOOL)isEqualToAttribution:(ADJAttribution *)attribution { if (![NSString adjIsEqual:self.creative toString:attribution.creative]) { return NO; } - + if (![NSString adjIsEqual:self.clickLabel toString:attribution.clickLabel]) { + return NO; + } + return YES; } @@ -85,14 +89,18 @@ - (NSDictionary *)dictionary { if (self.creative != nil) { [responseDataDic setObject:self.creative forKey:@"creative"]; } - + + if (self.clickLabel != nil) { + [responseDataDic setObject:self.clickLabel forKey:@"click_label"]; + } + return responseDataDic; } - (NSString *)description { - return [NSString stringWithFormat:@"tt:%@ tn:%@ net:%@ cam:%@ adg:%@ cre:%@", + return [NSString stringWithFormat:@"tt:%@ tn:%@ net:%@ cam:%@ adg:%@ cre:%@ lab:%@", self.trackerToken, self.trackerName, self.network, self.campaign, - self.adgroup, self.creative]; + self.adgroup, self.creative, self.clickLabel]; } @@ -121,11 +129,12 @@ -(id)copyWithZone:(NSZone *)zone if (copy) { copy.trackerToken = [self.trackerToken copyWithZone:zone]; - copy.trackerName = [self.trackerName copyWithZone:zone]; - copy.network = [self.network copyWithZone:zone]; - copy.campaign = [self.campaign copyWithZone:zone]; - copy.adgroup = [self.adgroup copyWithZone:zone]; - copy.creative = [self.creative copyWithZone:zone]; + copy.trackerName = [self.trackerName copyWithZone:zone]; + copy.network = [self.network copyWithZone:zone]; + copy.campaign = [self.campaign copyWithZone:zone]; + copy.adgroup = [self.adgroup copyWithZone:zone]; + copy.creative = [self.creative copyWithZone:zone]; + copy.clickLabel = [self.clickLabel copyWithZone:zone]; } return copy; @@ -144,7 +153,8 @@ - (id)initWithCoder:(NSCoder *)decoder { self.campaign = [decoder decodeObjectForKey:@"campaign"]; self.adgroup = [decoder decodeObjectForKey:@"adgroup"]; self.creative = [decoder decodeObjectForKey:@"creative"]; - + self.clickLabel = [decoder decodeObjectForKey:@"click_label"]; + return self; } @@ -155,6 +165,7 @@ - (void)encodeWithCoder:(NSCoder *)encoder { [encoder encodeObject:self.campaign forKey:@"campaign"]; [encoder encodeObject:self.adgroup forKey:@"adgroup"]; [encoder encodeObject:self.creative forKey:@"creative"]; + [encoder encodeObject:self.clickLabel forKey:@"click_label"]; } @end From b949d31fb7f021c7c698b1e622cc1a17b902be71 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 9 Apr 2015 14:30:38 +0200 Subject: [PATCH 2/7] Removed white spaces --- Adjust/ADJAttribution.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Adjust/ADJAttribution.m b/Adjust/ADJAttribution.m index 77441f01d..a09290289 100644 --- a/Adjust/ADJAttribution.m +++ b/Adjust/ADJAttribution.m @@ -30,7 +30,7 @@ - (id)initWithJsonDict:(NSDictionary *)jsonDict { self.adgroup = [jsonDict objectForKey:@"adgroup"]; self.creative = [jsonDict objectForKey:@"creative"]; self.clickLabel = [jsonDict objectForKey:@"click_label"]; - + return self; } @@ -59,7 +59,7 @@ - (BOOL)isEqualToAttribution:(ADJAttribution *)attribution { if (![NSString adjIsEqual:self.clickLabel toString:attribution.clickLabel]) { return NO; } - + return YES; } @@ -89,11 +89,11 @@ - (NSDictionary *)dictionary { if (self.creative != nil) { [responseDataDic setObject:self.creative forKey:@"creative"]; } - + if (self.clickLabel != nil) { [responseDataDic setObject:self.clickLabel forKey:@"click_label"]; } - + return responseDataDic; } @@ -154,7 +154,7 @@ - (id)initWithCoder:(NSCoder *)decoder { self.adgroup = [decoder decodeObjectForKey:@"adgroup"]; self.creative = [decoder decodeObjectForKey:@"creative"]; self.clickLabel = [decoder decodeObjectForKey:@"click_label"]; - + return self; } From 2bff9b8343687d09edb94d4f6806d2fc9d67368f Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 9 Apr 2015 15:54:57 +0200 Subject: [PATCH 3/7] Rename click label log --- Adjust/ADJAttribution.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adjust/ADJAttribution.m b/Adjust/ADJAttribution.m index a09290289..9606bdcb0 100644 --- a/Adjust/ADJAttribution.m +++ b/Adjust/ADJAttribution.m @@ -98,7 +98,7 @@ - (NSDictionary *)dictionary { } - (NSString *)description { - return [NSString stringWithFormat:@"tt:%@ tn:%@ net:%@ cam:%@ adg:%@ cre:%@ lab:%@", + return [NSString stringWithFormat:@"tt:%@ tn:%@ net:%@ cam:%@ adg:%@ cre:%@ clklbl:%@", self.trackerToken, self.trackerName, self.network, self.campaign, self.adgroup, self.creative, self.clickLabel]; } From de646c214fe0e8178f09e944609bea56aeea968f Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 9 Apr 2015 15:55:33 +0200 Subject: [PATCH 4/7] Click Label tests --- AdjustTests/ADJActivityHandlerTests.m | 13 ++++++++----- AdjustTests/ADJAttributionHandlerTests.m | 7 ++++--- AdjustTests/AIRequestHandlerTests.m | 2 +- ...ction+NSURLConnectionSynchronousLoadingMocking.m | 4 ++-- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/AdjustTests/ADJActivityHandlerTests.m b/AdjustTests/ADJActivityHandlerTests.m index e83d1de7c..954654bd4 100644 --- a/AdjustTests/ADJActivityHandlerTests.m +++ b/AdjustTests/ADJActivityHandlerTests.m @@ -621,7 +621,7 @@ - (void)testChecks { [firstEvent setRevenue:0 currency:@""]; [firstEvent setRevenue:-0.0001 currency:@"EUR"]; - [firstEvent setReceipt:@"value" transactionId:nil]; + [firstEvent setReceipt:[@"value" dataUsingEncoding:NSUTF8StringEncoding] transactionId:nil]; [activityHandler trackEvent:firstEvent]; @@ -1073,6 +1073,7 @@ - (void)testAttribution { [jsonDictionary setObject:@"campaignValue" forKey:@"campaign"]; [jsonDictionary setObject:@"adgroupValue" forKey:@"adgroup"]; [jsonDictionary setObject:@"creativeValue" forKey:@"creative"]; + [jsonDictionary setObject:@"clickLabelValue" forKey:@"click_label"]; // build, update attribution and launch it to delegate ADJAttribution * attribution = [[ADJAttribution alloc] initWithJsonDict:jsonDictionary]; @@ -1083,7 +1084,7 @@ - (void)testAttribution { // check the first attribution is written XCTAssert([self.loggerMock containsMessage:ADJLogLevelDebug - beginsWith:@"Wrote Attribution: tt:trackerTokenValue tn:trackerNameValue net:networkValue cam:campaignValue adg:adgroupValue cre:creativeValue"], @"%@", self.loggerMock); + beginsWith:@"Wrote Attribution: tt:trackerTokenValue tn:trackerNameValue net:networkValue cam:campaignValue adg:adgroupValue cre:creativeValue clklbl:clickLabelValue"], @"%@", self.loggerMock); // change values of the same attribution attribution.trackerName = @"trackerNameValueNew"; @@ -1092,6 +1093,7 @@ - (void)testAttribution { attribution.campaign = @"campaignValueNew"; attribution.adgroup = @"adgroupValueNew"; attribution.creative = @"creativeValueNew"; + attribution.clickLabel = @"clickLabelValueNew"; // update it and launch delegate BOOL attributeUpdatedNewValues = [activityHandler updateAttribution:attribution]; @@ -1101,7 +1103,7 @@ - (void)testAttribution { // check the second attribution is written XCTAssert([self.loggerMock containsMessage:ADJLogLevelDebug - beginsWith:@"Wrote Attribution: tt:trackerTokenValueNew tn:trackerNameValueNew net:networkValueNew cam:campaignValueNew adg:adgroupValueNew cre:creativeValueNew"], @"%@", self.loggerMock); + beginsWith:@"Wrote Attribution: tt:trackerTokenValueNew tn:trackerNameValueNew net:networkValueNew cam:campaignValueNew adg:adgroupValueNew cre:creativeValueNew clklbl:clickLabelValueNew"], @"%@", self.loggerMock); // build a json dictionary equal to the updated Attribution NSMutableDictionary * newJsonDictionary = [[NSMutableDictionary alloc] init]; @@ -1111,6 +1113,7 @@ - (void)testAttribution { [newJsonDictionary setObject:@"campaignValueNew" forKey:@"campaign"]; [newJsonDictionary setObject:@"adgroupValueNew" forKey:@"adgroup"]; [newJsonDictionary setObject:@"creativeValueNew" forKey:@"creative"]; + [newJsonDictionary setObject:@"clickLabelValueNew" forKey:@"click_label"]; // build, update attribution and launch new attribution to delegate ADJAttribution * newAttribution = [[ADJAttribution alloc] initWithJsonDict:newJsonDictionary]; @@ -1121,7 +1124,7 @@ - (void)testAttribution { // check the same attribution is not written again XCTAssertFalse([self.loggerMock containsMessage:ADJLogLevelDebug - beginsWith:@"Wrote Attribution: tt:trackerTokenValueNew tn:trackerNameValueNew net:networkValueNew cam:campaignValueNew adg:adgroupValueNew cre:creativeValueNew"], @"%@", self.loggerMock); + beginsWith:@"Wrote Attribution: tt:trackerTokenValueNew tn:trackerNameValueNew net:networkValueNew cam:campaignValueNew adg:adgroupValueNew cre:creativeValueNew clklbl:clickLabelValueNew"], @"%@", self.loggerMock); [activityHandler setAskingAttribution:NO]; @@ -1172,7 +1175,7 @@ - (void)testAttribution { // check new attribution after restart XCTAssert([self.loggerMock containsMessage:ADJLogLevelDebug - beginsWith:@"Wrote Attribution: tt:trackerTokenValue tn:trackerNameValue net:networkValue cam:campaignValue adg:adgroupValue cre:creativeValue"], @"%@", self.loggerMock); + beginsWith:@"Wrote Attribution: tt:trackerTokenValue tn:trackerNameValue net:networkValue cam:campaignValue adg:adgroupValue cre:creativeValue clklbl:clickLabelValue"], @"%@", self.loggerMock); [newActivityHandler setAskingAttribution:YES]; diff --git a/AdjustTests/ADJAttributionHandlerTests.m b/AdjustTests/ADJAttributionHandlerTests.m index 155a0b21f..9acfd05f4 100644 --- a/AdjustTests/ADJAttributionHandlerTests.m +++ b/AdjustTests/ADJAttributionHandlerTests.m @@ -110,7 +110,7 @@ - (void) checkGetCheckAttributionNoAskIn:(BOOL)update { // check the response was verbosed XCTAssert([self.loggerMock containsMessage:ADJLogLevelVerbose - beginsWith:@"status code 200 for attribution response: {\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\", \"network\":\"networkValue\",\"campaign\":\"campaignValue\", \"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\"}, \"message\":\"response OK\",\"deeplink\":\"testApp://\"}"], + beginsWith:@"status code 200 for attribution response: {\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\",\"network\":\"networkValue\",\"campaign\":\"campaignValue\",\"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\",\"click_label\":\"clickLabelValue\"},\"message\":\"response OK\",\"deeplink\":\"testApp://\"}"], @"%@", self.loggerMock); // check that the package was successfully sent @@ -140,6 +140,7 @@ - (void) checkGetCheckAttributionNoAskIn:(BOOL)update { [jsonDictionary setObject:@"campaignValue" forKey:@"campaign"]; [jsonDictionary setObject:@"adgroupValue" forKey:@"adgroup"]; [jsonDictionary setObject:@"creativeValue" forKey:@"creative"]; + [jsonDictionary setObject:@"clickLabelValue" forKey:@"click_label"]; ADJAttribution * attribution = [[ADJAttribution alloc] initWithJsonDict:jsonDictionary]; @@ -160,7 +161,7 @@ -(void) testAskInConnectionError { [NSURLConnection setConnectionError:YES]; - NSDictionary *jsonDict = [ADJUtil buildJsonDict:@"{\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\", \"network\":\"networkValue\",\"campaign\":\"campaignValue\", \"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\"}, \"ask_in\":0, \"message\":\"response OK\",\"deeplink\":\"testApp://\"}"]; + NSDictionary *jsonDict = [ADJUtil buildJsonDict:@"{\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\",\"network\":\"networkValue\",\"campaign\":\"campaignValue\",\"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\",\"click_label\":\"clickLabelValue\"},\"ask_in\":0,\"message\":\"response OK\",\"deeplink\":\"testApp://\"}"]; [attributionHandler checkAttribution:jsonDict]; @@ -294,7 +295,7 @@ -(void) testCancelTimer { [NSURLConnection setConnectionError:YES]; - NSString * jsonString = @"{\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\", \"network\":\"networkValue\",\"campaign\":\"campaignValue\", \"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\"}, \"message\":\"response OK\",\"ask_in\":\"5000\"}"; + NSString * jsonString = @"{\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\",\"network\":\"networkValue\",\"campaign\":\"campaignValue\",\"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\",\"click_label\":\"clickLabelValue\"},\"message\":\"response OK\",\"ask_in\":\"5000\"}"; NSDictionary * jsonDict = [ADJUtil buildJsonDict:jsonString]; diff --git a/AdjustTests/AIRequestHandlerTests.m b/AdjustTests/AIRequestHandlerTests.m index 5ebededc8..395b4f131 100644 --- a/AdjustTests/AIRequestHandlerTests.m +++ b/AdjustTests/AIRequestHandlerTests.m @@ -79,7 +79,7 @@ - (void)checkSendPackage:(BOOL)isClickPackage { // check the response was verbosed XCTAssert([self.loggerMock containsMessage:ADJLogLevelVerbose - beginsWith:@"status code 200 for package response: {\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\", \"network\":\"networkValue\",\"campaign\":\"campaignValue\", \"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\"}, \"message\":\"response OK\",\"deeplink\":\"testApp://\"}"], + beginsWith:@"status code 200 for package response: {\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\",\"network\":\"networkValue\",\"campaign\":\"campaignValue\",\"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\",\"click_label\":\"clickLabelValue\"},\"message\":\"response OK\",\"deeplink\":\"testApp://\"}"], @"%@", self.loggerMock); // check that the package was successfully sent diff --git a/AdjustTests/NSURLConnection+NSURLConnectionSynchronousLoadingMocking.m b/AdjustTests/NSURLConnection+NSURLConnectionSynchronousLoadingMocking.m index 5dc5fe0ce..75ff50b4d 100644 --- a/AdjustTests/NSURLConnection+NSURLConnectionSynchronousLoadingMocking.m +++ b/AdjustTests/NSURLConnection+NSURLConnectionSynchronousLoadingMocking.m @@ -29,7 +29,7 @@ + (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NS NSString * sResponse; if (triggerResponse == 0) { statusCode = 200; - sResponse = @"{\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\", \"network\":\"networkValue\",\"campaign\":\"campaignValue\", \"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\"}, \"message\":\"response OK\",\"deeplink\":\"testApp://\"}"; + sResponse = @"{\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\",\"network\":\"networkValue\",\"campaign\":\"campaignValue\",\"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\",\"click_label\":\"clickLabelValue\"},\"message\":\"response OK\",\"deeplink\":\"testApp://\"}"; } else if (triggerResponse == 1) { statusCode = 0; sResponse = @"{\"message\":\"response error\"}"; @@ -41,7 +41,7 @@ + (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NS sResponse = @"{}"; } else if (triggerResponse == 4) { statusCode = 200; - sResponse = @"{\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\", \"network\":\"networkValue\",\"campaign\":\"campaignValue\", \"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\"}, \"message\":\"response OK\",\"ask_in\":\"2000\"}"; + sResponse = @"{\"attribution\":{\"tracker_token\":\"trackerTokenValue\",\"tracker_name\":\"trackerNameValue\",\"network\":\"networkValue\",\"campaign\":\"campaignValue\",\"adgroup\":\"adgroupValue\",\"creative\":\"creativeValue\",\"click_label\":\"clickLabelValue\"}, \"message\":\"response OK\",\"ask_in\":\"2000\"}"; } else { statusCode = 0; From 5b6bf545037b3aec4b9563a9e6674147dbcd9357 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 9 Apr 2015 15:59:44 +0200 Subject: [PATCH 5/7] Readme add click label in attribution --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e25f61f5f..f24b24917 100644 --- a/README.md +++ b/README.md @@ -325,6 +325,7 @@ Here is a quick summary of its properties: - `NSString campaign` the campaign grouping level of the current install. - `NSString adgroup` the ad group grouping level of the current install. - `NSString creative` the creative grouping level of the current install. +- `NSString clickLabel` the click label of the current install. ### 10. Disable tracking From 23af0015840570d7b733771164f00c3726b22375 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 9 Apr 2015 17:13:20 +0200 Subject: [PATCH 6/7] Rename label description --- Adjust/ADJAttribution.m | 2 +- AdjustTests/ADJActivityHandlerTests.m | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Adjust/ADJAttribution.m b/Adjust/ADJAttribution.m index 9606bdcb0..a09290289 100644 --- a/Adjust/ADJAttribution.m +++ b/Adjust/ADJAttribution.m @@ -98,7 +98,7 @@ - (NSDictionary *)dictionary { } - (NSString *)description { - return [NSString stringWithFormat:@"tt:%@ tn:%@ net:%@ cam:%@ adg:%@ cre:%@ clklbl:%@", + return [NSString stringWithFormat:@"tt:%@ tn:%@ net:%@ cam:%@ adg:%@ cre:%@ lab:%@", self.trackerToken, self.trackerName, self.network, self.campaign, self.adgroup, self.creative, self.clickLabel]; } diff --git a/AdjustTests/ADJActivityHandlerTests.m b/AdjustTests/ADJActivityHandlerTests.m index 954654bd4..2ec6a1d92 100644 --- a/AdjustTests/ADJActivityHandlerTests.m +++ b/AdjustTests/ADJActivityHandlerTests.m @@ -1084,7 +1084,7 @@ - (void)testAttribution { // check the first attribution is written XCTAssert([self.loggerMock containsMessage:ADJLogLevelDebug - beginsWith:@"Wrote Attribution: tt:trackerTokenValue tn:trackerNameValue net:networkValue cam:campaignValue adg:adgroupValue cre:creativeValue clklbl:clickLabelValue"], @"%@", self.loggerMock); + beginsWith:@"Wrote Attribution: tt:trackerTokenValue tn:trackerNameValue net:networkValue cam:campaignValue adg:adgroupValue cre:creativeValue lab:clickLabelValue"], @"%@", self.loggerMock); // change values of the same attribution attribution.trackerName = @"trackerNameValueNew"; @@ -1103,7 +1103,7 @@ - (void)testAttribution { // check the second attribution is written XCTAssert([self.loggerMock containsMessage:ADJLogLevelDebug - beginsWith:@"Wrote Attribution: tt:trackerTokenValueNew tn:trackerNameValueNew net:networkValueNew cam:campaignValueNew adg:adgroupValueNew cre:creativeValueNew clklbl:clickLabelValueNew"], @"%@", self.loggerMock); + beginsWith:@"Wrote Attribution: tt:trackerTokenValueNew tn:trackerNameValueNew net:networkValueNew cam:campaignValueNew adg:adgroupValueNew cre:creativeValueNew lab:clickLabelValueNew"], @"%@", self.loggerMock); // build a json dictionary equal to the updated Attribution NSMutableDictionary * newJsonDictionary = [[NSMutableDictionary alloc] init]; @@ -1124,7 +1124,7 @@ - (void)testAttribution { // check the same attribution is not written again XCTAssertFalse([self.loggerMock containsMessage:ADJLogLevelDebug - beginsWith:@"Wrote Attribution: tt:trackerTokenValueNew tn:trackerNameValueNew net:networkValueNew cam:campaignValueNew adg:adgroupValueNew cre:creativeValueNew clklbl:clickLabelValueNew"], @"%@", self.loggerMock); + beginsWith:@"Wrote Attribution: tt:trackerTokenValueNew tn:trackerNameValueNew net:networkValueNew cam:campaignValueNew adg:adgroupValueNew cre:creativeValueNew lab:clickLabelValueNew"], @"%@", self.loggerMock); [activityHandler setAskingAttribution:NO]; @@ -1175,7 +1175,7 @@ - (void)testAttribution { // check new attribution after restart XCTAssert([self.loggerMock containsMessage:ADJLogLevelDebug - beginsWith:@"Wrote Attribution: tt:trackerTokenValue tn:trackerNameValue net:networkValue cam:campaignValue adg:adgroupValue cre:creativeValue clklbl:clickLabelValue"], @"%@", self.loggerMock); + beginsWith:@"Wrote Attribution: tt:trackerTokenValue tn:trackerNameValue net:networkValue cam:campaignValue adg:adgroupValue cre:creativeValue lab:clickLabelValue"], @"%@", self.loggerMock); [newActivityHandler setAskingAttribution:YES]; From 4c312122bf4aeec32c18af87d79e5519416062b2 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 9 Apr 2015 15:57:38 +0200 Subject: [PATCH 7/7] New version v4.2.0 --- Adjust.podspec | 4 ++-- Adjust/ADJUtil.m | 2 +- AdjustTests/ADJActivityHandlerTests.m | 2 +- README.md | 2 +- VERSION | 2 +- doc/migrate.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Adjust.podspec b/Adjust.podspec index 985d93f89..354aa6a87 100644 --- a/Adjust.podspec +++ b/Adjust.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |s| s.name = "Adjust" - s.version = "4.1.1" + s.version = "4.2.0" s.summary = "This is the iOS SDK of adjust. You can read more about it at http://adjust.com." s.homepage = "http://adjust.com" 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.1.1" } + s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.2.0" } s.platform = :ios, '4.3' s.framework = 'SystemConfiguration' s.weak_framework = 'AdSupport', 'iAd' diff --git a/Adjust/ADJUtil.m b/Adjust/ADJUtil.m index 6dfd85969..1bc21a78b 100644 --- a/Adjust/ADJUtil.m +++ b/Adjust/ADJUtil.m @@ -16,7 +16,7 @@ #include static NSString * const kBaseUrl = @"https://app.adjust.com"; -static NSString * const kClientSdk = @"ios4.1.1"; +static NSString * const kClientSdk = @"ios4.2.0"; static NSString * const kDateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'Z"; static NSDateFormatter *dateFormat; diff --git a/AdjustTests/ADJActivityHandlerTests.m b/AdjustTests/ADJActivityHandlerTests.m index 2ec6a1d92..2d13d1f0b 100644 --- a/AdjustTests/ADJActivityHandlerTests.m +++ b/AdjustTests/ADJActivityHandlerTests.m @@ -121,7 +121,7 @@ - (void)testFirstRun ADJActivityPackage *activityPackage = (ADJActivityPackage *) self.packageHandlerMock.packageQueue[0]; // check the Sdk version is being tested - XCTAssertEqual(@"ios4.1.1", activityPackage.clientSdk, @"%@", activityPackage.extendedString); + XCTAssertEqual(@"ios4.2.0", activityPackage.clientSdk, @"%@", activityPackage.extendedString); // check the server url XCTAssertEqual(@"https://app.adjust.com", ADJUtil.baseUrl); diff --git a/README.md b/README.md index f24b24917..b008e0f7c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you're using [CocoaPods][cocoapods], you can add the following line to your `Podfile` and continue with [step 3](#step3): ```ruby -pod 'Adjust', :git => 'git://github.com/adjust/ios_sdk.git', :tag => 'v4.1.1' +pod 'Adjust', :git => 'git://github.com/adjust/ios_sdk.git', :tag => 'v4.2.0' ``` ### 1. Get the SDK diff --git a/VERSION b/VERSION index 627a3f43a..6aba2b245 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.1 +4.2.0 diff --git a/doc/migrate.md b/doc/migrate.md index 30b6d45e9..a17f6883c 100644 --- a/doc/migrate.md +++ b/doc/migrate.md @@ -1,4 +1,4 @@ -## Migrate your adjust SDK for iOS to v4.1.1 from v3.4.0 +## Migrate your adjust SDK for iOS to v4.2.0 from v3.4.0 ### Initial setup