SDK changelog

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:
      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] 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 disableDoNotDisturbAndShowPendingMessage for 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 disableDoNotDisturbAndShowPendingMessage when ready, or disable do not disturb manually).
    • [BREAKING] Batch.start is now useless so it has been removed. You must remove any call to Batch.start in 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]

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 README section on configuring auto-linking
  • Fixed a GDPR scenario case where the Batch iOS/Android SDK might not be started
  • 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.
  • [iOS] [Inbox] Fixed a crash when a notification's source was unknown
  • Exposed promises in critical methods such as optIn in order to prevent potential race conditions
  • [iOS] showPendingMessage will now work correctly
  • [Android] Fixed potential crash in showPendingMessage when 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