diff --git a/CHANGELOG.md b/CHANGELOG.md index 771a9fca4..c0673d32c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,13 @@ - Fixed the Android module failing to compile against its pinned native Android SDK 3.10.1 in 3.2.0. The bridge now implements `onEmbeddedMessagingSyncSucceeded` and `onEmbeddedMessagingSyncFailed` from `IterableEmbeddedUpdateHandler` as no-ops, matching the native defaults. - Fixed an Android crash in `Iterable.inAppManager.showMessage` (`IllegalStateException: Method addObserver must be called on the main thread`), present since 3.2.0. - The bridge now displays the message on the main thread, matching `setAutoDisplayPaused` and the iOS SDK. It was calling the native in-app displayer on the React Native native-modules thread, which crashes when the current activity is not a `FragmentActivity` (for example a Jetpack Compose `ComponentActivity`). - - The promise now rejects when the message id is no longer in the native queue instead of crashing with a `NullPointerException`. + - The promise now rejects when the message id is empty or no longer in the native queue instead of crashing with a `NullPointerException`. - Dismissing a message by tapping outside it now resolves the promise with `null` instead of crashing on `url.toString()`. +### Updates + +- Documented minimum supported React Native (**0.77+**) and React (**18.3.1+**) versions in the README. + ## 3.2.0 ### Updates diff --git a/README.md b/README.md index 2c402c7c6..9eb6e6207 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ For quick reference, the following table lists the versions of the [Android SDK] | RN SDK Version | Android SDK Version | iOS SDK Version | | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------- | +| [3.2.1](https://www.npmjs.com/package/@iterable/react-native-sdk/v/3.2.1) | [3.10.1](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.10.1) | [6.7.5](https://github.com/Iterable/swift-sdk/releases/tag/6.7.5) | [3.2.0](https://www.npmjs.com/package/@iterable/react-native-sdk/v/3.2.0) | [3.10.1](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.10.1) | [6.7.5](https://github.com/Iterable/swift-sdk/releases/tag/6.7.5) | [3.1.0](https://www.npmjs.com/package/@iterable/react-native-sdk/v/3.1.0) | [3.6.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.6.2) | [6.6.7](https://github.com/Iterable/swift-sdk/releases/tag/6.6.7) | [3.0.1](https://www.npmjs.com/package/@iterable/react-native-sdk/v/3.0.1) | [3.6.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.6.2) | [6.6.3](https://github.com/Iterable/swift-sdk/releases/tag/6.6.3) diff --git a/package.json b/package.json index a4067b684..1245c59a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@iterable/react-native-sdk", - "version": "3.2.0", + "version": "3.2.1", "description": "Iterable SDK for React Native.", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/src/inApp/classes/IterableInAppManager.ts b/src/inApp/classes/IterableInAppManager.ts index ae34f80d1..675e01587 100644 --- a/src/inApp/classes/IterableInAppManager.ts +++ b/src/inApp/classes/IterableInAppManager.ts @@ -82,15 +82,23 @@ export class IterableInAppManager { * * @example * ```typescript - * Iterable.inAppManager.showMessage(message, false).then(url => { - * console.log("url: " + url) - * }); + * Iterable.inAppManager + * .showMessage(message, false) + * .then(url => { + * console.log("url: " + url) + * }) + * .catch(error => { + * console.log("Could not show message: " + error.message) + * }); * ``` * * @param message - The message to show (an {@link IterableInAppMessage} object) * @param consume - Whether or not the message should be consumed from the user's message queue after being shown. This should be defaulted to true. * * @returns A Promise that resolves to the URL of the button or link the user tapped to close the in-app message. + * On Android, it resolves to `null` when the user closes the message by tapping outside it, and rejects when the + * message id is empty or the message is not in the local queue. In other cases, such as when the message can't be + * displayed, the Promise may not settle. */ showMessage( message: IterableInAppMessage, diff --git a/src/itblBuildInfo.ts b/src/itblBuildInfo.ts index cf113768f..f2cd6f12e 100644 --- a/src/itblBuildInfo.ts +++ b/src/itblBuildInfo.ts @@ -3,5 +3,5 @@ * It contains the version of the package */ export const buildInfo = { - version: '3.2.0', + version: '3.2.1', };