diff --git a/CHANGELOG.md b/CHANGELOG.md index 81044862..70a65a4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +### Version 4.14.0 (18th June 2018) +#### Added +- Added deep link caching in case `appWillOpenUrl` method is called natively before SDK is initialised. + +#### Changed +- Updated the way how iOS native bridge handles push tokens from Unity interface - they are now being passed directly as strings to native iOS SDK. + +#### Native SDKs +- [iOS@v4.14.1][ios_sdk_v4.14.1] +- [Android@v4.14.0][android_sdk_v4.14.0] + +--- + ### Version 4.13.0 (15th May 2018) #### Added - Added `gdprForgetMe` method to `Adjust` interface to enable possibility for user to be forgotten in accordance with GDPR law. @@ -370,6 +383,7 @@ [ios_sdk_v4.12.1]: https://github.com/adjust/ios_sdk/tree/v4.12.1 [ios_sdk_v4.12.3]: https://github.com/adjust/ios_sdk/tree/v4.12.3 [ios_sdk_v4.13.0]: https://github.com/adjust/ios_sdk/tree/v4.13.0 +[ios_sdk_v4.14.1]: https://github.com/adjust/ios_sdk/tree/v4.14.1 [android_sdk_v3.5.0]: https://github.com/adjust/android_sdk/tree/v3.5.0 [android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0 @@ -386,3 +400,4 @@ [android_sdk_v4.12.1]: https://github.com/adjust/android_sdk/tree/v4.12.1 [android_sdk_v4.12.4]: https://github.com/adjust/android_sdk/tree/v4.12.4 [android_sdk_v4.13.0]: https://github.com/adjust/android_sdk/tree/v4.13.0 +[android_sdk_v4.14.0]: https://github.com/adjust/android_sdk/tree/v4.14.0 diff --git a/README.md b/README.md index 39e80a63..4d7f2c53 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is the Cordova SDK of Adjust™. You can read more about Adjust™ at [adjust.com]. -N.B. At the moment, SDK 4.13.0 for Cordova supports Android platform version `from 4.0.0 until 6.4.0` (more information about newer Android platforms can be found in [here](#cordova-android7.0.0)) and iOS platform version `3.0.0 and higher`. Windows platform is **not supported** at the moment. +N.B. At the moment, SDK 4.14.0 for Cordova supports Android platform version `from 4.0.0 until 6.4.0` (more information about newer Android platforms can be found in [here](#cordova-android7.0.0)) and iOS platform version `3.0.0 and higher`. Windows platform is **not supported** at the moment. ## Table of contents diff --git a/VERSION b/VERSION index 813b83b6..c412a4e2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.13.0 +4.14.0 diff --git a/doc/migrate.md b/doc/migrate.md index 7280497b..d7679adc 100644 --- a/doc/migrate.md +++ b/doc/migrate.md @@ -1,4 +1,4 @@ -## Migrate your adjust SDK for Cordova to 4.13.0 from 3.4.1 +## Migrate your adjust SDK for Cordova to 4.14.0 from 3.4.1 ### Migration procedure diff --git a/ext/Android/sdk b/ext/Android/sdk index 2602ae63..64ae4996 160000 --- a/ext/Android/sdk +++ b/ext/Android/sdk @@ -1 +1 @@ -Subproject commit 2602ae636f4077f6646e696889d528a0f0beb7ad +Subproject commit 64ae4996750cc51d090563447c059f1d81229f5d diff --git a/ext/iOS/sdk b/ext/iOS/sdk index ccfec7db..e207090e 160000 --- a/ext/iOS/sdk +++ b/ext/iOS/sdk @@ -1 +1 @@ -Subproject commit ccfec7dbfdefa73082b11d490f317ba48351159b +Subproject commit e207090eca74885dc1a68a67b868d8e954641ed5 diff --git a/package.json b/package.json index ba2903e1..af0700d8 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "version": "4.13.0", + "version": "4.14.0", "name": "com.adjust.sdk", "cordova_name": "Adjust SDK Cordova Plugin", - "description": "Cordova plugin for the Adjust SDK 4.13.0", + "description": "Cordova plugin for the Adjust SDK 4.14.0", "license": "MIT License", "platforms": [ "ios", diff --git a/plugin.xml b/plugin.xml index 13e13c68..fceda858 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="4.14.0"> Adjust Adjust plugin for Cordova diff --git a/src/Android/AdjustCordova.java b/src/Android/AdjustCordova.java index 4144cba7..4786146a 100644 --- a/src/Android/AdjustCordova.java +++ b/src/Android/AdjustCordova.java @@ -59,6 +59,7 @@ public class AdjustCordova extends CordovaPlugin private static final String KEY_SESSION_INTERVAL = "sessionIntervalInMilliseconds"; private static final String KEY_SUBSESSION_INTERVAL = "subsessionIntervalInMilliseconds"; private static final String KEY_TEARDOWN = "teardown"; + private static final String KEY_NO_BACKOFF_WAIT = "noBackoffWait"; private static final String KEY_HAS_CONTEXT = "hasContext"; private static final String COMMAND_CREATE = "create"; @@ -273,7 +274,7 @@ public boolean execute(String action, final JSONArray args, CallbackContext call String url = args.getString(0); final Uri uri = Uri.parse(url); - Adjust.appWillOpenUrl(uri); + Adjust.appWillOpenUrl(uri, this.cordova.getActivity().getApplicationContext()); return true; } else if (action.equals(COMMAND_ADD_SESSION_CALLBACK_PARAMETER)) { @@ -670,6 +671,15 @@ private void executeSetTestOptions(final JSONArray args) throws JSONException { } } + if (!jsonParameters.isNull(KEY_NO_BACKOFF_WAIT)) { + try { + boolean noBackoffWait = jsonParameters.getBoolean(KEY_NO_BACKOFF_WAIT); + testOptions.noBackoffWait = noBackoffWait; + } catch (JSONException e) { + AdjustFactory.getLogger().error("Unable to parse noBackoffWait"); + } + } + Adjust.setTestOptions(testOptions); } diff --git a/src/Android/adjust-android.jar b/src/Android/adjust-android.jar index 5bf34eff..f7aec449 100644 Binary files a/src/Android/adjust-android.jar and b/src/Android/adjust-android.jar differ diff --git a/src/iOS/AdjustCordova.m b/src/iOS/AdjustCordova.m index 5310be94..8e7e18fb 100644 --- a/src/iOS/AdjustCordova.m +++ b/src/iOS/AdjustCordova.m @@ -46,6 +46,7 @@ #define KEY_SESSION_INTERVAL @"sessionIntervalInMilliseconds" #define KEY_SUBSESSION_INTERVAL @"subsessionIntervalInMilliseconds" #define KEY_TEARDOWN @"teardown" +#define KEY_NO_BACKOFF_WAIT @"noBackoffWait" #define KEY_HAS_CONTEXT @"hasContext" @implementation AdjustCordova { @@ -296,7 +297,7 @@ - (void)setPushToken:(CDVInvokedUrlCommand *)command { return; } - [Adjust setDeviceToken:[token dataUsingEncoding:NSUTF8StringEncoding]]; + [Adjust setPushToken:token]; } - (void)appWillOpenUrl:(CDVInvokedUrlCommand *)command { @@ -462,6 +463,7 @@ - (void)setTestOptions:(CDVInvokedUrlCommand *)command { NSString *sessionInterval = [[command.arguments valueForKey:KEY_SESSION_INTERVAL] objectAtIndex:0]; NSString *subsessionInterval = [[command.arguments valueForKey:KEY_SUBSESSION_INTERVAL] objectAtIndex:0]; NSString *teardown = [[command.arguments valueForKey:KEY_TEARDOWN] objectAtIndex:0]; + NSString *noBackoffWait = [[command.arguments valueForKey:KEY_NO_BACKOFF_WAIT] objectAtIndex:0]; AdjustTestOptions * testOptions = [[AdjustTestOptions alloc] init]; @@ -500,6 +502,10 @@ - (void)setTestOptions:(CDVInvokedUrlCommand *)command { if ([self isFieldValid:teardown]) { testOptions.teardown = [teardown boolValue]; } + + if ([self isFieldValid:noBackoffWait]) { + testOptions.noBackoffWait = [noBackoffWait boolValue]; + } if ([self isFieldValid:hasContext]) { testOptions.deleteState = [hasContext boolValue]; diff --git a/src/iOS/AdjustSdk.framework/AdjustSdk b/src/iOS/AdjustSdk.framework/AdjustSdk index fc840a15..0caebb28 100644 Binary files a/src/iOS/AdjustSdk.framework/AdjustSdk and b/src/iOS/AdjustSdk.framework/AdjustSdk differ diff --git a/src/iOS/AdjustSdk.framework/Headers/Adjust.h b/src/iOS/AdjustSdk.framework/Headers/Adjust.h index d2fca9a1..a6fc0c5e 100644 --- a/src/iOS/AdjustSdk.framework/Headers/Adjust.h +++ b/src/iOS/AdjustSdk.framework/Headers/Adjust.h @@ -2,7 +2,7 @@ // Adjust.h // Adjust // -// V4.13.0 +// V4.14.1 // Created by Christian Wellenbrock (wellle) on 23rd July 2013. // Copyright © 2012-2017 Adjust GmbH. All rights reserved. // @@ -23,6 +23,7 @@ @property (nonatomic, copy, nullable) NSNumber *subsessionIntervalInMilliseconds; @property (nonatomic, assign) BOOL teardown; @property (nonatomic, assign) BOOL deleteState; +@property (nonatomic, assign) BOOL noBackoffWait; @end @@ -104,10 +105,18 @@ extern NSString * __nonnull const ADJEnvironmentProduction; /** * @brief Set the device token used by push notifications. * - * @param deviceToken Apple push notification token for iOS device. + * @param deviceToken Apple push notification token for iOS device as NSData. */ + (void)setDeviceToken:(nonnull NSData *)deviceToken; +/** + * @brief Set the device token used by push notifications. + * This method is only used by Adjust non native SDKs. Don't use it anywhere else. + * + * @param pushToken Apple push notification token for iOS device as NSString. + */ ++ (void)setPushToken:(nonnull NSString *)pushToken; + /** * @brief Enable or disable offline mode. Activities won't be sent but they are saved when * offline mode is disabled. This feature is not saved for future sessions. @@ -233,6 +242,8 @@ extern NSString * __nonnull const ADJEnvironmentProduction; - (void)setDeviceToken:(nonnull NSData *)deviceToken; +- (void)setPushToken:(nonnull NSString *)pushToken; + - (void)sendFirstPackages; - (void)trackSubsessionEnd; diff --git a/test_app/www/js/command_executor.js b/test_app/www/js/command_executor.js index f9020287..bcd13e3f 100644 --- a/test_app/www/js/command_executor.js +++ b/test_app/www/js/command_executor.js @@ -142,6 +142,10 @@ AdjustCommandExecutor.prototype.testOptions = function(params) { if ('subsessionInterval' in params) { testOptions.subsessionIntervalInMilliseconds = getFirstParameterValue(params, 'subsessionInterval').toString(); } + if ('noBackoffWait' in params) { + var noBackoffWait = getFirstParameterValue(params, 'noBackoffWait'); + testOptions.noBackoffWait = noBackoffWait == 'true'; + } if ('teardown' in params) { var teardownOptions = getValueFromKey(params, 'teardown'); for (var i = 0; i < teardownOptions.length; i++) { diff --git a/test_app/www/js/test_options.js b/test_app/www/js/test_options.js index 63a3c682..2b813fca 100644 --- a/test_app/www/js/test_options.js +++ b/test_app/www/js/test_options.js @@ -12,4 +12,5 @@ function AdjustTestOptions() { this.sessionIntervalInMilliseconds = null; this.subsessionIntervalInMilliseconds = null; this.teardown = null; + this.noBackoffWait = null; }; diff --git a/test_plugin/src/Android/AdjustTestingCordova.java b/test_plugin/src/Android/AdjustTestingCordova.java index 589274d8..ee67a063 100644 --- a/test_plugin/src/Android/AdjustTestingCordova.java +++ b/test_plugin/src/Android/AdjustTestingCordova.java @@ -55,7 +55,7 @@ public boolean execute(String action, final JSONArray args, CallbackContext call testLibrary.addTestDirectory(selectedTestDirs.get(i)); } - testLibrary.startTestSession("cordova4.13.0@android4.13.0"); + testLibrary.startTestSession("cordova4.14.0@android4.14.0"); return true; } else if (action.equals(COMMAND_ADD_INFO_TO_SEND)) { final String key = args.getString(0); diff --git a/test_plugin/src/iOS/AdjustTestLibrary.framework/Versions/A/AdjustTestLibrary b/test_plugin/src/iOS/AdjustTestLibrary.framework/Versions/A/AdjustTestLibrary index 93c4de32..958c82ca 100644 Binary files a/test_plugin/src/iOS/AdjustTestLibrary.framework/Versions/A/AdjustTestLibrary and b/test_plugin/src/iOS/AdjustTestLibrary.framework/Versions/A/AdjustTestLibrary differ diff --git a/test_plugin/src/iOS/AdjustTestingCordova.m b/test_plugin/src/iOS/AdjustTestingCordova.m index 66cf4fb0..765a214e 100644 --- a/test_plugin/src/iOS/AdjustTestingCordova.m +++ b/test_plugin/src/iOS/AdjustTestingCordova.m @@ -53,7 +53,7 @@ - (void)startTestSession:(CDVInvokedUrlCommand *)command { [self.testLibrary addTestDirectory:object]; } - [self.testLibrary startTestSession:@"cordova4.13.0@ios4.13.0"]; + [self.testLibrary startTestSession:@"cordova4.14.0@ios4.14.1"]; } - (void)addInfoToSend:(CDVInvokedUrlCommand *)command { diff --git a/www/adjust_config.js b/www/adjust_config.js index 55654c6a..7259c453 100644 --- a/www/adjust_config.js +++ b/www/adjust_config.js @@ -1,6 +1,6 @@ function AdjustConfig(appToken, environment) { // iOS & Android - this.sdkPrefix = "cordova4.13.0"; + this.sdkPrefix = "cordova4.14.0"; this.appToken = appToken; this.environment = environment;