Releases: bamlab/react-native-batch-push
v6.0.0-rc.2
This is a pre-release for the next version of @bam.tech/react-native-batch. There are several breaking changes (indicated with [BREAKING]) so please read along. The documentation hosted on GitHub has not been updated as this is still a pre-release. The following changelog may evolve with new breaking changes until the stable version.
See rc.0 changelog and rc.1 changelog too.
- [iOS] [Inbox] Fixed a crash when a notification's source was unknown
- [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.
Before:
import { BatchInbox } from '@bam.tech/react-native-batch';
BatchInbox.fetchNotifications().then(console.log);
After:
const fetcher = await BatchInbox.getFetcher();
await fetcher.fetchNewNotifications().then(({ notifications }) => console.log(notifications));
await fetcher.destroy();
But you can also do things like:
// in real life, you would use some useState/useReducer, and don't forget to call fetcher.destroy() when the component unmounts to free up memory
const fetcher = await BatchInbox.getFetcher({
maxPageSize: 1,
fetchLimit: 5,
user: { identifier: 'test', authenticationKey: 'secretGeneratedOnBackend' },
});
const allNotifications = [];
const { notifications: initialNotifications, endReached } = fetcher.fetchNewNotifications();
allNotifications.push(initialNotifications);
if (!endReached) {
const { notifications: nextPage } = await fetcher.fetchNextPage();
allNotifications.push(nextPage);
}
if (allNotifications.length) {
await fetcher.markNotificationAsRead(allNotifications[0].identifier);
}
await fetcher.destroy();
v6.0.0-rc.1
This is a pre-release for the next version of @bam.tech/react-native-batch. There are several breaking changes (indicated with [BREAKING]) so please read along. The documentation hosted on GitHub has not been updated as this is still a pre-release. The following changelog may evolve with new breaking changes until the stable version.
See rc.0 changelog too.
- Added
BatchPush.getInitialURL
to workaround issues on iOS to get the deeplink associated to the notification that opened the app initially.Linking.getInitialURL
can be replaced byBatchPush.getInitialURL
on every platforms.
v6.0.0-rc.0
This is a pre-release for the next version of @bam.tech/react-native-batch. There are several breaking changes (indicated with [BREAKING]) so please read along. The documentation hosted on GitHub has not been updated as this is still a pre-release. The following changelog may evolve with new breaking changes until the stable 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] 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
README
section on configuring auto-linking
- Fixed a GDPR scenario case where the Batch iOS/Android SDK might not be started
- Chaining Batch User editor is now optional
- [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) - Added
Batch.showDebugView()
so that you can easily debug your Batch installation - Added
BatchMessaging.setFontOverride()
so that you can change the font of messaging views (eg. In-app campaigns landings) - Added a guide in the doc for GDPR compliance
- [iOS] Added a guide in the doc for showing notifications on foreground
v5.0.3
v5.0.0
Breaking change : only difference with 4.1.2 is that your project must use AndroidX rather than Android Support library
v3.0.0 - Replace GCM with FCM (Android)
In order to migrate:
- Remove GCM sender ID from your code and environment variables
- Remove the
com.google.android.gms:play-services-gcm
dependency - Add the
com.google.firebase:firebase-messaging
dependency
v2.2.1
- [Android] [Inbox] Fixed a crash that could occur when the context was null
v2.2.0
v2.1.0
v2.0.0
- [BC] fetchNewNotifications now takes an additional
authKey
parameter