devdmitryhub / cordova-plugin-appsflyer Goto Github PK
View Code? Open in Web Editor NEWThis project forked from krange/appsflyer
AppsFlyer plugin for Cordova (Phonegap)
This project forked from krange/appsflyer
AppsFlyer plugin for Cordova (Phonegap)
I am using this Cordova plugin and it works for iOS, I am able to track installations of the iOS App built with Cordova.
I am unable though to track the installations of the Android app.
The dashboard is configured in this way:
I clicked "Add App", I chose "Android out of store APK", I added as store details: the bundle identifier of my app, "TEST" as channel name and a fake url for the App URL.
I saved and the dashboard got created successfully.
When I execute the init command the response says success but no installations appear on the dashboard.
Any help, please? :(
Here is the log:
Build Date: 2017-04-03 09:17:27 +0000
--------------------------------------------------------------------------------
PLUGIN OUTPUT
--------------------------------------------------------------------------------
Fetching plugin "[email protected]" via npm
Installing "cordova.plugins.diagnostic.api-22" at "2.3.10-api-22" for android
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-whitelist" at "1.2.2" for android
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-inappbrowser" at "1.4.0" for android
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-geolocation" at "2.2.0" for android
Fetching plugin "cordova-plugin-compat" via npm
Installing "cordova-plugin-compat" at "1.1.0" for android
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-network-information" at "1.2.1" for android
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-google-analytics" at "0.8.1" for android
Subproject Path: CordovaLib
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-calendar" at "4.5.0" for android
Dependent plugin "cordova-plugin-compat" already installed on android.
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-x-socialsharing" at "5.1.1" for android
Fetching plugin "[email protected]" via npm
Installing "de.appplant.cordova.plugin.local-notification" at "0.8.4" for android
Fetching plugin "cordova-plugin-device" via npm
Installing "cordova-plugin-device" at "1.1.5" for android
Fetching plugin "cordova-plugin-app-event" via npm
Installing "cordova-plugin-app-event" at "1.2.0" for android
Subproject Path: CordovaLib
Your support is needed. If you use the local-notification plugin please support us in order to ensure further development.
https://github.com/katzer/cordova-plugin-local-notifications#supporting
Thank you!
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-splashscreen" at "3.2.2" for android
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-uniquedeviceid" at "1.3.2" for android
Fetching plugin "cordova-plugin-appsflyer@~4.2.2" via npm
Installing "cordova-plugin-appsflyer" at "4.2.10" for android
Subproject Path: CordovaLib
Fetching plugin "phonegap-plugin-push" via npm
Installing "phonegap-plugin-push" at "1.10.0" for android
Subproject Path: CordovaLib
Fetching plugin "ionic-plugin-keyboard" via npm
Installing "ionic-plugin-keyboard" at "2.2.1" for android
Fetching plugin "cordova-plugin-statusbar" via npm
Installing "cordova-plugin-statusbar" at "2.2.2" for android
Fetching plugin "cordova-plugin-file" via npm
Installing "cordova-plugin-file" at "4.3.2" for android
Dependent plugin "cordova-plugin-compat" already installed on android.
The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml.
If this is a new application no changes are required.
If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:
"<preference name="AndroidPersistentFileLocation" value="Compatibility" />"
to config.xml in order for the application to find previously stored files.
Plugin "cordova-plugin-device" already installed on android. Making it top-level.
Fetching plugin "cordova-plugin-file-transfer" via npm
Installing "cordova-plugin-file-transfer" at "1.6.2" for android
Dependent plugin "cordova-plugin-file" already installed on android.
--------------------------------------------------------------------------------
COMPILE OUTPUT
--------------------------------------------------------------------------------
Subproject Path: CordovaLib
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:preReleaseBuild UP-TO-DATE
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:CordovaLib:mergeDebugProguardFiles
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:processDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:incrementalDebugJavaCompilationSafeguard
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
:CordovaLib:bundleDebug
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseShaders
:CordovaLib:compileReleaseShaders
:CordovaLib:generateReleaseAssets
:CordovaLib:mergeReleaseAssets
:CordovaLib:mergeReleaseProguardFiles
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:compileReleaseRenderscript
:CordovaLib:generateReleaseResValues
:CordovaLib:generateReleaseResources
:CordovaLib:packageReleaseResources
:CordovaLib:processReleaseManifest
:CordovaLib:generateReleaseBuildConfig
:CordovaLib:processReleaseResources
:CordovaLib:generateReleaseSources
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
:CordovaLib:compileReleaseJavaWithJavac
:CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
:CordovaLib:mergeReleaseJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
:CordovaLib:bundleRelease
:prepareComAndroidSupportSupportCompat2520Library
:prepareComAndroidSupportSupportCoreUi2520Library
:prepareComAndroidSupportSupportCoreUtils2520Library
:prepareComAndroidSupportSupportFragment2520Library
:prepareComAndroidSupportSupportMediaCompat2520Library
:prepareComAndroidSupportSupportV132340Library
:prepareComAndroidSupportSupportV42520Library
:prepareComGoogleAndroidGmsPlayServicesAds1020Library
:prepareComGoogleAndroidGmsPlayServicesAdsLite1020Library
:prepareComGoogleAndroidGmsPlayServicesAnalytics1020Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1020Library
:prepareComGoogleAndroidGmsPlayServicesBase1020Library
:prepareComGoogleAndroidGmsPlayServicesBasement1020Library
:prepareComGoogleAndroidGmsPlayServicesClearcut1020Library
:prepareComGoogleAndroidGmsPlayServicesGass1020Library
:prepareComGoogleAndroidGmsPlayServicesGcm1020Library
:prepareComGoogleAndroidGmsPlayServicesIid1020Library
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1020Library
:prepareComGoogleAndroidGmsPlayServicesTasks1020Library
:prepareMeLeolinShortcutBadger1112Library
:prepareProjectCordovaLibUnspecifiedDebugLibrary
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResourcesWarning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.
:generateDebugSources
:incrementalDebugJavaCompilationSafeguard
:compileDebugJavaWithJavac
:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:16: error: cannot find symbol
import com.appsflyer.AppsFlyerConversionListener;
^
symbol: class AppsFlyerConversionListener
location: package com.appsflyer
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:17: error: cannot find symbol
import com.appsflyer.AppsFlyerLib;
^
symbol: class AppsFlyerLib
location: package com.appsflyer
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:136: error: cannot find symbol
private void registerConversionListener(AppsFlyerLib instance){
^
symbol: class AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:41: error: cannot find symbol
AppsFlyerLib.getInstance().sendDeepLinkData(cordova.getActivity());
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:77: error: cannot find symbol
AppsFlyerLib.getInstance().trackEvent(c, null, null);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:92: error: cannot find symbol
AppsFlyerLib instance = AppsFlyerLib.getInstance();
^
symbol: class AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:92: error: cannot find symbol
AppsFlyerLib instance = AppsFlyerLib.getInstance();
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:137: error: cannot find symbol
instance.registerConversionListener(cordova.getActivity().getApplicationContext(), new AppsFlyerConversionListener(){
^
symbol: class AppsFlyerConversionListener
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:227: error: cannot find symbol
AppsFlyerLib.getInstance().trackEvent(c, eventName, eventValues);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:248: error: cannot find symbol
AppsFlyerLib.getInstance().setCurrencyCode(currencyId);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:262: error: cannot find symbol
AppsFlyerLib.getInstance().setAppUserId(customeUserId);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:278: error: cannot find symbol
String id = AppsFlyerLib.getInstance().getAppsFlyerUID(cordova.getActivity().getApplicationContext());
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:317: error: cannot find symbol
AppsFlyerLib.getInstance().setGCMProjectNumber(c, gcmProjectId);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
13 errors
:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.189 secs
Error: /project/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:16: error: cannot find symbol
import com.appsflyer.AppsFlyerConversionListener;
^
symbol: class AppsFlyerConversionListener
location: package com.appsflyer
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:17: error: cannot find symbol
import com.appsflyer.AppsFlyerLib;
^
symbol: class AppsFlyerLib
location: package com.appsflyer
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:136: error: cannot find symbol
private void registerConversionListener(AppsFlyerLib instance){
^
symbol: class AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:41: error: cannot find symbol
AppsFlyerLib.getInstance().sendDeepLinkData(cordova.getActivity());
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:77: error: cannot find symbol
AppsFlyerLib.getInstance().trackEvent(c, null, null);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:92: error: cannot find symbol
AppsFlyerLib instance = AppsFlyerLib.getInstance();
^
symbol: class AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:92: error: cannot find symbol
AppsFlyerLib instance = AppsFlyerLib.getInstance();
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:137: error: cannot find symbol
instance.registerConversionListener(cordova.getActivity().getApplicationContext(), new AppsFlyerConversionListener(){
^
symbol: class AppsFlyerConversionListener
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:227: error: cannot find symbol
AppsFlyerLib.getInstance().trackEvent(c, eventName, eventValues);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:248: error: cannot find symbol
AppsFlyerLib.getInstance().setCurrencyCode(currencyId);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:262: error: cannot find symbol
AppsFlyerLib.getInstance().setAppUserId(customeUserId);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:278: error: cannot find symbol
String id = AppsFlyerLib.getInstance().getAppsFlyerUID(cordova.getActivity().getApplicationContext());
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
/project/src/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java:317: error: cannot find symbol
AppsFlyerLib.getInstance().setGCMProjectNumber(c, gcmProjectId);
^
symbol: variable AppsFlyerLib
location: class AppsFlyerPlugin
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
13 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Precondition: Make sure that app is not installed on the device.
Test environment details:
cordova-ios-4.0.1
cordova:6.1.1
appsflyer plugin version:4.0.1
Steps to reproduce:
1.Install app from itunes/xcode
2.Open the app
Issue seen: App is crashing only on first time launch in iOS 9.2. Subsequent launch crash is not seen.
This issue can be found in the forked plugin https://github.com/AppsFlyerSDK/PhoneGap as well.
Initial Analysis from log:
stringByEvaluatingJavaScriptFromString method call needs to be done from main thread which is not happening on first launch
-(void)onConversionDataReceived:(NSDictionary*) installData {
NSError *error;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:installData
options:0
error:&error];
if (jsonData) {
NSString *JSONString = [[NSString alloc] initWithBytes:[jsonData bytes] length:[jsonData length] encoding:NSUTF8StringEncoding];
[[super webView] stringByEvaluatingJavaScriptFromString: [NSString stringWithFormat:@"javascript:window.plugins.appsFlyer.onInstallConversionDataLoaded(%@)", JSONString]];
} else {
NSLog(@"%@",error);
}
}
Below is the crash log:
_WebTryThreadLock(bool), 0x7fc24c204210: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
1 0x11682434b WebThreadLock
2 0x10dbe5580 -[UIWebView stringByEvaluatingJavaScriptFromString:]
3 0x10b8444b8 -[CDVUIWebViewEngine evaluateJavaScript:completionHandler:]
4 0x10b8277a6 -[AppsFlyerPlugin onConversionDataReceived:]
5 0x10b8c47ad __37-[AppsFlyerTracker getConversionData]_block_invoke170
6 0x10f19d6b5 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke
7 0x10f1afa02 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke
8 0x10c826304 NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK
9 0x10c762035 -[NSBlockOperation main]
10 0x10c744f8a -[__NSOperationInternal _start:]
11 0x10c744b9b __NSOQSchedule_f
12 0x10fb5649b _dispatch_client_callout
13 0x10fb3c8ec _dispatch_queue_drain
14 0x10fb3be0d _dispatch_queue_invoke
15 0x10fb3ea56 _dispatch_root_queue_drain
16 0x10fb3e4c5 _dispatch_worker_thread3
17 0x10fe8e68f _pthread_wqthread
18 0x10fe8c365 start_wqthread
Hi,
I'm using XDK to build the app. However, it always says Plugin Install failed. Any solution?
Thanks,
Kael
I get the following errors when building the app for iOS:
AppsFlyerPlugin.m:8:38: error: no visible @interface for 'CDVPlugin' declares the selector 'initWithWebView:'
self = (AppsFlyerPlugin *)[super initWithWebView:theWebView];
and
AppsFlyerPlugin.m:80:26: error: no visible @interface for 'UIView' declares the selector 'stringByEvaluatingJavaScriptFromString:'
[[super webView] stringByEvaluatingJavaScriptFromString: [NSString stringWithFormat:@"javascript:window.plugins.appsFlyer.onInstallConversionDataLoaded(%@)", JSONString]];
I tried both plugin versions v.3.3.3 and v.3.3.1 but same effect.
I am using Cordova v6 with cordova-ios 4.0.1.
Any help would be much appreciated.
Hi,
I'm experiencing a problem related to this Appsflyer plugin and BackButton on CocoonJS.
Normally, I add a callback for backbutton this way:
document.addEventListener("backbutton",callback, false);
And it works perfectly,
After that, I tried
window.plugins.appsFlyer.initSdk(args);
I see that the appsflyer work normally, but then I notice that after init the SDK for AppsFlyer, the backbutton callback don't work anymore. No matter what I do, press the back button always close the app. And this ONLY happens after call initSdk
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.