Releases: BatchLabs/Batch-React-Native-Plugin
Releases · BatchLabs/Batch-React-Native-Plugin
9.0.1
Expo
- Fixed an issue on iOS where the
RNBatchimport was not added during the Expo pre-build.
9.0.0
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
minSdklevel of 21 or higher.
iOS
- The Batch React-Native plugin now automatically registers its own
UNUserNotificationCenterDelegateand forwards it to the previous one if it exists.
This means you no longer need to add[BatchUNUserNotificationCenterDelegate registerAsDelegate]in yourAppDelegate, please delete it.
It can be disabled by callingBatchBridgeNotificationCenterDelegate.automaticallyRegister = falsebefore[RNBatch start].
Core
- Added method
isOptedOutto checks whether Batch has been opted out from or not. - Added method
updateAutomaticDataCollectionto fine-tune the data you authorize to be tracked by Batch.
User
- Removed method
trackTransactionwith no equivalent. - Removed method
BatchUser.editorand the related classBatchUserEditor, you should now useBatchProfile.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 useBatchProfile.trackEvent. BatchEventDatahas been renamed intoBatchEventAttributes.- Removed
addTagAPI fromBatchEventDataYou should now use the$tagskey withputmethod. - Removed parameter
labelfromtrackEventAPI. You should now use the$labelkey inBatchEventAttributeswith theput(string, string)method. - Added support for values of type: Array and Object to the
putmethod.
Profile
Introduced BatchProfile, a new module that enables interacting with profiles. Its functionality replaces most of BatchUser used to do.
- Added
identifyAPI as replacement ofBatchUser.editor().setIdentifier. - Added
editormethod to get a new instance of aBatchProfileAttributeEditoras replacement ofBatchUserEditor. - Added
trackEventAPI as replacement of theBatchUser.trackEventmethods. - Added
trackLocationAPI as replacement of theBatchUser.trackLocationmethod.
Expo
- Added configuration field
enableDefaultOptOutto control whether Batch is opted out from by default. (default: false) - Added configuration fields
enableProfileCustomIDMigrationandenableProfileCustomDataMigrationto control whether Batch should trigger the profile migrations (default: true).
8.2.0
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.2
Plugin
- Fixed an issue on Android where
openpush message events queued on cold start were sent before we could register a listener.
8.1.1
Plugin
- Fixed an issue where listening for
openpush message events wasn't working on cold start.
8.1.0
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.2
Plugin
- Batch requires Xcode 13.3.1
- Fixed autolinking on react-native 0.69+ and Expo 46
8.0.1
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.
8.0.0
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.