From 4e44187f74160abf038ad9689553446b659a1320 Mon Sep 17 00:00:00 2001 From: John Haupenthal Date: Fri, 15 Nov 2024 08:43:29 -0800 Subject: [PATCH 1/3] fix: move deps to peer deps --- README.md | 6 ++++++ package.json | 33 +++++++++++++++++---------------- yarn.lock | 17 ++++++----------- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 60f113b4b..d686a917a 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ Iterable's React Native SDK relies on: - [React Native 0.60.0+](https://github.com/facebook/react-native) - [React Native CLI 2.0.1+](https://reactnative.dev/docs/upgrading#react-native-cli) + _UI Components require additional peer dependencies_ + - [React Navigation 6+](https://github.com/react-navigation/react-navigation) + - [React Native Safe Area Context 4+](https://github.com/th3rdwave/react-native-safe-area-context) + - [React Native Vector Icons 9+](https://github.com/oblador/react-native-vector-icons) + - [React Native WebView 11+](https://github.com/react-native-webview/react-native-webview) + - **iOS** - Xcode 12+ - [Deployment target 10.0+](https://help.apple.com/xcode/mac/current/#/deve69552ee5) diff --git a/package.json b/package.json index 4ac5b82e0..581c97e55 100644 --- a/package.json +++ b/package.json @@ -20,45 +20,46 @@ "author": "Iterable", "license": "MIT", "homepage": "https://github.com/Iterable/react-native-sdk", - "dependencies": { - "@react-native-community/hooks": "^2.6.0", - "@react-navigation/native": "^6.0.6", - "eslint": "^8.0.1", - "eslint-config-airbnb": "^19.0.4", - "react-native-safe-area-context": "^4.1.2", - "react-native-vector-icons": "^9.0.0", - "react-native-webview": "^11.0.0" - }, "devDependencies": { "@babel/core": "^7.10.2", + "@react-navigation/native": "^6.0.6", "@testing-library/react-native": "^7.2.0", "@types/jest": "^26.0.0", - "@types/react": "^16.9.23", - "@types/react-native": "^0.62.13", "@types/react-native-vector-icons": "^6.4.10", + "@types/react-native": "^0.62.13", "@types/react-test-renderer": "^17.0.1", + "@types/react": "^16.9.23", "@typescript-eslint/eslint-plugin": "^5.0.0", - "eslint-config-standard": "^14.0.0", + "eslint-config-airbnb": "^19.0.4", "eslint-config-standard-jsx": "^8.1.0", "eslint-config-standard-react": "^9.2.0", "eslint-config-standard-with-typescript": "^23.0.0", + "eslint-config-standard": "^14.0.0", "eslint-plugin-import": "^2.25.2", "eslint-plugin-n": "^15.0.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.31.10", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0", + "eslint-plugin-react": "^7.31.10", "eslint-plugin-standard": "^4.0.0", + "eslint": "^8.0.1", "i": "^0.3.5", "jest": "^26.0.1", - "react": "16.11.0", + "react-native-safe-area-context": "^4.1.2", + "react-native-vector-icons": "^9.0.0", + "react-native-webview": "^11.0.0", "react-native": "^0.68.0", + "react": "16.11.0", "ts-jest": "^26.0.0", "typescript": "^3.9.5" }, "peerDependencies": { - "react": "*", - "react-native": "*" + "@react-navigation/native": ">=6", + "react-native-safe-area-context": ">=4", + "react-native-vector-icons": ">=9", + "react-native-webview": ">=11", + "react-native": "*", + "react": "*" } } diff --git a/yarn.lock b/yarn.lock index 0f0a4f7b4..654de04b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1240,11 +1240,6 @@ sudo-prompt "^9.0.0" wcwidth "^1.0.1" -"@react-native-community/hooks@^2.6.0": - version "2.8.1" - resolved "https://registry.yarnpkg.com/@react-native-community/hooks/-/hooks-2.8.1.tgz#6e785431db49318048fdd14b601998437b6cc200" - integrity sha512-DCmCIC0Gn9m6K0Mlg2MwNmTxMEpBu5lTLsI6b/XUAv/vLGa6o+X7RhCai4FWeqkjCU36+ZOwaLzDo4NBWMXaoQ== - "@react-native/assets@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@react-native/assets/-/assets-1.0.0.tgz#c6f9bf63d274bafc8e970628de24986b30a55c8e" @@ -6163,9 +6158,9 @@ react-native-gradle-plugin@^0.0.6: integrity sha512-eIlgtsmDp1jLC24dRn43hB3kEcZVqx6DUQbR0N1ABXGnMEafm9I3V3dUUeD1vh+Dy5WqijSoEwLNUPLgu5zDMg== react-native-safe-area-context@^4.1.2: - version "4.11.0" - resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.11.0.tgz#d45271363672dc1923ddb0ce5a6ad588e210c85d" - integrity sha512-Bg7bozxEB+ZS+H3tVYs5yY1cvxNXgR6nRQwpSMkYR9IN5CbxohLnSprrOPG/ostTCd4F6iCk0c51pExEhifSKQ== + version "4.14.0" + resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.14.0.tgz#138f4b2e180cb7517c78bd5f4d4cf91325ba0b1a" + integrity sha512-/SyYpCulWQOnnXhRq6wepkhoyQMowHm1ptDyRz20s+YS/R9mbd+mK+jFyFCyXFJn8jp7vFl43VUCgspuOiEbwA== react-native-vector-icons@^9.0.0: version "9.2.0" @@ -7468,9 +7463,9 @@ url-parse@^1.5.3: requires-port "^1.0.0" use-latest-callback@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/use-latest-callback/-/use-latest-callback-0.2.1.tgz#4d4e6a9e4817b13142834850dcfa8d24ca4569cf" - integrity sha512-QWlq8Is8BGWBf883QOEQP5HWYX/kMI+JTbJ5rdtvJLmXTIh9XoHIO3PQcmQl8BU44VKxow1kbQUHa6mQSMALDQ== + version "0.2.3" + resolved "https://registry.yarnpkg.com/use-latest-callback/-/use-latest-callback-0.2.3.tgz#2d644d3063040b9bc2d4c55bb525a13ae3de9e16" + integrity sha512-7vI3fBuyRcP91pazVboc4qu+6ZqM8izPWX9k7cRnT8hbD5svslcknsh3S9BUhaK11OmgTV4oWZZVSeQAiV53SQ== "use-subscription@>=1.0.0 <1.6.0": version "1.5.1" From 4346a6ff2d3262aa74f8080091fde5cf131c862e Mon Sep 17 00:00:00 2001 From: John Haupenthal Date: Fri, 15 Nov 2024 08:43:50 -0800 Subject: [PATCH 2/3] chore: bump version 1.3.21 --- CHANGELOG.md | 69 ++++++++++++++++++++++++------- README.md | 1 + SampleApp/javascript/package.json | 2 +- SampleApp/typescript/package.json | 2 +- integration-testing/package.json | 2 +- package.json | 2 +- 6 files changed, 58 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3069eac8..2036ee48c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,37 @@ +## 1.3.21 + +## Fixes + +- Fixes an issue where react native components that use safe-area-context or react-navigation throw an error because the sdk's components try and use its own local node_modules instead of the consumer's project. + ## 1.3.20 + ## Fixes + - Fixes an issue where the iOS SDK incorrectly targeted the latest minor version instead of a fixed version, potentially causing breaking changes. ## 1.3.19 + ## Updates + - updates to RN version 0.68.0 to address various security vulnerabilities ## 1.3.18 + ## Updates + - adds user id login for sample apps - version mapping to newest native SDK versions - updates versions of various package dependencies ## 1.3.17 + ## Fixed + - Fixes a specific Android issue where apps could crash due to EncryptedSharedPreference being null. ## 1.3.16 + ## Updates This release allows you to use projects hosted on Iterable's EU data center. If your project is hosted on Iterable's [European data center (EUDC)](https://support.iterable.com/hc/articles/17572750887444), configure the SDK to use Iterable's EU-based API endpoints: @@ -25,29 +40,36 @@ This release allows you to use projects hosted on Iterable's EU data center. If const config = new IterableConfig(); // ... other configuration options ... config.dataRegion = IterableDataRegion.EU; -Iterable.initialize('', config); +Iterable.initialize("", config); ``` ## Fixed + - Addressed push notification deep linking issues on Android where the app would restart instead of resuming the last activity upon being backgrounded. - Resolves an additional push notification problem on Android wherein the customActionHandler and urlHandler were not being invoked in specific scenarios, as documented in issue #470. (Credit to @tnortman-jabra for the report and the fix) ## 1.3.15 + ## Updates + - Resolves Android build issues caused in 1.3.14 - Fixes a specific Android issue where custom action handlers were not invoked when tapping on push notification when the app is in background. ## 1.3.14 + > **Warning** > This version causes build failure on Android. Please use 1.3.15 which fixes this issue. + ## updates + - updates `Iterable.setEmail` and `Iterable.setUserId` to take in null parameter type - fixes `Iterable.updateUser` on the Android side to merge nested objects in the user profile when `mergeNestedObjects` is set to true ## 1.3.9 + ### Added -[Version 1.3.9](https://github.com/Iterable/react-native-sdk/releases/tag/1.3.9) of Iterable's React Native SDK makes it possible for iOS apps to store in- app messages in memory, rather than in an unencrypted local file. ([Version 1.3.7](https://github.com/Iterable/react-native-sdk/releases/tag/1.3.7) added this same support for Android.) +[Version 1.3.9](https://github.com/Iterable/react-native-sdk/releases/tag/1.3.9) of Iterable's React Native SDK makes it possible for iOS apps to store in- app messages in memory, rather than in an unencrypted local file. ([Version 1.3.7](https://github.com/Iterable/react-native-sdk/releases/tag/1.3.7) added this same support for Android.) To store in-app messages in memory on both iOS and Android, set `useInMemoryStorageForInApps` to `true`: @@ -55,24 +77,26 @@ To store in-app messages in memory on both iOS and Android, set `useInMemoryStor const config = new IterableConfig(); // ... other configuration options ... config.useInMemoryStorageForInApps = true; -Iterable.initialize('', config); +Iterable.initialize("", config); ``` -This release deprecates `androidSdkUseInMemoryStorageForInApps`, which was introduced in version 1.3.7, and replaces it with `useInMemoryStorageForInApps`. However, for now: +This release deprecates `androidSdkUseInMemoryStorageForInApps`, which was introduced in version 1.3.7, and replaces it with `useInMemoryStorageForInApps`. However, for now: -- Android apps store in-app messages in memory if `useInMemoryStorageForInApps` is `true`, `androidSdkUseInMemoryStorageForInApps` is `true`, or if both are `true`. +- Android apps store in-app messages in memory if `useInMemoryStorageForInApps` is `true`, `androidSdkUseInMemoryStorageForInApps` is `true`, or if both are `true`. - iOS apps store in-app messages in memory if `useInMemoryStorageForInApps` is `true`. `androidSdkUseInMemoryStorageForInApps` does not affect iOS apps. When you can, please update your apps to use `useInMemoryStorageForInApps` instead of `androidSdkUseInMemoryStorageForInApps`. -When users upgrade to a version of your iOS or Android app that uses this version of the SDK (or higher), and they've enabled in-app memory storage, the local file used for in-app message storage (if it already exists) is deleted. However, no data is lost. +When users upgrade to a version of your iOS or Android app that uses this version of the SDK (or higher), and they've enabled in-app memory storage, the local file used for in-app message storage (if it already exists) is deleted. However, no data is lost. ## 1.3.7 + Starting with this release, as a privacy enhancement, Iterable’s React Native SDK encrypts some data stored at rest. #### iOS updates + In iOS apps, Iterable's React Native SDK now encrypts the following fields when storing them at rest: @@ -86,7 +110,7 @@ storing them at rest: messages at rest—before or after this update.) When a user upgrades to a version of your app that uses this version of the SDK -(or higher), the fields shown above are encrypted. No data that's already stored +(or higher), the fields shown above are encrypted. No data that's already stored is lost. For more information about this encryption in iOS, examine the source code for @@ -96,10 +120,12 @@ Iterable's iOS SDK (upon which the React Native SDK relies): - [`KeychainWrapper`](https://github.com/Iterable/swift-sdk/blob/master/swift-sdk/Internal/KeychainWrapper.swift) #### Android updates + For Android, this release includes support for encrypting some data at rest, and an option to store in-app messages in memory. ##### Encrypted data + In Android apps with `minSdkVersion` 23 or higher ([Android 6.0](https://developer.android.com/studio/releases/platforms#6.0)) Iterable's React Native SDK now encrypts the following fields when storing them at rest: @@ -111,31 +137,33 @@ them at rest: (Note that, in Android apps, Iterable's React Native SDK does not store the last push payload at rest—before or after this update.) -For more information about this encryption in Android, examine the source code +For more information about this encryption in Android, examine the source code for Iterable's Android SDK (upon which the React Native SDK relies): [`IterableKeychain`](https://github.com/Iterable/iterable-android-sdk/blob/master/iterableapi/src/main/java/com/iterable/iterableapi/IterableKeychain.kt). ##### Storing in-app messages in memory -This release also allows you to have your Android apps (regardless of `minSdkVersion`) + +This release also allows you to have your Android apps (regardless of `minSdkVersion`) store in-app messages in memory, rather than in an unencrypted local file. However, an unencrypted local file is still the default option. -To store in-app messages in memory, on `IterableConfig`, set +To store in-app messages in memory, on `IterableConfig`, set `androidSdkUseInMemoryStorageForInApps` to `true` (defaults to `false`): ```javascript const config = new IterableConfig(); // ... other configuration options ... config.androidSdkUseInMemoryStorageForInApps = true; -Iterable.initialize('', config); +Iterable.initialize("", config); ``` When users upgrade to a version of your Android app that uses this version of -the SDK (or higher), and you've set this configuration option to `true`, the +the SDK (or higher), and you've set this configuration option to `true`, the local file used for in-app message storage (if it already exists) is deleted However, no data is lost. ##### Android upgrade instructions + If your app targets API level 23 or higher, this is a standard SDK upgrade, with no special instructions. @@ -145,22 +173,28 @@ encrypt data): 1. In `AndroidManifest.xml`, add `` 2. In your app's `app/build.gradle`: - - Add `multiDexEnabled true` to the `default` object, under `android`. - - Add `implementation androidx.multidex:multidex:2.0.1` to the `dependencies`. + +- Add `multiDexEnabled true` to the `default` object, under `android`. +- Add `implementation androidx.multidex:multidex:2.0.1` to the `dependencies`. ### Objective-C compatibility headers for React Native 0.68+ + To help solve build errors that can arise when using Iterable's SDK with React Native 0.68+, which uses Objective-C++, we've created some Objective-C -compatibility headers that you can import into your project. For details, read +compatibility headers that you can import into your project. For details, read [Installing Iterable's React Native SDK — Step 3.3: Import the SDK](https://support.iterable.com/hc/articles/360045714132#step-3-3-import-the-sdk). ## 1.1.0 + #### Added + - Offline events processing This feature saves a local copy of events triggered in your app while the device is offline (up to 1000 events). When a connection is re-established and your app is in the foreground, the events will be sent to Iterable. Offline events processing is off by default, and we're rolling it out on a customer-by-customer basis. After you start using this version of the SDK, we'll send you a message before we enable the feature on your account (unfortunately, we can't give you an exact timeline for when this will happen). If you have any questions, talk to your Iterable customer success manager. To use this feature, you must follow the SDK [upgrade instructions](#upgrade-instructions-for-version-1-1-0). + #### Updated + - New properties on the `IterableCommerceItem` class The `IterableCommerceItem` class (which you can pass to the `trackPurchase` method on the `Iterable` class) now includes additional properties (all optional): - `sku` (string) - The item's SKU @@ -168,8 +202,11 @@ compatibility headers that you can import into your project. For details, read - `url` (string) - A URL associated with the item - `imageUrl` (string) - A URL that points to an image of the item - `categories` (string) - Categories to associate with the item + #### Upgrade instructions for version 1.1.0 + To use this version of Iterable's React Native SDK, you'll need to update your native Android application's `Application` class: + - Add this import: ```java import com.iterable.iterableapi.IterableApi; @@ -177,4 +214,4 @@ To use this version of Iterable's React Native SDK, you'll need to update your n - At the end of the `onCreate` method, add this line of code: ```java IterableApi.setContext(this); - ``` \ No newline at end of file + ``` diff --git a/README.md b/README.md index d686a917a..9fc714222 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ For quick reference, the following table lists the versions of the [Android SDK] | RN SDK Version | Android SDK Version | iOS SDK Version | | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------- | +| [1.3.21](https://www.npmjs.com/package/@iterable/react-native-sdk/v/1.3.20) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.4](https://github.com/Iterable/swift-sdk/releases/tag/6.5.4) | [1.3.20](https://www.npmjs.com/package/@iterable/react-native-sdk/v/1.3.20) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.4](https://github.com/Iterable/swift-sdk/releases/tag/6.5.4) | [1.3.19](https://www.npmjs.com/package/@iterable/react-native-sdk/v/1.3.19) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.3](https://github.com/Iterable/swift-sdk/releases/tag/6.5.3) | [1.3.18](https://www.npmjs.com/package/@iterable/react-native-sdk/v/1.3.18) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.3](https://github.com/Iterable/swift-sdk/releases/tag/6.5.3) diff --git a/SampleApp/javascript/package.json b/SampleApp/javascript/package.json index 76799257d..1dca2e196 100644 --- a/SampleApp/javascript/package.json +++ b/SampleApp/javascript/package.json @@ -10,7 +10,7 @@ "lint": "eslint ." }, "dependencies": { - "@iterable/react-native-sdk": "^1.3.20", + "@iterable/react-native-sdk": "^1.3.21", "@react-native-community/masked-view": "^0.1.10", "@react-native-community/toolbar-android": "^0.1.0-rc.2", "@react-navigation/bottom-tabs": "^5.4.5", diff --git a/SampleApp/typescript/package.json b/SampleApp/typescript/package.json index 76799257d..1dca2e196 100644 --- a/SampleApp/typescript/package.json +++ b/SampleApp/typescript/package.json @@ -10,7 +10,7 @@ "lint": "eslint ." }, "dependencies": { - "@iterable/react-native-sdk": "^1.3.20", + "@iterable/react-native-sdk": "^1.3.21", "@react-native-community/masked-view": "^0.1.10", "@react-native-community/toolbar-android": "^0.1.0-rc.2", "@react-navigation/bottom-tabs": "^5.4.5", diff --git a/integration-testing/package.json b/integration-testing/package.json index 5b3798711..901f9081f 100644 --- a/integration-testing/package.json +++ b/integration-testing/package.json @@ -10,7 +10,7 @@ "e2e:android-release": "npm run build:android-release && npm run test:android-release" }, "dependencies": { - "@iterable/react-native-sdk": "^1.3.20", + "@iterable/react-native-sdk": "^1.3.21", "@react-native-community/masked-view": "^0.1.10", "@react-navigation/bottom-tabs": "^5.4.5", "@react-navigation/native": "^5.4.0", diff --git a/package.json b/package.json index 581c97e55..9cb7280ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@iterable/react-native-sdk", - "version": "1.3.20", + "version": "1.3.21", "description": "Iterable SDK for React Native.", "main": "./js/index.js", "types": "./js/index.d.ts", From f21d5efe8079e1d5734cb009b83550764ffd449f Mon Sep 17 00:00:00 2001 From: John Haupenthal Date: Fri, 15 Nov 2024 08:52:14 -0800 Subject: [PATCH 3/3] fix: revert changelog linting --- CHANGELOG.md | 65 +++++++++++++--------------------------------------- 1 file changed, 16 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2036ee48c..af2c746c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,37 +1,26 @@ ## 1.3.21 - ## Fixes - - Fixes an issue where react native components that use safe-area-context or react-navigation throw an error because the sdk's components try and use its own local node_modules instead of the consumer's project. ## 1.3.20 - ## Fixes - - Fixes an issue where the iOS SDK incorrectly targeted the latest minor version instead of a fixed version, potentially causing breaking changes. ## 1.3.19 - ## Updates - - updates to RN version 0.68.0 to address various security vulnerabilities ## 1.3.18 - ## Updates - - adds user id login for sample apps - version mapping to newest native SDK versions - updates versions of various package dependencies ## 1.3.17 - ## Fixed - - Fixes a specific Android issue where apps could crash due to EncryptedSharedPreference being null. ## 1.3.16 - ## Updates This release allows you to use projects hosted on Iterable's EU data center. If your project is hosted on Iterable's [European data center (EUDC)](https://support.iterable.com/hc/articles/17572750887444), configure the SDK to use Iterable's EU-based API endpoints: @@ -40,36 +29,29 @@ This release allows you to use projects hosted on Iterable's EU data center. If const config = new IterableConfig(); // ... other configuration options ... config.dataRegion = IterableDataRegion.EU; -Iterable.initialize("", config); +Iterable.initialize('', config); ``` ## Fixed - - Addressed push notification deep linking issues on Android where the app would restart instead of resuming the last activity upon being backgrounded. - Resolves an additional push notification problem on Android wherein the customActionHandler and urlHandler were not being invoked in specific scenarios, as documented in issue #470. (Credit to @tnortman-jabra for the report and the fix) ## 1.3.15 - ## Updates - - Resolves Android build issues caused in 1.3.14 - Fixes a specific Android issue where custom action handlers were not invoked when tapping on push notification when the app is in background. ## 1.3.14 - > **Warning** > This version causes build failure on Android. Please use 1.3.15 which fixes this issue. - ## updates - - updates `Iterable.setEmail` and `Iterable.setUserId` to take in null parameter type - fixes `Iterable.updateUser` on the Android side to merge nested objects in the user profile when `mergeNestedObjects` is set to true ## 1.3.9 - ### Added -[Version 1.3.9](https://github.com/Iterable/react-native-sdk/releases/tag/1.3.9) of Iterable's React Native SDK makes it possible for iOS apps to store in- app messages in memory, rather than in an unencrypted local file. ([Version 1.3.7](https://github.com/Iterable/react-native-sdk/releases/tag/1.3.7) added this same support for Android.) +[Version 1.3.9](https://github.com/Iterable/react-native-sdk/releases/tag/1.3.9) of Iterable's React Native SDK makes it possible for iOS apps to store in- app messages in memory, rather than in an unencrypted local file. ([Version 1.3.7](https://github.com/Iterable/react-native-sdk/releases/tag/1.3.7) added this same support for Android.) To store in-app messages in memory on both iOS and Android, set `useInMemoryStorageForInApps` to `true`: @@ -77,26 +59,24 @@ To store in-app messages in memory on both iOS and Android, set `useInMemoryStor const config = new IterableConfig(); // ... other configuration options ... config.useInMemoryStorageForInApps = true; -Iterable.initialize("", config); +Iterable.initialize('', config); ``` -This release deprecates `androidSdkUseInMemoryStorageForInApps`, which was introduced in version 1.3.7, and replaces it with `useInMemoryStorageForInApps`. However, for now: +This release deprecates `androidSdkUseInMemoryStorageForInApps`, which was introduced in version 1.3.7, and replaces it with `useInMemoryStorageForInApps`. However, for now: -- Android apps store in-app messages in memory if `useInMemoryStorageForInApps` is `true`, `androidSdkUseInMemoryStorageForInApps` is `true`, or if both are `true`. +- Android apps store in-app messages in memory if `useInMemoryStorageForInApps` is `true`, `androidSdkUseInMemoryStorageForInApps` is `true`, or if both are `true`. - iOS apps store in-app messages in memory if `useInMemoryStorageForInApps` is `true`. `androidSdkUseInMemoryStorageForInApps` does not affect iOS apps. When you can, please update your apps to use `useInMemoryStorageForInApps` instead of `androidSdkUseInMemoryStorageForInApps`. -When users upgrade to a version of your iOS or Android app that uses this version of the SDK (or higher), and they've enabled in-app memory storage, the local file used for in-app message storage (if it already exists) is deleted. However, no data is lost. +When users upgrade to a version of your iOS or Android app that uses this version of the SDK (or higher), and they've enabled in-app memory storage, the local file used for in-app message storage (if it already exists) is deleted. However, no data is lost. ## 1.3.7 - Starting with this release, as a privacy enhancement, Iterable’s React Native SDK encrypts some data stored at rest. #### iOS updates - In iOS apps, Iterable's React Native SDK now encrypts the following fields when storing them at rest: @@ -110,7 +90,7 @@ storing them at rest: messages at rest—before or after this update.) When a user upgrades to a version of your app that uses this version of the SDK -(or higher), the fields shown above are encrypted. No data that's already stored +(or higher), the fields shown above are encrypted. No data that's already stored is lost. For more information about this encryption in iOS, examine the source code for @@ -120,12 +100,10 @@ Iterable's iOS SDK (upon which the React Native SDK relies): - [`KeychainWrapper`](https://github.com/Iterable/swift-sdk/blob/master/swift-sdk/Internal/KeychainWrapper.swift) #### Android updates - For Android, this release includes support for encrypting some data at rest, and an option to store in-app messages in memory. ##### Encrypted data - In Android apps with `minSdkVersion` 23 or higher ([Android 6.0](https://developer.android.com/studio/releases/platforms#6.0)) Iterable's React Native SDK now encrypts the following fields when storing them at rest: @@ -137,33 +115,31 @@ them at rest: (Note that, in Android apps, Iterable's React Native SDK does not store the last push payload at rest—before or after this update.) -For more information about this encryption in Android, examine the source code +For more information about this encryption in Android, examine the source code for Iterable's Android SDK (upon which the React Native SDK relies): [`IterableKeychain`](https://github.com/Iterable/iterable-android-sdk/blob/master/iterableapi/src/main/java/com/iterable/iterableapi/IterableKeychain.kt). ##### Storing in-app messages in memory - -This release also allows you to have your Android apps (regardless of `minSdkVersion`) +This release also allows you to have your Android apps (regardless of `minSdkVersion`) store in-app messages in memory, rather than in an unencrypted local file. However, an unencrypted local file is still the default option. -To store in-app messages in memory, on `IterableConfig`, set +To store in-app messages in memory, on `IterableConfig`, set `androidSdkUseInMemoryStorageForInApps` to `true` (defaults to `false`): ```javascript const config = new IterableConfig(); // ... other configuration options ... config.androidSdkUseInMemoryStorageForInApps = true; -Iterable.initialize("", config); +Iterable.initialize('', config); ``` When users upgrade to a version of your Android app that uses this version of -the SDK (or higher), and you've set this configuration option to `true`, the +the SDK (or higher), and you've set this configuration option to `true`, the local file used for in-app message storage (if it already exists) is deleted However, no data is lost. ##### Android upgrade instructions - If your app targets API level 23 or higher, this is a standard SDK upgrade, with no special instructions. @@ -173,28 +149,22 @@ encrypt data): 1. In `AndroidManifest.xml`, add `` 2. In your app's `app/build.gradle`: - -- Add `multiDexEnabled true` to the `default` object, under `android`. -- Add `implementation androidx.multidex:multidex:2.0.1` to the `dependencies`. + - Add `multiDexEnabled true` to the `default` object, under `android`. + - Add `implementation androidx.multidex:multidex:2.0.1` to the `dependencies`. ### Objective-C compatibility headers for React Native 0.68+ - To help solve build errors that can arise when using Iterable's SDK with React Native 0.68+, which uses Objective-C++, we've created some Objective-C -compatibility headers that you can import into your project. For details, read +compatibility headers that you can import into your project. For details, read [Installing Iterable's React Native SDK — Step 3.3: Import the SDK](https://support.iterable.com/hc/articles/360045714132#step-3-3-import-the-sdk). ## 1.1.0 - #### Added - - Offline events processing This feature saves a local copy of events triggered in your app while the device is offline (up to 1000 events). When a connection is re-established and your app is in the foreground, the events will be sent to Iterable. Offline events processing is off by default, and we're rolling it out on a customer-by-customer basis. After you start using this version of the SDK, we'll send you a message before we enable the feature on your account (unfortunately, we can't give you an exact timeline for when this will happen). If you have any questions, talk to your Iterable customer success manager. To use this feature, you must follow the SDK [upgrade instructions](#upgrade-instructions-for-version-1-1-0). - #### Updated - - New properties on the `IterableCommerceItem` class The `IterableCommerceItem` class (which you can pass to the `trackPurchase` method on the `Iterable` class) now includes additional properties (all optional): - `sku` (string) - The item's SKU @@ -202,11 +172,8 @@ compatibility headers that you can import into your project. For details, read - `url` (string) - A URL associated with the item - `imageUrl` (string) - A URL that points to an image of the item - `categories` (string) - Categories to associate with the item - #### Upgrade instructions for version 1.1.0 - To use this version of Iterable's React Native SDK, you'll need to update your native Android application's `Application` class: - - Add this import: ```java import com.iterable.iterableapi.IterableApi; @@ -214,4 +181,4 @@ To use this version of Iterable's React Native SDK, you'll need to update your n - At the end of the `onCreate` method, add this line of code: ```java IterableApi.setContext(this); - ``` + ``` \ No newline at end of file