# Migrating from 2.3

Batch Cordova Plugin 4.0 is a major release, which introduces breaking changes from 2.x. This guide describes how to update the plugin in an application already using Batch Cordova Plugin 2.3.

### Minimum Cordova version

Cordova and Ionic (CLI, android/iOS plugins) version requirements are higher than 2.3. Please see [SDK Integration](/developer/sdk/cordova/sdk-integration.md) for the updated requirements.

Support for iOS 8 and 9 has been dropped.

### Plugin Name

As of version 3.0, the plugin has moved under the `batch` npm group. It is now named `@batch.com/cordova-plugin`. With 4.0, the Plugin ID has been updated to match the NPM package name.

In order to update to 4.0, remove the old plugin and add the new one. The old plugin will stay published at version 2.3.

```shell
cordova plugin remove com.batch.cordova
cordova plugin add @batch.com/cordova-plugin
```

### Androidx

Batch Cordova Plugin 4.0 requires androidx to be enabled in your project.

See the [SDK Integration documentation](/developer/sdk/cordova/sdk-integration.md#android-setup) for more info.

### Firebase Cloud Messaging

Version 2.x of the plugin came with automatic Firebase integration, which consisted of:

* An explicit Android dependency
* A Cordova hook to copy required data from `google-services.json`

This caused a lot of incompatibilities with the different Firebase plugins used in the Cordova ecosystem, so we **removed** this.\
On Android, Batch Cordova Plugin 4.0 needs Firebase Cloud Messaging to be added using the third party plugin: see the [SDK Integration documentation](/developer/sdk/cordova/sdk-integration.md#android-setup) for more info.

The explicit dependency on `androidx.appcompat` has also been removed to reduce version mismatch problems: while it is still required to be able to display Mobile Landings and In-App Campaigns, this dependency should be automatically added by Firebase.

{% hint style="info" %}
Batch doesn't require Firebase Cloud Messaging on iOS. You can safely install an Android-only plugin.
{% endhint %}

### iOS Framework integration

This change should be transparent, but might require cleaning the project: on iOS, Batch's native framework isn't shipped with the plugin anymore but is fetched using CocoaPods.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.batch.com/developer/sdk/cordova/migrations/2x-migration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
