Migrating from 1.0
Migrating from com.batch.cordova 1.x
Batch's cordova plugin 2.0.0 update being a major version, it brings some breaking change to existing implementations:
batch.push.setGCMSenderId() has been removed. Android now uses FCM, which requires you to add a
google-services.json
file to your project. More info here."setCanUseAndroidID" has been removed from the config object. You can safely leave the key, but it will be ignored.
For any other supported API use cases, your code requires no change.
Migrating from batch.userProfile
If you've previously used batch.userProfile
, you can easily use Batch User. You will still be able to set a custom region, language or identifier with the new API.
The main difference between Batch User and BatchUserProfile
is that you'll now be required to use an editor object in order to make changes, and then save them. This transactional behaviour brings additional thread-safety and better performance.
That way, what used to be:
will become this:
Last updated
Was this helpful?