Manual installation - DevDmitryHub/cordova-plugin-appsflyer GitHub Wiki

1. Add the following xml code to your config.xml in the root directory of your www folder for the register extension:

<!-- for iOS -->
<feature name="AppsFlyerPlugin">
  <param name="ios-package" value="AppsFlyerPlugin" />
</feature>
<!-- for Android -->
<feature name="AppsFlyerPlugin">
  <param name="android-package" value="com.appsflyer.cordova.plugin.AppsFlyerPlugin" />
</feature>

2. For Android, add the following xml code to your AndroidManifest.xml for allow permissions:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

Inside the <aplication> tag, add the following receiver:

<receiver android:exported="true" android:name="com.appsflyer.MultipleInstallBroadcastReceiver">
    <intent-filter>
        <action android:name="com.android.vending.INSTALL_REFERRER" />
    </intent-filter>
</receiver>

3. Copy appsflyer.js to www/js/plugins and reference it in index.html:

<script type="text/javascript" src="js/plugins/appsflyer.js"></script>

4. Download the source files and copy them to your project.

iOS: Copy AppsFlyerPlugin.h, AppsFlyerPlugin.m, AppsFlyerTracker.h and libAppsFlyerLib.a to platforms/ios/<ProjectName>/Plugins

Android: Copy AppsFlyerPlugin.java to platforms/android/src/com/appsflyer/cordova/plugins (create the folders)

⚠️ **GitHub.com Fallback** ⚠️