Skip to content

Commit

Permalink
Merge pull request #108 from adjust/xamarin_fix
Browse files Browse the repository at this point in the history
Xamarin fix
  • Loading branch information
nonelse committed May 12, 2015
2 parents 87653c8 + 0bd94e4 commit 0742960
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
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.2.3"
s.version = "4.2.4"
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.2.3" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.2.4" }
s.platform = :ios, '4.3'
s.framework = 'SystemConfiguration'
s.weak_framework = 'AdSupport', 'iAd'
Expand Down
11 changes: 8 additions & 3 deletions Adjust/ADJConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ + (ADJConfig *) configWithAppToken:(NSString *)appToken
- (id) initWithAppToken:(NSString *)appToken
environment:(NSString *)environment
{
if (![self checkAppToken:appToken]) return nil;
if (![self checkEnvironment:environment logAssert:YES]) return nil;
if (![self checkAppToken:appToken]) return self;
if (![self checkEnvironment:environment logAssert:YES]) return self;

return [self initWithoutCheckAppToken:appToken environment:environment];
return [self initSelfWithAppToken:appToken environment:environment];
}

- (id) initWithoutCheckAppToken:(NSString *)appToken
Expand All @@ -32,6 +32,11 @@ - (id) initWithoutCheckAppToken:(NSString *)appToken
self = [super init];
if (self == nil) return nil;

return [self initSelfWithAppToken:appToken environment:environment];
}

- (id) initSelfWithAppToken:(NSString *)appToken
environment:(NSString *)environment {
_appToken = appToken;
_environment = environment;

Expand Down
2 changes: 1 addition & 1 deletion Adjust/ADJEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ - (id) initWithEventToken:(NSString *)eventToken {

self.logger = ADJAdjustFactory.logger;

if (![self checkEventToken:eventToken]) return nil;
if (![self checkEventToken:eventToken]) return self;

_eventToken = eventToken;

Expand Down
2 changes: 1 addition & 1 deletion Adjust/ADJUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <sys/xattr.h>

static NSString * const kBaseUrl = @"https://app.adjust.com";
static NSString * const kClientSdk = @"ios4.2.3";
static NSString * const kClientSdk = @"ios4.2.4";

static NSString * const kDateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'Z";
static NSDateFormatter *dateFormat;
Expand Down
13 changes: 7 additions & 6 deletions AdjustTests/ADJActivityHandlerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ - (void)testFirstRun
ADJActivityPackage *activityPackage = (ADJActivityPackage *) self.packageHandlerMock.packageQueue[0];

// check the Sdk version is being tested
XCTAssertEqual(@"ios4.2.3", activityPackage.clientSdk, @"%@", activityPackage.extendedString);
XCTAssertEqual(@"ios4.2.4", activityPackage.clientSdk, @"%@", activityPackage.extendedString);

// check the server url
XCTAssertEqual(@"https://app.adjust.com", ADJUtil.baseUrl);
Expand Down Expand Up @@ -583,15 +583,16 @@ - (void)testChecks {

// create the config with null app token
ADJConfig * nilAppTokenConfig = [ADJConfig configWithAppToken:nil environment:ADJEnvironmentSandbox];
XCTAssertNil(nilAppTokenConfig, @"%@", self.loggerMock);
XCTAssertFalse(nilAppTokenConfig.isValid, @"%@", self.loggerMock);


// create the config with size diferent than 12
ADJConfig * sizeAppTokenConfig = [ADJConfig configWithAppToken:@"1234567890123" environment:ADJEnvironmentSandbox];
XCTAssertNil(sizeAppTokenConfig, @"%@", self.loggerMock);
XCTAssertFalse(sizeAppTokenConfig.isValid, @"%@", self.loggerMock);

// create the config with environment not standart
ADJConfig * environmentConfig = [ADJConfig configWithAppToken:@"123456789012" environment:@"other"];
XCTAssertNil(environmentConfig, @"%@", self.loggerMock);
XCTAssertFalse(environmentConfig.isValid, @"%@", self.loggerMock);

// activity handler created with a nil config
id<ADJActivityHandler> nilConfigActivityHandler = [ADJActivityHandler handlerWithConfig:nil];
Expand All @@ -607,11 +608,11 @@ - (void)testChecks {

// event with nil token
ADJEvent * nilTokenEvent = [ADJEvent eventWithEventToken:nil];
XCTAssertNil(nilTokenEvent, @"%@", self.loggerMock);
XCTAssertFalse(nilTokenEvent.isValid, @"%@", self.loggerMock);

// event with malformed token
ADJEvent * malformedTokenEvent = [ADJEvent eventWithEventToken:@"event1x"];
XCTAssertNil(malformedTokenEvent, @"%@", self.loggerMock);
XCTAssertFalse(malformedTokenEvent.isValid, @"%@", self.loggerMock);

// create the first Event object
ADJEvent * firstEvent = [ADJEvent eventWithEventToken:@"event1"];
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.3'
pod 'Adjust', :git => 'git://github.com/adjust/ios_sdk.git', :tag => 'v4.2.4'
```

### 1. Get the SDK
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.3
4.2.4
2 changes: 1 addition & 1 deletion doc/migrate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Migrate your adjust SDK for iOS to v4.2.3 from v3.4.0
## Migrate your adjust SDK for iOS to v4.2.4 from v3.4.0

### Initial setup

Expand Down

0 comments on commit 0742960

Please sign in to comment.