Skip to content

Commit

Permalink
Merge pull request #76 from adjust/v4140
Browse files Browse the repository at this point in the history
Version 4.14.0
  • Loading branch information
uerceg committed Jun 18, 2018
2 parents 88cea5c + 8c06403 commit 9480961
Show file tree
Hide file tree
Showing 19 changed files with 62 additions and 15 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.13.0
4.14.0
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 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

Expand Down
2 changes: 1 addition & 1 deletion ext/Android/sdk
Submodule sdk updated 41 files
+1 −1 Adjust/adjust/build.gradle
+26 −0 Adjust/adjust/src/main/java/com/adjust/sdk/ActivityHandler.java
+15 −1 Adjust/adjust/src/main/java/com/adjust/sdk/Adjust.java
+21 −0 Adjust/adjust/src/main/java/com/adjust/sdk/AdjustInstance.java
+1 −0 Adjust/adjust/src/main/java/com/adjust/sdk/AdjustTestOptions.java
+1 −1 Adjust/adjust/src/main/java/com/adjust/sdk/Constants.java
+52 −0 Adjust/adjust/src/main/java/com/adjust/sdk/SharedPreferencesManager.java
+31 −0 Adjust/example-tv/build.gradle
+17 −0 Adjust/example-tv/proguard-rules.pro
+13 −0 Adjust/example-tv/src/androidTest/java/com/adjust/examples/ApplicationTest.java
+46 −0 Adjust/example-tv/src/main/AndroidManifest.xml
+176 −0 Adjust/example-tv/src/main/java/com/adjust/examples/GlobalApplication.java
+113 −0 Adjust/example-tv/src/main/java/com/adjust/examples/MainActivity.java
+117 −0 Adjust/example-tv/src/main/res/layout/activity_main.xml
+ Adjust/example-tv/src/main/res/mipmap-hdpi/ic_launcher.png
+ Adjust/example-tv/src/main/res/mipmap-mdpi/ic_launcher.png
+ Adjust/example-tv/src/main/res/mipmap-xhdpi/ic_launcher.png
+ Adjust/example-tv/src/main/res/mipmap-xxhdpi/ic_launcher.png
+6 −0 Adjust/example-tv/src/main/res/values-w820dp/dimens.xml
+5 −0 Adjust/example-tv/src/main/res/values/dimens.xml
+19 −0 Adjust/example-tv/src/main/res/values/strings.xml
+5 −0 Adjust/example-tv/src/main/res/values/styles.xml
+1 −1 Adjust/example/build.gradle
+1 −1 Adjust/example/src/main/java/com/adjust/examples/MainActivity.java
+1 −1 Adjust/example/src/main/java/com/adjust/examples/ServiceActivity.java
+1 −1 Adjust/pom.xml
+1 −1 Adjust/pom_criteo.xml
+1 −1 Adjust/pom_sociomantic.xml
+1 −1 Adjust/pom_trademob.xml
+1 −1 Adjust/settings.gradle
+1 −1 Adjust/test/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java
+8 −1 Adjust/testapp/src/main/java/com/adjust/testapp/AdjustCommandExecutor.java
+2 −2 Adjust/testapp/src/main/java/com/adjust/testapp/MainActivity.java
+10 −1 CHANGELOG.md
+12 −9 README.md
+1 −1 VERSION
+0 −184 checkstyle/adjust_checks.xml
+1 −1 doc/english/criteo_plugin.md
+1 −1 doc/english/migrate.md
+1 −1 doc/english/sociomantic_plugin.md
+1 −1 doc/english/trademob_plugin.md
2 changes: 1 addition & 1 deletion ext/iOS/sdk
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.adjust.sdk"
version="4.13.0">
version="4.14.0">

<name>Adjust</name>
<description>Adjust plugin for Cordova</description>
Expand Down
12 changes: 11 additions & 1 deletion src/Android/AdjustCordova.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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);
}

Expand Down
Binary file modified src/Android/adjust-android.jar
Binary file not shown.
8 changes: 7 additions & 1 deletion src/iOS/AdjustCordova.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -296,7 +297,7 @@ - (void)setPushToken:(CDVInvokedUrlCommand *)command {
return;
}

[Adjust setDeviceToken:[token dataUsingEncoding:NSUTF8StringEncoding]];
[Adjust setPushToken:token];
}

- (void)appWillOpenUrl:(CDVInvokedUrlCommand *)command {
Expand Down Expand Up @@ -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];

Expand Down Expand Up @@ -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];
Expand Down
Binary file modified src/iOS/AdjustSdk.framework/AdjustSdk
Binary file not shown.
15 changes: 13 additions & 2 deletions src/iOS/AdjustSdk.framework/Headers/Adjust.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -233,6 +242,8 @@ extern NSString * __nonnull const ADJEnvironmentProduction;

- (void)setDeviceToken:(nonnull NSData *)deviceToken;

- (void)setPushToken:(nonnull NSString *)pushToken;

- (void)sendFirstPackages;

- (void)trackSubsessionEnd;
Expand Down
4 changes: 4 additions & 0 deletions test_app/www/js/command_executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
1 change: 1 addition & 0 deletions test_app/www/js/test_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ function AdjustTestOptions() {
this.sessionIntervalInMilliseconds = null;
this.subsessionIntervalInMilliseconds = null;
this.teardown = null;
this.noBackoffWait = null;
};
2 changes: 1 addition & 1 deletion test_plugin/src/Android/AdjustTestingCordova.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion test_plugin/src/iOS/AdjustTestingCordova.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion www/adjust_config.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 9480961

Please sign in to comment.