clevertap-react-native 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ {
2
+ "java.configuration.updateBuildConfiguration": "interactive"
3
+ }
package/CHANGELOG.md CHANGED
@@ -1,6 +1,41 @@
1
1
  Change Log
2
2
  ==========
3
3
 
4
+ Version 1.2.0 *(18th August 2023)*
5
+ -------------------------------------------
6
+
7
+ **What's new**
8
+
9
+ * **[Android Platform]**
10
+ * Supports [CleverTap Android SDK v5.2.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md#version-520-august-10-2023).
11
+ * ***Note: RenderMax Push SDK functionality is now supported directly within the CleverTap Core SDK***. Please remove the [integrated RenderMax SDK](https://developer.clevertap.com/docs/react-native-push-notification#integrate-rendermax-push-sdk-with-react-native) before you upgrade to CleverTap React Native SDK for this version.
12
+ * Adds support for developer defined default notification channel. Please refer to the [Usage.md](https://github.com/CleverTap/clevertap-react-native/blob/master/docs/usage.md#default-notification-channel) file to read more on how to setup default channel in your app. Also please note that this is only supported for CleverTap core notifications. Support for push templates will be released soon.
13
+
14
+ * **[iOS Platform]**
15
+ * Supports [CleverTap iOS SDK v5.2.0](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/5.2.0).
16
+
17
+ * **[Android and iOS Platform]**
18
+ * Adds support for encryption of PII data wiz. Email, Identity, Name and Phone. Please refer to [Usage.md](https://github.com/CleverTap/clevertap-react-native/blob/master/docs/usage.md#encryption-of-pii-data) file to read more on how to enable/disable encryption of PII data.
19
+ * Adds support for custom KV pairs common to all inbox messages in App Inbox.
20
+
21
+ **API Changes**
22
+ * **[Android Platform]**
23
+ * Adds `SCCampaignOptOut` Event to Restricted Events Name List for **internal use**.
24
+ * Adds custom sdk versions to `af` field for **internal use**.
25
+
26
+ **Breaking API Changes**
27
+ * **[Android Platform]**
28
+ * **CTFlushPushImpressionsWork breaks custom WorkerFactory implementation of an App**:
29
+ * If you are using custom `WorkFactory` implementation of `WorkManager` for Android platform then make sure that you correctly handle workers defined by CleverTap SDK and other third party dependencies.
30
+ * You must return `null` from `createWorker()` for any unknown workerClassName. Please check implementation provided in the blog [here](https://medium.com/androiddevelopers/customizing-workmanager-fundamentals-fdaa17c46dd2).
31
+
32
+ **Bug Fixes**
33
+ * **[Android Platform]**
34
+ * Fixes [#393](https://github.com/CleverTap/clevertap-android-sdk/issues/393) - push permission flow crash when context in CoreMetadata is null.
35
+ * Fixes [#428](https://github.com/CleverTap/clevertap-android-sdk/issues/428) - Race-condition when detecting if an in-app message should show.
36
+ * Fixes Push primer alert dialog freeze behavior, which became unresponsive when clicked outside the window.
37
+ * Fixes a bug where addMultiValueForKey and addMultiValuesForKey were overwriting the current values of the user properties instead of appending it.
38
+
4
39
  Version 1.1.2 *(31st July 2023)*
5
40
  -------------------------------------------
6
41
  **New Updates**
File without changes
@@ -0,0 +1,2 @@
1
+ #Wed May 24 10:54:09 IST 2023
2
+ gradle.version=6.1.1
File without changes
@@ -21,8 +21,8 @@ android {
21
21
  defaultConfig {
22
22
  minSdkVersion 19
23
23
  targetSdkVersion 33
24
- versionCode 111
25
- versionName "1.1.1"
24
+ versionCode 120
25
+ versionName "1.2.0"
26
26
  }
27
27
  buildTypes {
28
28
  release {
@@ -39,7 +39,7 @@ dependencies {
39
39
  maven { url "$rootDir/../node_modules/react-native/android" }
40
40
  }
41
41
 
42
- api 'com.clevertap.android:clevertap-android-sdk:5.0.0'
42
+ api 'com.clevertap.android:clevertap-android-sdk:5.2.0'
43
43
  implementation 'com.android.installreferrer:installreferrer:2.2'
44
44
  //compile 'com.android.support:appcompat-v7:28.0.0'
45
45
  implementation 'com.facebook.react:react-native:+'
@@ -18,6 +18,6 @@ Pod::Spec.new do |s|
18
18
  s.preserve_paths = 'LICENSE.md', 'README.md', 'package.json', 'index.js'
19
19
  s.source_files = 'ios/CleverTapReact/*.{h,m}'
20
20
 
21
- s.dependency 'CleverTap-iOS-SDK', '5.1.2'
21
+ s.dependency 'CleverTap-iOS-SDK', '5.2.0'
22
22
  s.dependency 'React-Core'
23
23
  end
package/docs/usage.md CHANGED
@@ -88,6 +88,25 @@ CleverTap.recordChargedEvent({'totalValue': 20, 'category': 'books'}, [{'title':
88
88
 
89
89
  -----------
90
90
 
91
+ ## Encryption of PII data
92
+ PII data is stored across the SDK and could be sensitive information. From CleverTap SDK v5.2.0 onwards, you can enable encryption for PII data wiz. Email, Identity, Name and Phone.
93
+
94
+ Currently 2 levels of encryption are supported i.e None(0) and Medium(1). Encryption level is None by default.
95
+ **None** - All stored data is in plaintext
96
+ **Medium** - PII data is encrypted completely.
97
+
98
+ #### Android
99
+ Add encryption level in the `AndroidManifest.xml` as following:
100
+ ```XML
101
+ <meta-data
102
+ android:name="CLEVERTAP_ENCRYPTION_LEVEL"
103
+ android:value="1" />
104
+ ```
105
+ #### iOS
106
+ Add the `CleverTapEncryptionLevel` String key to `info.plist` file where value 1 means Medium and 0 means None. Encryption Level will be None if any other value is provided.
107
+
108
+ -----------
109
+
91
110
  ## App Inbox
92
111
 
93
112
  #### Initialize the CleverTap App Inbox Method
@@ -213,6 +232,19 @@ Follow the [Push Primer integration doc](pushprimer.md).
213
232
  CleverTap.createNotificationChannel("CtRNS", "Clever Tap React Native Testing", "CT React Native Testing", 1, true);
214
233
  ```
215
234
 
235
+ #### Default Notification Channel
236
+ Starting from CleverTap React Native SDK v1.2.0, we have introduced a new feature that allows developers to define a default notification channel for their app. This feature provides flexibility in handling push notifications. Please note that this is only supported for clevertap core notifications. Support for push templates will be released soon. To specify the default notification channel ID, you can add the following metadata in your app's manifest file:
237
+
238
+ ```XML
239
+ <meta-data android:name="CLEVERTAP_DEFAULT_CHANNEL_ID" android:value="your_default_channel_id" />
240
+ ```
241
+
242
+ By including this metadata, you can define a specific notification channel that CleverTap will use if the channel provided in push payload is not registered by your app. This ensures that push notifications are displayed consistently even if the app's notification channels are not set up.
243
+
244
+ In case the SDK does not find the default channel ID specified in the manifest, it will automatically fallback to using a default channel called "Miscellaneous". This ensures that push notifications are still delivered, even if no specific default channel is specified in the manifest.
245
+
246
+ This enhancement provides developers with greater control over the default notification channel used by CleverTap for push notifications, ensuring a seamless and customizable user experience.
247
+
216
248
  #### Delete Notification Channel
217
249
 
218
250
  ```javascript
package/index.js CHANGED
@@ -9,7 +9,7 @@ const EventEmitter = NativeModules.CleverTapReactEventEmitter ? new NativeEventE
9
9
  * @param {int} libVersion - The updated library version. If current version is 1.1.0 then pass as 10100
10
10
  */
11
11
  const libName = 'React-Native';
12
- const libVersion = 10102;
12
+ const libVersion = 10200;
13
13
  CleverTapReact.setLibrary(libName,libVersion);
14
14
 
15
15
  function defaultCallback(method, err, res) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clevertap-react-native",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "CleverTap React Native SDK.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",