Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Releases: bamlab/react-native-batch-push

v6.0.0-rc.2

31 May 03:35
Compare
Choose a tag to compare
v6.0.0-rc.2 Pre-release
Pre-release

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

14 May 10:12
Compare
Choose a tag to compare
v6.0.0-rc.1 Pre-release
Pre-release

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 by BatchPush.getInitialURL on every platforms.

v6.0.0-rc.0

05 May 10:17
Compare
Choose a tag to compare
v6.0.0-rc.0 Pre-release
Pre-release

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:
      1. [BREAKING] Make sure to update your Podfile Batch SDK version
      2. [BREAKING] Batch requires Xcode 12 and iOS 10.0 or higher
      3. [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:
      1. [BREAKING] Make sure to have up-to-date android build tools (see Android blog)
  • [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

All changes

v5.0.3

06 Feb 08:41
Compare
Choose a tag to compare
:bookmark: v5.0.3

v5.0.0

30 Aug 13:42
Compare
Choose a tag to compare

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)

04 Dec 15:10
0c42f40
Compare
Choose a tag to compare

In order to migrate:

  1. Remove GCM sender ID from your code and environment variables
  2. Remove the com.google.android.gms:play-services-gcm dependency
  3. Add the com.google.firebase:firebase-messaging dependency

v2.2.1

06 Feb 10:55
Compare
Choose a tag to compare
  • [Android] [Inbox] Fixed a crash that could occur when the context was null

v2.2.0

18 Jan 14:46
Compare
Choose a tag to compare
  • Added setAttribute and trackLocation (#4 - Thanks @tpucci!)

v2.1.0

08 Dec 13:52
Compare
Choose a tag to compare
  • Added support for Inbox on iOS (with @chdeps)

v2.0.0

25 Oct 14:16
Compare
Choose a tag to compare
  • [BC] fetchNewNotifications now takes an additional authKey parameter