clevertap-react-native 1.1.1 → 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.
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +63 -11
- package/android/build.gradle +3 -3
- package/clevertap-react-native.podspec +1 -1
- package/docs/usage.md +32 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,58 @@
|
|
|
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
|
+
|
|
39
|
+
Version 1.1.2 *(31st July 2023)*
|
|
40
|
+
-------------------------------------------
|
|
41
|
+
**New Updates**
|
|
42
|
+
- Supports [CleverTap iOS SDK v5.1.2](https://github.com/CleverTap/clevertap-ios-sdk/blob/master/CHANGELOG.md#version-512-july-28-2023).
|
|
43
|
+
|
|
44
|
+
**Bug Fixes**
|
|
45
|
+
- [iOS platform]Fixed a bug where the App Inbox would appear empty.
|
|
46
|
+
|
|
4
47
|
Version 1.1.1 *(2nd May 2023)*
|
|
5
48
|
-------------------------------------------
|
|
6
49
|
- Bug fixes and performance improvements.
|
|
7
50
|
|
|
8
51
|
Version 1.1.0 *(29th May 2023)*
|
|
9
52
|
-------------------------------------------
|
|
10
|
-
**New
|
|
53
|
+
**New Updates**
|
|
54
|
+
- Supports [CleverTap Android SDK v5.0.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md#version-500-may-5-2023).
|
|
55
|
+
- Supports [CleverTap iOS SDK v5.0.1](https://github.com/CleverTap/clevertap-ios-sdk/blob/master/CHANGELOG.md#version-501-may-17-2023).
|
|
11
56
|
- Adds support for **Remote Config Variables**. Please refer to the [Remote Config Variables doc](https://github.com/CleverTap/clevertap-react-native/blob/da2c3188fb5db6248f136e52f4b9e3372c26e78a/docs/Variables.md) to read more on how to integrate this to your app.
|
|
12
57
|
- Adds new API `dismissInbox()` to dismiss the App Inbox screen.
|
|
13
58
|
- Adds new APIs, `markReadInboxMessagesForIDs(Array)` and `deleteInboxMessagesForIDs(Array)` to mark read and delete an array of Inbox Messages respectively.
|
|
@@ -17,19 +62,26 @@ Version 1.1.0 *(29th May 2023)*
|
|
|
17
62
|
***Deprecated:*** The following methods and classes related to Product Config and Feature Flags have been marked as deprecated in this release, instead use new Remote Config Variables feature. These methods and classes will be removed in the future versions with prior notice.
|
|
18
63
|
|
|
19
64
|
- Product config
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
65
|
+
- Methods
|
|
66
|
+
- `setDefaultsMap`
|
|
67
|
+
- `fetch`
|
|
68
|
+
- `activate`
|
|
69
|
+
- `fetchAndActivate`
|
|
70
|
+
- `setMinimumFetchIntervalInSeconds`
|
|
71
|
+
- `resetProductConfig`
|
|
72
|
+
- `getProductConfigString`
|
|
73
|
+
- `getProductConfigBoolean`
|
|
74
|
+
- `getNumber`
|
|
75
|
+
- `getLastFetchTimeStampInMillis`
|
|
76
|
+
|
|
77
|
+
- Callbacks
|
|
78
|
+
- `CleverTap.CleverTapProductConfigDidInitialize`
|
|
79
|
+
- `CleverTap.CleverTapProductConfigDidFetch`
|
|
80
|
+
- `CleverTap.CleverTapProductConfigDidActivate`
|
|
30
81
|
|
|
31
82
|
- Feature flags
|
|
32
83
|
- `getFeatureFlag`
|
|
84
|
+
- `CleverTap.CleverTapFeatureFlagsDidUpdate` callback
|
|
33
85
|
|
|
34
86
|
**Breaking Change**
|
|
35
87
|
- Streamlines the payload for various callbacks across Android and iOS platform. Refer [doc](https://github.com/CleverTap/clevertap-react-native/blob/master/docs/callbackPayloadFormat.md) for detailed changes.
|
package/android/build.gradle
CHANGED
|
@@ -21,8 +21,8 @@ android {
|
|
|
21
21
|
defaultConfig {
|
|
22
22
|
minSdkVersion 19
|
|
23
23
|
targetSdkVersion 33
|
|
24
|
-
versionCode
|
|
25
|
-
versionName "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.
|
|
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.0
|
|
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 =
|
|
12
|
+
const libVersion = 10200;
|
|
13
13
|
CleverTapReact.setLibrary(libName,libVersion);
|
|
14
14
|
|
|
15
15
|
function defaultCallback(method, err, res) {
|