appsflyersdk / appsflyer-cocos2dx-plugin Goto Github PK
View Code? Open in Web Editor NEWAppsFlyer Cocos2dX plugin
AppsFlyer Cocos2dX plugin
Task :NinjaShadow2:lintVitalRelease
e: C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.6.10/e80fe6ac3c3573a80305f5ec43f86b829e8ab53d/kotlin-stdlib-jdk8-1.6.10.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.10/e1c380673654a089c4f0c9f83d0ddfdc1efdb498/kotlin-stdlib-jdk7-1.6.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.10/b8af3fe6f1ca88526914929add63cf5e7c5049af/kotlin-stdlib-1.6.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
e: C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.10/c118700e3a33c8a0d9adc920e9dec0831171925/kotlin-stdlib-common-1.6.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.6.10/e80fe6ac3c3573a80305f5ec43f86b829e8ab53d/kotlin-stdlib-jdk8-1.6.10.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.6.10/e1c380673654a089c4f0c9f83d0ddfdc1efdb498/kotlin-stdlib-jdk7-1.6.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.10/b8af3fe6f1ca88526914929add63cf5e7c5049af/kotlin-stdlib-1.6.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
C:/Users/admin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.10/c118700e3a33c8a0d9adc920e9dec0831171925/kotlin-stdlib-common-1.6.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
Hi,
I was using validateAndTrackInAppPurchase
but saw an error in the code and also that params blocks are not passed in the following blocks and causes BAD_ACCESS.
void AppsFlyerX::validateAndTrackInAppPurchase(const std::string& productIdentifier,
const std::string& price,
const std::string& currency,
const std::string& tranactionId,
cocos2d::ValueMap params,
std::function<void(cocos2d::ValueMap)> successBlock,
std::function<void(cocos2d::ValueMap)> failureBlock) {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
// Not supported for Android
CCLOGWARN("%s", "validateAndTrackInAppPurchase is not supported for Android.");
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
AppsFlyerXApple::validateAndTrackInAppPurchase(productIdentifier, price, currency, tranactionId, params, [&](cocos2d::ValueMap result) {
successBlock(result);
}, [&] (cocos2d::ValueMap error) {
successBlock(error);
});
#endif
}
The following code fixes the issues:
successBlock
by failureBlock
in error blocksuccessBlock
and failureBlock
in params of lambda:void AppsFlyerX::validateAndTrackInAppPurchase(const std::string& productIdentifier,
const std::string& price,
const std::string& currency,
const std::string& tranactionId,
cocos2d::ValueMap params,
std::function<void(cocos2d::ValueMap)> successBlock,
std::function<void(cocos2d::ValueMap)> failureBlock) {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
// Not supported for Android
CCLOGWARN("%s", "validateAndTrackInAppPurchase is not supported for Android.");
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
AppsFlyerXApple::validateAndTrackInAppPurchase(productIdentifier, price, currency, tranactionId, params, [successBlock](cocos2d::ValueMap result) {
successBlock(result);
}, [failureBlock] (cocos2d::ValueMap error) {
failureBlock(error);
});
#endif
}
AppsFlyerXApple::validateAndLogInAppPurchase(productIdentifier, price, currency, tranactionId, params, [=](cocos2d::ValueMap result) {
successBlock(result);
}, [=] (cocos2d::ValueMap error) {
failureBlock(error);
});
==> crash
= ---> &
AppsFlyerXApple::validateAndLogInAppPurchase(productIdentifier, price, currency, tranactionId, params, [&](cocos2d::ValueMap result) {
successBlock(result);
}, [&] (cocos2d::ValueMap error) {
failureBlock(error);
});
==> No Crash
5.4.1
android
trying to compile sdk
compiled lib
compilation error
FAILED: libs/appsflyer/CMakeFiles/appsflyer.dir/src/AppsFlyerProxyX.cpp.o E:\dev\android\ndk\android-ndk-r21\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=E:/dev/android/ndk/android-ndk-r21/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=E:/dev/android/ndk/android-ndk-r21/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DANDROID -DLWS_WITH_LIBUV -DUSE_FILE32API -I../../../../../../libs/appsflyer/src -I../../../../../../cocos2d -I../../../../../../cocos2d/cocos -I../../../../../../cocos2d/extensions -I../../../../../../cocos2d/cocos/platform -I../../../../../../cocos2d/cocos/base -I../../../../../../cocos2d/cocos/editor-support -I../../../../../../cocos2d/cocos/audio/include -I../../../../../../cocos2d/cocos/platform/android -I../../../../../../cocos2d/external/recast/.. -I../../../../../../cocos2d/external/tinyxml2/. -I../../../../../../cocos2d/external/xxhash/. -I../../../../../../cocos2d/external/xxtea/. -I../../../../../../cocos2d/external/clipper/. -I../../../../../../cocos2d/external/edtaa3func/. -I../../../../../../cocos2d/external/ConvertUTF/. -I../../../../../../cocos2d/external/poly2tri/.. -I../../../../../../cocos2d/external/md5/.. -IE:/dev/android/ndk/android-ndk-r21/sources/android/cpufeatures -I../../../../../../cocos2d/external/android-specific/pvmp3dec/include -I../../../../../../cocos2d/external/android-specific/pvmp3dec/src -I../../../../../../cocos2d/external/android-specific/tremolo/. -I../../../../../../cocos2d/external/unzip/. -isystem ../../../../../../cocos2d/external/Box2D/include -isystem ../../../../../../cocos2d/external/chipmunk/include -isystem ../../../../../../cocos2d/external/freetype2/include/android/freetype2 -isystem ../../../../../../cocos2d/external/jpeg/include/android -isystem ../../../../../../cocos2d/external/uv/include -isystem ../../../../../../cocos2d/external/webp/include/android -isystem ../../../../../../cocos2d/external/bullet/include -isystem ../../../../../../cocos2d/external/bullet/include/bullet -isystem ../../../../../../cocos2d/external/openssl/include/android -isystem ../../../../../../cocos2d/external/tiff/include/android -isystem ../../../../../../cocos2d/external/websockets/include/android -isystem ../../../../../../cocos2d/external/curl/include/android -isystem ../../../../../../cocos2d/external/png/include/android -isystem ../../../../../../cocos2d/external/zlib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions -fsigned-char -D_DEVELOPER_MODE -O2 -DNDEBUG -fPIC -std=gnu++11 -MD -MT libs/appsflyer/CMakeFiles/appsflyer.dir/src/AppsFlyerProxyX.cpp.o -MF libs\appsflyer\CMakeFiles\appsflyer.dir\src\AppsFlyerProxyX.cpp.o.d -o libs/appsflyer/CMakeFiles/appsflyer.dir/src/AppsFlyerProxyX.cpp.o -c ../../../../../../libs/appsflyer/src/AppsFlyerProxyX.cpp ../../../../../../libs/appsflyer/src/AppsFlyerProxyX.cpp:124:44: error: use of overloaded operator '=' is ambiguous (with operand types 'std::__ndk1::unordered_map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, cocos2d::Value, std::__ndk1::hash<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >, std::__ndk1::equal_to<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >, std::__ndk1::allocator<std::__ndk1::pair<const std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, cocos2d::Value> > >::mapped_type' (aka 'cocos2d::Value') and 'long') map[std::string(c_string_key)] = NULL; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ ../../../../../../cocos2d/cocos/base/CCValue.h:117:12: note: candidate function Value& operator= (unsigned char v); ^ ../../../../../../cocos2d/cocos/base/CCValue.h:119:12: note: candidate function Value& operator= (int v); ^ ../../../../../../cocos2d/cocos/base/CCValue.h:121:12: note: candidate function Value& operator= (unsigned int v); ^ ../../../../../../cocos2d/cocos/base/CCValue.h:123:12: note: candidate function Value& operator= (float v); ^ ../../../../../../cocos2d/cocos/base/CCValue.h:125:12: note: candidate function Value& operator= (double v); ^ ../../../../../../cocos2d/cocos/base/CCValue.h:127:12: note: candidate function Value& operator= (bool v); ^ ../../../../../../cocos2d/cocos/base/CCValue.h:129:12: note: candidate function Value& operator= (const char* v); ^ ../../../../../../cocos2d/cocos/base/CCValue.h:131:12: note: candidate function Value& operator= (const std::string& v); ^ 1 error generated
ndk r21
cocos2dx 3.17.2
6.3.5/6.3.2
android
suspend -> resume -> suspend and so on in a quick succession
AppsFlyerX::didEnterBackground() call does not take up to 10 seconds
AppsFlyerX::didEnterBackground() call eventualy starts to take up to 10 seconds causing ANR
cocos2dx 3.17.2
reproduced on galaxy s7, nokia 8, POCO x3 NFC
Hi,
Will you add support for the isStopTracking
, both getter and setter ?
Thanks,
Kumamon38
Account: Si AT applovin DOT com
6.4.1
Android 6.4.0
AppsFlyerXAndroid::customerUserID
Get the customer user ID
Crashed, JNI no such method.
AppsFlyer Android SDK removed AppsFlyerLib::getCustomerUserId method, need to use AppsFlyerProperties::getString
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.