Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
14 changes: 11 additions & 3 deletions src/inApp/classes/IterableInAppManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/itblBuildInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
* It contains the version of the package
*/
export const buildInfo = {
version: '3.2.0',
version: '3.2.1',
};
Loading