SDK changelog
7.1.0
Plugin
Updated Batch to 3.3.
Profile
Added
setTopicPreferencesAPI to theBatchProfileAttributeEditor.Added
addToTopicPreferencesAPI to theBatchProfileAttributeEditor.Added
removeFromTopicPreferencesAPI to theBatchProfileAttributeEditor.Profile string attributes now support up to 300 characters for the Customer Engagement Platform (CEP). The limit for the Mobile Engagement Platform (MEP) remains 64 characters. Attributes set via
BatchProfileAttributeEditor.setAttribute()longer than 64 characters will only be applied to the CEP.Event string attributes now support up to 300 characters for the Customer Engagement Platform (CEP). The limit for the Mobile Engagement Platform (MEP) remains 200 characters. Attributes set via
BatchEventAttributes.put()longer than 200 characters will only be applied to the CEP.
Push
Added
batch.push.requestNotificationAuthorizationAsync()to request notification authorization and return a promise that resolve with the authorization result.
7.0.0
Plugin
Updated Batch to 3.1
Batch requires iOS 15.0 or higher.
Batch now compiles with SDK 36 (Android 16 'Baklava').
iOS
BatchBridgeNotificationCenterDelegatenow defaults to showing foreground notifications.
Profile
Added
setPhoneNumberAPI to theBatchProfileAttributeEditorclass. This requires having a user identifier registered or to call theidentifymethod beforehand.Added
setSMSMarketingSubscriptionAPI to theBatchProfileAttributeEditorclass.
Push
Breaking change: Removed deprecated API
registerForRemoteNotifications. Please userequestNotificationAuthorizationto request permission when needed, andrequestTokenat each app launch.Breaking change: Removed
AndroidNotificationTypesenum and related methodsetAndroidNotificationTypesfrom Batch.Push. You should now usesetAndroidShowNotificationsto control whether Batch should display notifications or not. Note that Batch still preserves your previous values andshouldShowAndroidNotificationswill reflect them.Added
batch.push.setAndroidShowNotificationsmethod to control whether android push notifications should be displayed.Added
batch.Push.shouldShowAndroidNotificationsmethod to check current android notification display settings.
Messaging
Added support for Mobile Landings within the Customer Engagement Platform.
Added support for In-App Automations within the Customer Engagement Platform.
6.0.0
This is a major release, please see our migration guide for more info on how to update your current Batch implementation.
Plugin
Batch requires iOS 13.0 or higher.
Batch requires a
minSdklevel of 21 or higher.
Core
Added method
isOptedOutto checks whether Batch has been opted out from or not.Added method
setFindMyInstallationEnabledto set whether Batch should enable the FindMyInstallation feature or not.Added method
updateAutomaticDataCollectionto fine-tune the data you authorize to be tracked by Batch.Removed
canUseAdvertisingIdentifierproperty fromConfig.Added
migrationsproperty toConfigto update the profile migrations related configuration. See our documentation for info.Fixed an issue where opened push with deeplink was not tracked as direct open on a cold start.
User
Removed method
trackTransactionwith no equivalent.Removed method
batch.user.editorand the related classBatchUserDataEditor, you should now usebatch.profile.editorwhich return an instance ofBatchProfileAttributeEditor.Added method
clearInstallationDatawhich allows you to remove the installation data without modifying the current profile.
Event
This version introduced two new types of attribute that can be attached to an event: Array and Object.
Removed
trackEventAPIs from the user module. You should now usebatch.profile.trackEvent.BatchEventDatahas been renamed intoBatchEventAttributes.Removed
addTagAPI fromBatchEventDataYou should now use the$tagskey withputmethod.Removed parameter
labelfromtrackEventAPI. You should now use the$labelkey inBatchEventAttributeswith theputmethod.Added support for values of type: Array and Object to the
putmethod.
Profile
Introduced batch.profile, a new module that enables interacting with profiles. Its functionality replaces most of BatchUser used to do.
Added
identifyAPI as replacement ofbatch.user.getEditor().setIdentifier.Added
getEditormethod to get a new instance of aBatchProfileAttributeEditoras replacement ofBatchUserEditor.Added
trackEventAPI as replacement of thebatch.user.trackEventmethods.Added
trackLocationAPI as replacement of thebatch.user.trackLocationmethod.
5.4.0
Plugin
Updated Batch 1.21.
Batch requires iOS 12.0 or higher.
Batch now compiles with and targets SDK 34 (Android 14).
User
Removed automatic collection of the advertising id. You need to collect it from your side and pass it to Batch via the added
batch.user.getEditor().setAttributionIdentifier(id)method.Added
setEmailmethod toBatchUserDataEditor. This requires to have a user identifier registered or to call thesetIdentifiermethod on the editor instance beforehand.Added
setEmailMarketingSubscriptionStatemethod toBatchUserDataEditor.
Inbox
Added
hasLandingMessageproperty toInboxNotification.Added
displayNotificationLandingMessagemethod toInboxFetcher.
5.3.0
Plugin
Updated Batch to 1.19.2. Bumping your Android project's compileSdkVersion to 33 might be required. Xcode 13.3 required if your project uses bitcode.
Push
Added Android implementation of the
batch.push.requestNotificationAuthorization()API. This allows you to request for the new notification permission introduced in Android 13. See the documentation for more info.
5.0.0
Core
Breaking change: Fixed an issue where on iOS, the push payload of the
batchPushReceivedevent was under thepayloadkey. It is now at the root of the event data, just like 2.x and on Android.Batch Cordova now requires some ES2015 APIs such as promises.
Push
iOS: Deprecated
registerForRemoteNotificationsby splitting it into two methods:refreshToken, which should be called on every app start.requestNotificationAuthorization, which should be called whenever you want to ask the user the permission to display notifications.
iOS: Added
requestProvisionalNotificationAuthorizationto request a provisional authorization on iOS 11 and higher.iOS: Calling
setiOSShowForegroundNotifications()under Capacitor now works as expected. It works by disabling Capacitor's control of the notification presentation, but Capacitor is still informed of notification events. Not calling this method preserves Capacitor's handling, which can be configured using@capacitor/push-notifications.getLastKnownPushToken()now returns aPromiserather than taking a callback as a parameter.
Inbox
The Inbox module has been fully rewritten to reach feature parity with the native SDKs:
batch.inbox.getFetcherForInstallation()andbatch.inbox.getFetcherForUser()now return objects that are used to interact with the inbox.Marking a notification as read, deleted or marking all notifications as read is now supported.
Fetching multiple pages is now supported.
Inbox page size and the limit of notifications to fetch are now configurable.
The new fetcher objects MUST be disposed by calling .dispose() once you are finished with them to free up memory.
See documentation for more info about migrating to the new Inbox API.
User
getInstallationID()now returns aPromiserather than taking a callback as a parameter. The promise's result can be undefinied if the Installation ID is unavailable.Added getters for
language/regionandidentifierinbatch.user.
4.0.0
Plugin
Changed the Plugin ID from
com.batch.cordovato@batch.com/cordova-plugin. This fixes an issue wherecordova preparewould reinstall an older version of the plugin if the plugins folder was missing. Cordova users: when updating please remove the old plugin viacordova plugin remove com.batch.cordova, then install the new one. Ionic Capacitor users: Nothing needs to be done as Capacitor integrates with NPM and the package.json natively.
Android
Android 12 compatibility: Added explicit
android:exportedvalues to the manifest entries added by the plugin.
3.0.0
This is a major release with breaking changes. Please see the migration guide for more info.
Plugin
Renamed the plugin to
@batch.com/cordova-plugin. It's cordova internal name is stillcom.batch.cordovadue to cordova limitations. The plugin cordova name is used when managing plugins after installation.Updated plugin for recent Cordova/Ionic versions. Batch Cordova's new version requirements are:
iOS >= 10.0
Android >= 5.0 (API 21)
Cordova CLI >= 9.0.0
Ionic CLI (if used) >= 6.0.0
cordova-android >= 9.0.0
cordova-iOS >= 6.0.0
Updated native Batch SDK to 1.17.0. Native SDK version can be configured using the
BATCHSDK_ANDROID_VERSIONandBATCHSDK_IOS_VERSIONpreferences. Please note that this version of the plugin will not work with earlier native Batch SDK versions.Added Ionic Capacitor support. Requires Capacitor 2.4 or higher.
Fixed an issue where Cordova/Ionic would not properly write the required AndroidManifest lines.
Added support for dates in event data.
Removed event data tags/attributes limits from the Cordova plugin. This does not mean that those limits are gone, but that the native SDK will now enforce them so that the plugin doesn't have to be updated if and then these limits change. Current native limits are 15 attributes and 10 tags.
Android
The plugin requires AndroidX to be enabled in your
config.xmlusing<preference name="AndroidXEnabled" value="true" />(Cordova only). Ionic users will need to addcordova-plugin-androidx-adapter.The plugin doesn't depend on Firebase and appcompat anymore. Batch expects androidx.appcompat and Firebase Cloud Messaging to be in your application. This can be setup using the Firebase plugin of your choice:
We recommend
cordova-plugin-firebase-messagingfor Cordova. If you do not want to add Firebase to your iOS app, manual FCM integration steps are available in our integration documentation.Capacitor comes with appcompat and FCM support out of the box, no extra plugin is needed.
You will also be required to configure your
google-services.jsonmanually: this is described in the integration documentation and should be covered by your Firebase plugin's documentation.
iOS
The native SDK isn't bundled anymore: Cocoapods is now used to integrate Batch's native component.
The plugin now automatically sets a UNUserNotificationCenterDelegate to handle new iOS features. This enables configuration of foreground push behaviour: they can now be displayed in an alert just like if the user was outside of the application. It can be disabled by calling
BatchBridgeNotificationCenterDelegate.automaticallyRegister = falseas soon as possible inapplication:didFinishLaunchingWithOptions:.Fixed a bug where notification opens on cold start would not work.
Fixed multiple mobile landings related bugs.
Fixed multiple
batchPushReceivedrelated bugs.Fixed an issue where boolean custom data was saved as integers.
3.0.0-beta.1
Pre-release
This is a major release with breaking changes. Please see the migration guide for more info.
Plugin
Renamed the plugin to
@batch.com/cordova-plugin. It's cordova internal name is stillcom.batch.cordovadue to cordova limitations. The plugin cordova name is used when managing plugins after installation.Updated plugin for recent Cordova/Ionic versions. Batch Cordova's new version requirements are:
iOS >= 10.0
Android >= 5.0 (API 21)
Cordova CLI >= 9.0.0
Ionic CLI (if used) >= 6.0.0
Updated native Batch SDK to 1.17.0. Native SDK version can be configured using the
BATCHSDK_ANDROID_VERSIONandBATCHSDK_IOS_VERSIONpreferences. Please note that this version of the plugin will not work with earlier native Batch SDK versions.Added Ionic Capacitor support. Requires Capacitor 2.4 or higher.
Fixed an issue where Cordova/Ionic would not properly write the required AndroidManifest lines.
Android
The plugin requires AndroidX to be enabled in your
config.xmlusing<preference name="AndroidXEnabled" value="true" />(Cordova only). Ionic users will need to addcordova-plugin-androidx-adapter.The plugin doesn't depend on Firebase and appcompat anymore. Batch expects androidx.appcompat and Firebase Cloud Messaging to be in your application. This can be setup using the Firebase plugin of your choice:
We recommend
cordova-plugin-firebase-messagingfor Cordova. If you do not want to add Firebase to your iOS app, manual FCM integration steps are available in our integration documentation.Capacitor comes with appcompat and FCM support out of the box, no extra plugin is needed.
You will also be required to configure your
google-services.jsonmanually: this is described in the integration documentation and should be covered by your Firebase plugin's documentation.
iOS
The native SDK isn't bundled anymore: Cocoapods is now used to integrate Batch's native component.
The plugin now automatically sets a UNUserNotificationCenterDelegate to handle new iOS features. This enables configuration of foreground push behaviour: they can now be displayed in an alert just like if the user was outside of the application. It can be disabled by calling
BatchBridgeNotificationCenterDelegate.automaticallyRegister = falseas soon as possible inapplication:didFinishLaunchingWithOptions:.Fixed a bug where notification opens on cold start would not work.
Fixed multiple mobile landings related bugs.
Fixed multiple
batchPushReceivedrelated bugs.Fixed an issue where boolean custom data was saved as integers.
2.3.2/2.3.3
Hotfix: Lock the firebase versions to ones that work without androidx or compileSdkVersion 28 If your app requires newer firebase dependencies, please stick to 2.3.1 in the meantime NOTE: The 2.x branch is the final one that comes with Firebase dependencies. 3.x will require you to manage them yourselves.
2.3.0
Added a way to disable Firebase configuration extraction, using a variable: Use
cordova plugin add com.batch.cordova --variable BATCHSDK_ENABLE_ANDROID_BUILTIN_FIREBASE_CONFIG=falseif you run into issues when using this plugin.Fix an issue where trackTransaction did not work with integers on Android
Fix an issue where the SDK would fail if a developer removed console.log or console.debug
2.1.0
Events
Event data support has been overhauled. As a result:
Introduced
BatchEventData. Use this class to attach attributes and tags to an event. See this class' documentation available inindex.d.tsfor more information about limits.batch.user.trackEvent(name: string, label: string, data: {})has been deprecatedCalls to this method will log deprecation warnings in the console
Legacy data (plain JS object) will be converted to
BatchEventData. Same data format restrictions apply: Any key/value entry that can't be converted will be ignored, and logged. Tags are not supported.Introduced
Batch.User.trackEvent(name: string, label: string, data: BatchEventData), replacing the deprecated method.
More info in the event documentation.
2.0.4
Android
Remove explicit dependency on play-services-ads.
This may cause your application to stop giving Batch your users' Advertising ID.
To restore this functionality, please use a 3rd party plugin or a gradle file to add firebase-analytics to your app.
Doing so may require you to add a privacy policy to your app to stay in compliance with Play Store rules.
2.0.0
Rewrote the plugin:
Native code is now included in the open-source repository, meaning that 3rd party developers can update the underlying native SDKs directly.
Plugin is fully definied in a typescript definition, improving documentation readability and Ionic support
Plugin is now testable
Cordova-plugin's versioning system will now differ from the native SDK versioning
Cordova 8 compatibility. Note: Users of earlier versions of cordova will have to downgrade to 1.7.4
Updated native SDKs to 1.12.0
Android now uses FCM to register for notifications: setGCMSenderId has been removed, and you will need to generate a google-services.json file to keep push notifications.
Last updated

