Skip to content

Commit

Permalink
Updates client version string to 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
willrust committed Sep 23, 2014
1 parent 43fbae6 commit a1c9d10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion KISSmetricsAPI/KMAArchiver.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
static NSString * const kKMABaseUrlKey = @"baseUrl";
static NSString * const kKMABaseUrlDefault = @"https://trk.kissmetrics.com";
static NSString * const kKMAAPIClientType = @"mobile_app";
static NSString * const kKMAAPIUserAgent = @"kissmetrics-ios/2.1.0";
static NSString * const kKMAAPIUserAgent = @"kissmetrics-ios/2.2.0";
static NSString * const kKMAKeychainAppVersionKey = @"KMAAppVersion";

static KMAArchiver *sSharedArchiver = nil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ - (void)setUp

_key = @"b8f68fe5004d29bcd21d3138b43ae755a16c12cf";
_clientType = @"mobile_app";
_userAgent = @"kissmetrics-ios/2.1.0";
_userAgent = @"kissmetrics-ios/2.2.0";

[KMAArchiver sharedArchiverWithKey:_key];

Expand Down Expand Up @@ -851,7 +851,7 @@ - (void)testArchiveData
{
NSMutableArray *sendQueue = [[KMAArchiver sharedArchiver] uth_getSendQueue];

[sendQueue addObject:@"https://trk.kissmetrics.com/a?_k=b8f68fe5004d29bcd21d3138b43ae755a16c12cf&_x=ios/2.1.0&_p=testnewuser%40example.com&_n=testolduser%40example.com"];
[sendQueue addObject:@"https://trk.kissmetrics.com/a?_k=b8f68fe5004d29bcd21d3138b43ae755a16c12cf&_x=ios/2.2.0&_p=testnewuser%40example.com&_n=testolduser%40example.com"];

NSLog(@"sendQueue = %@", sendQueue);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ - (void)setUp {

_key = @"b8f68fe5004d29bcd21d3138b43ae755a16c12cf";
_clientType = @"mobile_app";
_userAgent = @"kissmetrics-ios/2.1.0";
_userAgent = @"kissmetrics-ios/2.2.0";

_queryEncoder = [[KMAQueryEncoder alloc] initWithKey:_key
clientType:_clientType
Expand Down Expand Up @@ -152,7 +152,7 @@ - (void)test_createUrlForEventAndProperties {
identity:@"testuser@example.com"
timestamp:timestamp];

NSString *expectedUrl = @"/e?_k=b8f68fe5004d29bcd21d3138b43ae755a16c12cf&_c=mobile_app&_u=kissmetrics-ios/2.1.0&_p=testuser%40example.com";
NSString *expectedUrl = @"/e?_k=b8f68fe5004d29bcd21d3138b43ae755a16c12cf&_c=mobile_app&_u=kissmetrics-ios/2.2.0&_p=testuser%40example.com";
expectedUrl = [expectedUrl stringByAppendingString:[NSString stringWithFormat:@"&_n=testEvent&_d=1&_t=%i&propertyOne=testPropertyOne&propertyTwo=testPropertyTwo", timestamp]];

XCTAssertEqualObjects(createdUrl, expectedUrl, @"URL incorrect");
Expand All @@ -167,7 +167,7 @@ - (void)test_createUrlForProperties {
identity:@"testuser@example.com"
timestamp:timestamp];

NSString *expectedUrl = @"/s?_k=b8f68fe5004d29bcd21d3138b43ae755a16c12cf&_c=mobile_app&_u=kissmetrics-ios/2.1.0&_p=testuser%40example.com&_d=1&_t=";
NSString *expectedUrl = @"/s?_k=b8f68fe5004d29bcd21d3138b43ae755a16c12cf&_c=mobile_app&_u=kissmetrics-ios/2.2.0&_p=testuser%40example.com&_d=1&_t=";

expectedUrl = [expectedUrl stringByAppendingString:[NSString stringWithFormat:@"%i", timestamp]];
expectedUrl = [expectedUrl stringByAppendingString:@"&propertyOne=testPropertyOne&propertyTwo=testPropertyTwo"];
Expand All @@ -180,7 +180,7 @@ - (void)test_createUrlForIdentity {

NSString *createdUrl = [_queryEncoder createAliasQueryWithAlias:@"testnewuser@example.com" andIdentity:@"testolduser@example.com"];

NSString *expectedUrl = @"/a?_k=b8f68fe5004d29bcd21d3138b43ae755a16c12cf&_c=mobile_app&_u=kissmetrics-ios/2.1.0&_p=testnewuser%40example.com&_n=testolduser%40example.com";
NSString *expectedUrl = @"/a?_k=b8f68fe5004d29bcd21d3138b43ae755a16c12cf&_c=mobile_app&_u=kissmetrics-ios/2.2.0&_p=testnewuser%40example.com&_n=testolduser%40example.com";

XCTAssertEqualObjects(createdUrl, expectedUrl, @"URL incorrect");
}
Expand Down

0 comments on commit a1c9d10

Please sign in to comment.