Skip to content

Releases: BatchLabs/Batch-Cordova-Plugin

6.0.0

06 Sep 09:22
Compare
Choose a tag to compare

This is a major release, please see our migration guide for more info on how to update your current Batch implementation.

Plugin

  • Updated Batch to 2.0. For more information see the ios and android changelog .
  • Batch requires iOS 13.0 or higher.
  • Batch requires a minSdk level of 21 or higher.

Core

  • Added method isOptedOut to checks whether Batch has been opted out from or not.
  • Added method setFindMyInstallationEnabled to set whether Batch should enable the FindMyInstallation feature or not.
  • Added method updateAutomaticDataCollection to fine-tune the data you authorize to be tracked by Batch.
  • Removed canUseAdvertisingIdentifier property from Config.
  • Added migrations property to Config to 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 trackTransaction with no equivalent.
  • Removed method batch.user.editor and the related class BatchUserDataEditor, you should now use batch.profile.editor which return an instance of BatchProfileAttributeEditor.
  • Added method clearInstallationData which 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 trackEvent APIs from the user module. You should now use batch.profile.trackEvent.
  • BatchEventData has been renamed into BatchEventAttributes.
  • Removed addTag API from BatchEventData You should now use the $tags key with put method.
  • Removed parameter label from trackEvent API. You should now use the $label key in BatchEventAttributes with the put method.
  • Added support for values of type: Array and Object to the put method.

Profile

Introduced batch.profile, a new module that enables interacting with profiles. Its functionality replaces most of BatchUser used to do.

  • Added identify API as replacement of batch.user.getEditor().setIdentifier.
  • Added getEditor method to get a new instance of a BatchProfileAttributeEditor as replacement of BatchUserEditor.
  • Added trackEvent API as replacement of the batch.user.trackEvent methods.
  • Added trackLocation API as replacement of the batch.user.trackLocation method.

5.4.0

23 Jan 15:02
Compare
Choose a tag to compare

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 setEmail method to BatchUserDataEditor. This requires to have a user identifier registered or to call the setIdentifier method on the editor instance beforehand.
  • Added setEmailMarketingSubscriptionState method to BatchUserDataEditor.

Inbox

  • Added hasLandingMessage property to InboxNotification.
  • Added displayNotificationLandingMessage method to InboxFetcher.

5.3.2

24 Mar 09:27
Compare
Choose a tag to compare

iOS

  • Fix an issue where BatchBridgeNotificationCenterDelegate's automatic setup might result in an infinite loop on notification open.

5.3.1

15 Feb 15:21
Compare
Choose a tag to compare

iOS

  • Fix BatchBridgeNotificationCenterDelegate.automaticallyRegister not being honored.
  • Add compatibility for Capacitor 4.6: Batch's delegate now tries to register itself at a later time to keep compatibility with Capacitor's push plugins and Batch's features at the same time.

5.3.0

13 Sep 14:49
Compare
Choose a tag to compare

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.1.0

22 Dec 14:42
Compare
Choose a tag to compare

Plugin

  • Updated Batch native SDKs to 1.18.1.

User

  • Added support for the URL attribute and event data type.

5.0.1

13 Dec 13:59
Compare
Choose a tag to compare

iOS

  • Fix an issue where the plugin could not be built in some environments due to BatchUserBridge.h.

5.0.0

13 Oct 14:03
Compare
Choose a tag to compare

Core

  • Breaking change: Fixed an issue where on iOS, the push payload of the batchPushReceived event was under the payload key. 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 registerForRemoteNotifications by 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 requestProvisionalNotificationAuthorization to 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 a Promise rather 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() and batch.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 a Promise rather than taking a callback as a parameter. The promise's result can be undefinied if the Installation ID is unavailable.
  • Added getters for language/region and identifier in batch.user.

4.0.0

21 Sep 06:55
Compare
Choose a tag to compare

Plugin

  • Changed the Plugin ID from com.batch.cordova to @batch.com/cordova-plugin. This fixes an issue where cordova prepare would reinstall an older version of the plugin if the plugins folder was missing.
    Cordova users: when updating please remove the old plugin via cordova 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:exported values to the manifest entries added by the plugin.

3.0.0

11 Jun 14:08
Compare
Choose a tag to compare

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 still com.batch.cordova due 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_VERSION and BATCHSDK_IOS_VERSION preferences.
    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.xml using <preference name="AndroidXEnabled" value="true" /> (Cordova only).
    Ionic users will need to add cordova-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-messaging for 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.json manually: 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 = false as soon as possible in application:didFinishLaunchingWithOptions:.
  • Fixed a bug where notification opens on cold start would not work.
  • Fixed multiple mobile landings related bugs.
  • Fixed multiple batchPushReceived related bugs.
  • Fixed an issue where boolean custom data was saved as integers.