# Adding cordova-plugin-appsflyer-sdk to your project
- [Installation using CLI](#installation-using-cli)
- [Manual installation](#manual-installation)
- [iOS](#manual-installation-ios)
- [Android](#manual-installation-android)
- [Removing the Plugin](#remove-plugin)
## Installation using CLI:
directly from git branch:
```
$ cordova plugin add https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk.git
```
For Google Install referrer support:
Open the build.gradle file for your application. Make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint. For example:
```
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
```
## Manual installation:
1\. Add the following xml to your `config.xml` in the root directory of your `www` folder:
```xml
```
```xml
```
2\. For Android, add the following xml to your `AndroidManifest.xml`:
```xml
```
Inside the `` tag, add the following receiver:
```xml
```
3\. Copy appsflyer.js to `www/js/plugins` and reference it in `index.html`:
```html
```
4\. Download the source files and copy them to your project.
##### ****iOS:****
Copy:
- `AppsFlyerPlugin.h`
- `AppsFlyerPlugin.m`
- `AppsFlyerCrossPromotionHelper.h`
- `AppsFlyerLib.h`
- `AppsFlyerLinkGenerator.h`
- `AppsFlyerShareInviteHelper.h`
- `AppsFlyerX+AppController.h`
- `AppsFlyerX+AppController.m`
- `libAppsFlyerLib.a`
- `AppsFlyerAttribution.h`
- `AppsFlyerAttribution.m`
to `platforms/ios//Plugins`
##### ****Android:****
Copy `AppsFlyerPlugin.java` to `platforms/android/src/com/appsflyer/cordova/plugins` (create the folders)
## Removing the Plugin:
```
$ cordova plugin remove cordova-plugin-appsflyer-sdk
```