diff --git a/Adjust.podspec b/Adjust.podspec index 4ae0d8c15..fe9b68406 100644 --- a/Adjust.podspec +++ b/Adjust.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |s| s.name = "Adjust" - s.version = "4.2.7" + s.version = "4.2.8" 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.7" } + s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.2.8" } s.platform = :ios, '4.3' s.framework = 'SystemConfiguration' s.weak_framework = 'AdSupport', 'iAd' diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 7210a57b2..59c120915 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -114,15 +114,13 @@ - (void)launchDeepLink:(NSDictionary *)jsonDict{ NSURL* deepLinkUrl = [NSURL URLWithString:deepLink]; - if (![[UIApplication sharedApplication] - canOpenURL:deepLinkUrl]) { - [self.logger error:@"Unable to open deep link (%@)", deepLink]; - return; - } - [self.logger info:@"Open deep link (%@)", deepLink]; - [[UIApplication sharedApplication] openURL:deepLinkUrl]; + BOOL success = [[UIApplication sharedApplication] openURL:deepLinkUrl]; + + if (!success) { + [self.logger error:@"Unable to open deep link (%@)", deepLink]; + } } - (void)setEnabled:(BOOL)enabled { diff --git a/Adjust/ADJDeviceInfo.h b/Adjust/ADJDeviceInfo.h index 60ff02ed9..f08a83f10 100644 --- a/Adjust/ADJDeviceInfo.h +++ b/Adjust/ADJDeviceInfo.h @@ -20,6 +20,7 @@ @property (nonatomic, copy) NSString *clientSdk; @property (nonatomic, copy) NSString *bundeIdentifier; @property (nonatomic, copy) NSString *bundleVersion; +@property (nonatomic, copy) NSString *bundleShortVersion; @property (nonatomic, copy) NSString *deviceType; @property (nonatomic, copy) NSString *deviceName; @property (nonatomic, copy) NSString *osName; diff --git a/Adjust/ADJDeviceInfo.m b/Adjust/ADJDeviceInfo.m index 4643e55e9..30e6b0a98 100644 --- a/Adjust/ADJDeviceInfo.m +++ b/Adjust/ADJDeviceInfo.m @@ -39,6 +39,7 @@ - (id) initWithSdkPrefix:(NSString *)sdkPrefix { self.vendorId = UIDevice.currentDevice.adjVendorId; self.bundeIdentifier = [infoDictionary objectForKey:(NSString *)kCFBundleIdentifierKey]; self.bundleVersion = [infoDictionary objectForKey:(NSString *)kCFBundleVersionKey]; + self.bundleShortVersion = [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; self.languageCode = [locale objectForKey:NSLocaleLanguageCode]; self.countryCode = [locale objectForKey:NSLocaleCountryCode]; self.osName = @"ios"; @@ -69,6 +70,7 @@ -(id)copyWithZone:(NSZone *)zone copy.clientSdk = [self.clientSdk copyWithZone:zone]; copy.bundeIdentifier = [self.bundeIdentifier copyWithZone:zone]; copy.bundleVersion = [self.bundleVersion copyWithZone:zone]; + copy.bundleShortVersion = [self.bundleShortVersion copyWithZone:zone]; copy.deviceType = [self.deviceType copyWithZone:zone]; copy.deviceName = [self.deviceName copyWithZone:zone]; copy.osName = [self.osName copyWithZone:zone]; diff --git a/Adjust/ADJPackageBuilder.m b/Adjust/ADJPackageBuilder.m index de5a56724..5e753a297 100644 --- a/Adjust/ADJPackageBuilder.m +++ b/Adjust/ADJPackageBuilder.m @@ -95,10 +95,10 @@ - (ADJActivityPackage *)buildClickPackage:(NSString *)clickSource [self parameters:parameters setDate:self.purchaseTime forKey:@"purchase_time"]; if (self.attribution != nil) { - [self parameters:parameters setString:self.attribution.trackerName forKey:@"tracker"]; - [self parameters:parameters setString:self.attribution.campaign forKey:@"campaign"]; - [self parameters:parameters setString:self.attribution.adgroup forKey:@"adgroup"]; - [self parameters:parameters setString:self.attribution.creative forKey:@"creative"]; + [self parameters:parameters setString:self.attribution.trackerName forKey:@"tracker"]; + [self parameters:parameters setString:self.attribution.campaign forKey:@"campaign"]; + [self parameters:parameters setString:self.attribution.adgroup forKey:@"adgroup"]; + [self parameters:parameters setString:self.attribution.creative forKey:@"creative"]; } ADJActivityPackage *clickPackage = [self defaultActivityPackage]; @@ -179,6 +179,7 @@ - (void) injectDeviceInfo:(ADJDeviceInfo *)deviceInfo [self parameters:parameters setString:deviceInfo.pushToken forKey:@"push_token"]; [self parameters:parameters setString:deviceInfo.bundeIdentifier forKey:@"bundle_id"]; [self parameters:parameters setString:deviceInfo.bundleVersion forKey:@"app_version"]; + [self parameters:parameters setString:deviceInfo.bundleShortVersion forKey:@"app_version_short"]; [self parameters:parameters setString:deviceInfo.deviceType forKey:@"device_type"]; [self parameters:parameters setString:deviceInfo.deviceName forKey:@"device_name"]; [self parameters:parameters setString:deviceInfo.osName forKey:@"os_name"]; diff --git a/Adjust/ADJTimerOnce.m b/Adjust/ADJTimerOnce.m index bd1041e81..1cae53c6a 100644 --- a/Adjust/ADJTimerOnce.m +++ b/Adjust/ADJTimerOnce.m @@ -52,7 +52,7 @@ - (NSTimeInterval)fireIn { - (void)startIn:(NSTimeInterval)startIn { - self.fireDate = [[NSDate date] initWithTimeIntervalSinceNow:startIn]; + self.fireDate = [[NSDate alloc] initWithTimeIntervalSinceNow:startIn]; if (self.source != nil) { dispatch_cancel(self.source); diff --git a/Adjust/ADJUtil.m b/Adjust/ADJUtil.m index 668e33f9a..cd1e3d6e7 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.2.7"; +static NSString * const kClientSdk = @"ios4.2.8"; static NSString * const kDateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'Z"; static NSDateFormatter *dateFormat; diff --git a/AdjustTests/ADJPackageFields.m b/AdjustTests/ADJPackageFields.m index 14f1b743a..82d228fac 100644 --- a/AdjustTests/ADJPackageFields.m +++ b/AdjustTests/ADJPackageFields.m @@ -16,7 +16,7 @@ - (id) init { // default values self.appToken = @"123456789012"; - self.clientSdk = @"ios4.2.7"; + self.clientSdk = @"ios4.2.8"; self.suffix = @""; self.environment = @"sandbox"; diff --git a/README.md b/README.md index 852a66ea7..8d62615a2 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.2.7' +pod 'Adjust', :git => 'git://github.com/adjust/ios_sdk.git', :tag => 'v4.2.8' ``` ### 1. Get the SDK @@ -343,7 +343,27 @@ You can check if the adjust SDK is currently enabled by calling the function `isEnabled`. It is always possible to activate the adjust SDK by invoking `setEnabled` with the enabled parameter as `YES`. -### 11. Partner parameters +### 11. Offline mode + +You can put the adjust SDK in offline mode to suspend transmission to our servers, +while retaining tracked data to be sent later. While in offline mode, all information is saved +in a file, so be careful not to trigger too many events while in offline mode. + +You can activate offline mode by calling `setOfflineMode` with the parameter `YES`. + +```objc +[Adjust setOfflineMode:YES]; +``` + +Conversely, you can deactivate offline mode by calling `setOfflineMode` with `NO`. +When the adjust SDK is put back in online mode, all saved information is send to our servers +with the correct time information. + +Unlike disabling tracking, this setting is *not remembered* +bettween sessions. This means that the SDK is in online mode whenever it is started, +even if the app was terminated in offline mode. + +### 12. Partner parameters You can also add parameters to be transmitted to network partners, for the integrations that have been activated in your adjust dashboard. diff --git a/VERSION b/VERSION index 4739c61f1..ad9e446d8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.7 +4.2.8 diff --git a/doc/migrate.md b/doc/migrate.md index b9d8116df..d942ff98b 100644 --- a/doc/migrate.md +++ b/doc/migrate.md @@ -1,4 +1,4 @@ -## Migrate your adjust SDK for iOS to v4.2.7 from v3.4.0 +## Migrate your adjust SDK for iOS to v4.2.8 from v3.4.0 ### Initial setup