SDK changelog
8.2.023/01/2024
Plugin
- Updated Batch 1.21.
- Batch requires iOS 12.0 or higher.
- Batch now compiles with and targets SDK 34 (Android 14).
- Added support for react-native 0.73+
- Added support for Expo 50.
- Fixed an issue on iOS where
refreshTokenwas not running on main thread.
User
- Removed automatic collection of the advertising id. You need to collect it from your side and pass it to Batch via the added
BatchUser.editor().setAttributionIdentifier(id)method. - Added
setEmailmethod toBatchUserEditor. This requires to have a user identifier registered or to call thesetIdentifiermethod on the editor instance beforehand. - Added
setEmailMarketingSubscriptionStatemethod toBatchUserEditor.
Inbox
- Added
hasLandingMessageproperty toIInboxNotification. - Added
displayNotificationLandingMessagemethod toBatchInboxFetcher.
8.1.213/10/2022
Plugin
- Fixed an issue on Android where
openpush message events queued on cold start were sent before we could register a listener.
8.1.111/10/2022
Plugin
- Fixed an issue where listening for
openpush message events wasn't working on cold start.
8.1.031/08/2022
Plugin
- Plugin now compiles with and targets SDK 33 (Android 13).
Push
- Added a new API:
BatchPush.requestNotificationAuthorization(). This allows you to request for the new notification permission introduced in Android 13. See the documentation for more info.
8.0.208/08/2022
Plugin
- Batch requires Xcode 13.4.1
- Fixed autolinking on react-native 0.69+ and Expo 46
8.0.027/07/2022
Plugin
- Updated Batch 1.19. Batch requires Xcode 13.3.1 and iOS 10.0 or higher.
- Updated how Batch is imported to support React-Native v0.68 wich now uses Objective-C++.
- Added support for Expo 45
User
- Added getters for
identifier,language,region,attributesandtagCollectionsinBatchUser. - Added a fix where you couldn't use
setLanguageorsetRegionwith a nil value on iOS.
7.0.006/12/2021
There are several breaking changes (indicated with [BREAKING]) so please read along.
Batch SDK version
- Migrated to Batch SDK v1.18
- For iOS:
- [BREAKING] Make sure to update your Podfile Batch SDK version
- [BREAKING] Batch requires Xcode 13 or higher
- For iOS:
Events
- Added URL type in event data with
putURL. - Added Date type in event data with
putDate.
Attributes
- Added URL type in custom attributes with
setURLAttribute.
Messaging
- Added
BatchMessaging.addListenerto listen for messaging notifications events. See documentation.
Push
-
Added
BatchPush.addListenerto listen for push notifications events. See documentation to see platform differences. -
iOS: Deprecated
BatchPush.registerForRemoteNotificationsby splitting it into two methods:BatchPush.refreshToken, which should be called on every app start after opt-in if you're opted out by default.BatchPush.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.
Bug Fixes
- Fix
isUnreadproperty of a Batch inbox notification : it was previously always undefined, now it is correctly set. - Fix crash in
trackTransactionwhen it was called without data as second parameter.
6.0.022/06/2021
There are several breaking changes (indicated with [BREAKING]) so please read along.
Features
Batch SDK version
- Migrated to Batch SDK v1.17
- For iOS:
- [BREAKING] Make sure to update your Podfile Batch SDK version
- [BREAKING] Batch requires Xcode 12 and iOS 10.0 or higher
- [BREAKING] Make sure to follow again the Extra steps on iOS, a new section has been added about the
BatchUNUserNotificationCenterDelegate(if you haven't implemented a delegate yet)
- For Android:
- [BREAKING] Make sure to have up-to-date android build tools (see Android blog)
- For iOS:
- [Android] You can now update the Batch SDK manually with the rootProject ext property
batchSdkVersion. On iOS this was already possible (you set the version in your Podfile)
Mobile landings / in app messages
- Added
BatchMessaging.setFontOverride()so that you can change the font of messaging views (eg. In-app campaigns landings) - Added
disableDoNotDisturbAndShowPendingMessagefor quicker setup and to minimize any race condition between disabling do not disturb and showing the pending message - Do not disturb (for mobile landings/in app messages) can now be enabled natively on Android and iOS. 99% of the time on a regular React Native app, you should enable it. See README) to see why and how to handle the new behavior (call
disableDoNotDisturbAndShowPendingMessagewhen ready, or disable do not disturb manually).- [BREAKING]
Batch.startis now useless so it has been removed. You must remove any call toBatch.startin your javascript code. - [BREAKING] [iOS] the optional argument to
[RNBatch start]native method is now useless so it has been removed. You must replace any[RNBatch start:false]to[RNBatch start]
- [BREAKING]
DX improvements
- Chaining Batch User editor is now optional
- Added
Batch.showDebugView()so that you can easily debug your Batch installation
Inbox
- [BREAKING] [Inbox] Rewrote inbox API to expose every native SDK Inbox methods such as
markNotificationAsRead. You can now implement an infinite loading list of notifications with this API. (see migration examples)
Bug Fixes
- [Android] Fix resume count
- This removes an error in the logs when receiving a push while in background and potentially fixes issues related to the app going from background to foreground
- [BREAKING] In order to migrate, make sure to follow the new
READMEsection on configuring auto-linking
- Fixed a GDPR scenario case where the Batch iOS/Android SDK might not be started
- Added
BatchPush.getInitialURLto workaround issues on iOS to get the deeplink associated to the notification that opened the app initially.Linking.getInitialURLcan be replaced byBatchPush.getInitialURLon every platforms. - [iOS] [Inbox] Fixed a crash when a notification's source was unknown
- Exposed promises in critical methods such as
optInin order to prevent potential race conditions - [iOS]
showPendingMessagewill now work correctly - [Android] Fixed potential crash in
showPendingMessagewhen the activity is not found
Documentation
- Added a guide in the doc for GDPR compliance
- [iOS] Added a guide in the doc for showing notifications on foreground