Skip to content

Commit

Permalink
Merge pull request #32 from adjust/v4171
Browse files Browse the repository at this point in the history
Version 4.17.1
  • Loading branch information
uerceg authored Mar 22, 2019
2 parents 822318d + 0adb252 commit 65321eb
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 20 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### Version 4.17.1 (22nd March 2019)
#### Added
- Added support for `Cocos2d-x v2.2.6`.

#### Native SDKs
- [[email protected]][ios_sdk_v4.17.2]
- [[email protected]][android_sdk_v4.17.0]

---

### Version 4.17.0 (18th January 2019)
#### Added
- Added `getSdkVersion` method to `Adjust2dx` interface to obtain current SDK version string.
Expand Down Expand Up @@ -268,6 +278,7 @@
[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
[ios_sdk_v4.17.1]: https://github.com/adjust/ios_sdk/tree/v4.17.1
[ios_sdk_v4.17.2]: https://github.com/adjust/ios_sdk/tree/v4.17.2

[android_sdk_v4.0.8]: https://github.com/adjust/android_sdk/tree/v4.0.8
[android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.17.0
4.17.1
11 changes: 6 additions & 5 deletions dist/Adjust2dx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#include "Adjust2dx.h"
#include <stdlib.h>

#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include <jni.h>
Expand All @@ -27,7 +28,7 @@ void Adjust2dx::start(AdjustConfig2dx adjustConfig) {
}
jmiOnCreate.env->CallStaticVoidMethod(jmiOnCreate.classID, jmiOnCreate.methodID, adjustConfig.getConfig());
onResume();
cocos2d::JniHelper::getEnv()->DeleteGlobalRef(adjustConfig.getConfig());
jmiOnCreate.env->DeleteGlobalRef(adjustConfig.getConfig());
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
ADJAdjust2dx::appDidLaunch(adjustConfig.getConfig());
onResume();
Expand Down Expand Up @@ -588,7 +589,7 @@ jobject getTestOptions(std::map<std::string, std::string> testOptions) {

// Timer interval in milliseconds.
if (testOptions.find("timerIntervalInMilliseconds") != testOptions.end()) {
long timerIntervalInMilliseconds = std::stol (testOptions["timerIntervalInMilliseconds"]);
long timerIntervalInMilliseconds = atol(testOptions["timerIntervalInMilliseconds"].c_str());
jlong jTimerIntervalInMilliseconds = (jlong)(timerIntervalInMilliseconds);
jobject jTimerIntervalInMillisecondsObj = jmiInitLong.env->NewObject(clsLong, midInitLong, jTimerIntervalInMilliseconds);
jfieldID jfidTimerIntervalInMilliseconds = jmiInit.env->GetFieldID(jclsTestOptions, "timerIntervalInMilliseconds", "Ljava/lang/Long;");
Expand All @@ -598,7 +599,7 @@ jobject getTestOptions(std::map<std::string, std::string> testOptions) {

// Timer start in milliseconds.
if (testOptions.find("timerStartInMilliseconds") != testOptions.end()) {
long timerStartInMilliseconds = std::stol (testOptions["timerStartInMilliseconds"]);
long timerStartInMilliseconds = atol(testOptions["timerStartInMilliseconds"].c_str());
jlong jTimerStartInMilliseconds = (jlong)(timerStartInMilliseconds);
jobject jTimerStartInMillisecondsObj = jmiInitLong.env->NewObject(clsLong, midInitLong, jTimerStartInMilliseconds);
jfieldID jfidTimerStartInMilliseconds = jmiInit.env->GetFieldID(jclsTestOptions, "timerStartInMilliseconds", "Ljava/lang/Long;");
Expand All @@ -608,7 +609,7 @@ jobject getTestOptions(std::map<std::string, std::string> testOptions) {

// Session interval in milliseconds.
if (testOptions.find("sessionIntervalInMilliseconds") != testOptions.end()) {
long sessionIntervalInMilliseconds = std::stol (testOptions["sessionIntervalInMilliseconds"]);
long sessionIntervalInMilliseconds = atol(testOptions["sessionIntervalInMilliseconds"].c_str());
jlong jSessionIntervalInMilliseconds = (jlong)(sessionIntervalInMilliseconds);
jobject jSessionIntervalInMillisecondsObj = jmiInitLong.env->NewObject(clsLong, midInitLong, jSessionIntervalInMilliseconds);
jfieldID jfidSessionIntervalInMilliseconds = jmiInit.env->GetFieldID(jclsTestOptions, "sessionIntervalInMilliseconds", "Ljava/lang/Long;");
Expand All @@ -618,7 +619,7 @@ jobject getTestOptions(std::map<std::string, std::string> testOptions) {

// Sub-session interval in milliseconds.
if (testOptions.find("subsessionIntervalInMilliseconds") != testOptions.end()) {
long subsessionIntervalInMilliseconds = std::stol (testOptions["subsessionIntervalInMilliseconds"]);
long subsessionIntervalInMilliseconds = atol(testOptions["subsessionIntervalInMilliseconds"].c_str());
jlong jSubsessionIntervalInMilliseconds = (jlong)(subsessionIntervalInMilliseconds);
jobject jSubsessionIntervalInMillisecondsObj = jmiInitLong.env->NewObject(clsLong, midInitLong, jSubsessionIntervalInMilliseconds);
jfieldID jfidSubsessionIntervalInMilliseconds = jmiInit.env->GetFieldID(jclsTestOptions, "subsessionIntervalInMilliseconds", "Ljava/lang/Long;");
Expand Down
4 changes: 2 additions & 2 deletions dist/AdjustConfig2dx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "AdjustConfig2dx.h"
USING_NS_CC;

const std::string AdjustSdkPrefix2dx = "cocos2d-x4.17.0";
const std::string AdjustSdkPrefix2dx = "cocos2d-x4.17.1";

void AdjustConfig2dx::initConfig(std::string appToken, std::string environment, bool allowSuppressLogLevel) {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
Expand All @@ -39,7 +39,7 @@ void AdjustConfig2dx::initConfig(std::string appToken, std::string environment,
jstring jAppToken = jmiInit.env->NewStringUTF(appToken.c_str());
jstring jEnvironment = jmiInit.env->NewStringUTF(environment.c_str());
jobject tmp = jmiInit.env->NewObject(jclsAdjustConfig, jmidInit, jContext, jAppToken, jEnvironment, allowSuppressLogLevel);
this->config = cocos2d::JniHelper::getEnv()->NewGlobalRef(tmp);
this->config = jmiInit.env->NewGlobalRef(tmp);
jmiGetContext.env->DeleteLocalRef(jContext);
jmiInit.env->DeleteLocalRef(jAppToken);
jmiInit.env->DeleteLocalRef(jEnvironment);
Expand Down
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 Cocos2d-x to 4.17.0 from 4.0.x
## Migrate your adjust SDK for Cocos2d-x to 4.17.1 from 4.0.x

### SDK initialization

Expand Down
Binary file modified ext/android/proxy/adjust-android.jar
Binary file not shown.
Binary file modified ext/android/proxy/adjust-test.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion ext/android/sdk
Submodule sdk updated 34 files
+1 −1 Adjust/build.gradle
+1 −0 Adjust/example-app-kotlin/.gitignore
+40 −0 Adjust/example-app-kotlin/build.gradle
+29 −0 Adjust/example-app-kotlin/proguard-rules.pro
+24 −0 Adjust/example-app-kotlin/src/androidTest/java/com/adjust/examples/ExampleInstrumentedTest.kt
+54 −0 Adjust/example-app-kotlin/src/main/AndroidManifest.xml
+143 −0 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/GlobalApplication.kt
+144 −0 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/MainActivity.kt
+30 −0 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/ServiceActivity.kt
+69 −0 Adjust/example-app-kotlin/src/main/java/com/adjust/examples/ServiceExample.kt
+130 −0 Adjust/example-app-kotlin/src/main/res/layout/activity_main.xml
+29 −0 Adjust/example-app-kotlin/src/main/res/layout/activity_service.xml
+10 −0 Adjust/example-app-kotlin/src/main/res/menu/menu_main.xml
+ Adjust/example-app-kotlin/src/main/res/mipmap-hdpi/ic_launcher.png
+ Adjust/example-app-kotlin/src/main/res/mipmap-mdpi/ic_launcher.png
+ Adjust/example-app-kotlin/src/main/res/mipmap-xhdpi/ic_launcher.png
+ Adjust/example-app-kotlin/src/main/res/mipmap-xxhdpi/ic_launcher.png
+6 −0 Adjust/example-app-kotlin/src/main/res/values-w820dp/dimens.xml
+5 −0 Adjust/example-app-kotlin/src/main/res/values/dimens.xml
+22 −0 Adjust/example-app-kotlin/src/main/res/values/strings.xml
+8 −0 Adjust/example-app-kotlin/src/main/res/values/styles.xml
+17 −0 Adjust/example-app-kotlin/src/test/java/com/adjust/examples/ExampleUnitTest.kt
+141 −1 Adjust/sdk-core/build.gradle
+29 −0 Adjust/sdk-core/proguard-rules.pro
+10 −0 Adjust/sdk-plugin-criteo/build.gradle
+10 −0 Adjust/sdk-plugin-imei/build.gradle
+10 −0 Adjust/sdk-plugin-sociomantic/build.gradle
+10 −0 Adjust/sdk-plugin-trademob/build.gradle
+10 −0 Adjust/sdk-plugin-webbridge/build.gradle
+1 −1 Adjust/settings.gradle
+3 −2 README.md
+1 −1 doc/chinese/README.md
+2 −2 doc/english/web_views.md
+1 −1 doc/korean/README.md
Binary file modified libs/android/adjust-android.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions libs/ios/AdjustSdk.framework/Modules/module.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
framework module AdjustSdk {
umbrella header "Adjust.h"

export *
module * { export * }
}
Binary file modified libs/ios/AdjustSdk.framework/Versions/A/AdjustSdk
Binary file not shown.
2 changes: 1 addition & 1 deletion libs/ios/AdjustSdk.framework/Versions/A/Headers/Adjust.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Adjust.h
// Adjust
//
// V4.17.1
// V4.17.2
// Created by Christian Wellenbrock (wellle) on 23rd July 2013.
// Copyright © 2012-2017 Adjust GmbH. All rights reserved.
//
Expand Down
11 changes: 6 additions & 5 deletions src/Adjust2dx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#include "Adjust2dx.h"
#include <stdlib.h>

#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include <jni.h>
Expand All @@ -27,7 +28,7 @@ void Adjust2dx::start(AdjustConfig2dx adjustConfig) {
}
jmiOnCreate.env->CallStaticVoidMethod(jmiOnCreate.classID, jmiOnCreate.methodID, adjustConfig.getConfig());
onResume();
cocos2d::JniHelper::getEnv()->DeleteGlobalRef(adjustConfig.getConfig());
jmiOnCreate.env->DeleteGlobalRef(adjustConfig.getConfig());
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
ADJAdjust2dx::appDidLaunch(adjustConfig.getConfig());
onResume();
Expand Down Expand Up @@ -588,7 +589,7 @@ jobject getTestOptions(std::map<std::string, std::string> testOptions) {

// Timer interval in milliseconds.
if (testOptions.find("timerIntervalInMilliseconds") != testOptions.end()) {
long timerIntervalInMilliseconds = std::stol (testOptions["timerIntervalInMilliseconds"]);
long timerIntervalInMilliseconds = atol(testOptions["timerIntervalInMilliseconds"].c_str());
jlong jTimerIntervalInMilliseconds = (jlong)(timerIntervalInMilliseconds);
jobject jTimerIntervalInMillisecondsObj = jmiInitLong.env->NewObject(clsLong, midInitLong, jTimerIntervalInMilliseconds);
jfieldID jfidTimerIntervalInMilliseconds = jmiInit.env->GetFieldID(jclsTestOptions, "timerIntervalInMilliseconds", "Ljava/lang/Long;");
Expand All @@ -598,7 +599,7 @@ jobject getTestOptions(std::map<std::string, std::string> testOptions) {

// Timer start in milliseconds.
if (testOptions.find("timerStartInMilliseconds") != testOptions.end()) {
long timerStartInMilliseconds = std::stol (testOptions["timerStartInMilliseconds"]);
long timerStartInMilliseconds = atol(testOptions["timerStartInMilliseconds"].c_str());
jlong jTimerStartInMilliseconds = (jlong)(timerStartInMilliseconds);
jobject jTimerStartInMillisecondsObj = jmiInitLong.env->NewObject(clsLong, midInitLong, jTimerStartInMilliseconds);
jfieldID jfidTimerStartInMilliseconds = jmiInit.env->GetFieldID(jclsTestOptions, "timerStartInMilliseconds", "Ljava/lang/Long;");
Expand All @@ -608,7 +609,7 @@ jobject getTestOptions(std::map<std::string, std::string> testOptions) {

// Session interval in milliseconds.
if (testOptions.find("sessionIntervalInMilliseconds") != testOptions.end()) {
long sessionIntervalInMilliseconds = std::stol (testOptions["sessionIntervalInMilliseconds"]);
long sessionIntervalInMilliseconds = atol(testOptions["sessionIntervalInMilliseconds"].c_str());
jlong jSessionIntervalInMilliseconds = (jlong)(sessionIntervalInMilliseconds);
jobject jSessionIntervalInMillisecondsObj = jmiInitLong.env->NewObject(clsLong, midInitLong, jSessionIntervalInMilliseconds);
jfieldID jfidSessionIntervalInMilliseconds = jmiInit.env->GetFieldID(jclsTestOptions, "sessionIntervalInMilliseconds", "Ljava/lang/Long;");
Expand All @@ -618,7 +619,7 @@ jobject getTestOptions(std::map<std::string, std::string> testOptions) {

// Sub-session interval in milliseconds.
if (testOptions.find("subsessionIntervalInMilliseconds") != testOptions.end()) {
long subsessionIntervalInMilliseconds = std::stol (testOptions["subsessionIntervalInMilliseconds"]);
long subsessionIntervalInMilliseconds = atol(testOptions["subsessionIntervalInMilliseconds"].c_str());
jlong jSubsessionIntervalInMilliseconds = (jlong)(subsessionIntervalInMilliseconds);
jobject jSubsessionIntervalInMillisecondsObj = jmiInitLong.env->NewObject(clsLong, midInitLong, jSubsessionIntervalInMilliseconds);
jfieldID jfidSubsessionIntervalInMilliseconds = jmiInit.env->GetFieldID(jclsTestOptions, "subsessionIntervalInMilliseconds", "Ljava/lang/Long;");
Expand Down
4 changes: 2 additions & 2 deletions src/AdjustConfig2dx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "AdjustConfig2dx.h"
USING_NS_CC;

const std::string AdjustSdkPrefix2dx = "cocos2d-x4.17.0";
const std::string AdjustSdkPrefix2dx = "cocos2d-x4.17.1";

void AdjustConfig2dx::initConfig(std::string appToken, std::string environment, bool allowSuppressLogLevel) {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
Expand All @@ -39,7 +39,7 @@ void AdjustConfig2dx::initConfig(std::string appToken, std::string environment,
jstring jAppToken = jmiInit.env->NewStringUTF(appToken.c_str());
jstring jEnvironment = jmiInit.env->NewStringUTF(environment.c_str());
jobject tmp = jmiInit.env->NewObject(jclsAdjustConfig, jmidInit, jContext, jAppToken, jEnvironment, allowSuppressLogLevel);
this->config = cocos2d::JniHelper::getEnv()->NewGlobalRef(tmp);
this->config = jmiInit.env->NewGlobalRef(tmp);
jmiGetContext.env->DeleteLocalRef(jContext);
jmiInit.env->DeleteLocalRef(jAppToken);
jmiInit.env->DeleteLocalRef(jEnvironment);
Expand Down
2 changes: 1 addition & 1 deletion test/app/Classes/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ std::vector<std::string> Command::getParameters(std::string parameterKey) {
std::string Command::getFirstParameterValue(std::string parameterKey) {
std::vector<std::string> parameterValues = this->parameters[parameterKey];
if (parameterValues.size() == 0) {
return NULL;
return "";
}
return parameterValues[0];
}
Expand Down
Binary file modified test/libs/android/adjust-test.jar
Binary file not shown.
Binary file not shown.

0 comments on commit 65321eb

Please sign in to comment.