clevertap-react-native 3.5.0 → 3.6.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/CHANGELOG.md +20 -1
- package/android/.gradle/8.5/checksums/checksums.lock +0 -0
- package/android/.gradle/8.5/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.5/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/8.5/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.5/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.5/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +3 -3
- package/android/src/main/java/com/clevertap/react/CleverTapModuleImpl.java +7 -2
- package/android/src/newarch/CleverTapModule.kt +2 -2
- package/android/src/oldarch/CleverTapModule.kt +2 -2
- package/clevertap-react-native.podspec +1 -1
- package/ios/CleverTapReact/CleverTapReact.mm +7 -3
- package/logs/browserstack-plugin.log +2 -0
- package/package.json +1 -1
- package/src/NativeCleverTapModule.ts +1 -1
- package/src/index.d.ts +29 -3
- package/src/index.js +32 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
==========
|
|
3
3
|
|
|
4
|
+
Version 3.6.0 *(July 17 2025)*
|
|
5
|
+
-------------------------------------------
|
|
6
|
+
**What's new**
|
|
7
|
+
* **[Android Platform]**
|
|
8
|
+
* Supports [CleverTap Android SDK v7.5.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md#version-750-july-11-2025).
|
|
9
|
+
|
|
10
|
+
* **[iOS Platform]**
|
|
11
|
+
* Supports [CleverTap iOS SDK v7.3.1](https://github.com/CleverTap/clevertap-ios-sdk/blob/master/CHANGELOG.md#version-731-july-15-2025).
|
|
12
|
+
|
|
13
|
+
**API changes**
|
|
14
|
+
* **[Android and iOS Platform]**
|
|
15
|
+
* Updates the `setOptOut(userOptOut)` API. This upgraded API improves GDPR opt-out functionality by allowing you to control whether critical system events (such as app installs, uninstalls, and push notification registration) are still sent to CleverTap, even when a user has opted out of tracking. This helps you respect user privacy choices while still maintaining essential app functionality and compliance with regulations. This is non-breaking change.
|
|
16
|
+
* `setOptOut(userOptOut, allowSystemEvents)`
|
|
17
|
+
|
|
18
|
+
**Bug Fixes**
|
|
19
|
+
* **[iOS Platform]**
|
|
20
|
+
* Fixes a `No new templates are synced` error while syncing new custom templates.
|
|
21
|
+
* Fixes a Local Push Primer crash when asking for push permission using promptForPushPermission.
|
|
22
|
+
|
|
4
23
|
Version 3.5.0 *(June 27 2025)*
|
|
5
24
|
-------------------------------------------
|
|
6
25
|
**What's new**
|
|
@@ -235,7 +254,7 @@ Version 1.2.1 *(25 October 2023)*
|
|
|
235
254
|
**What's new**
|
|
236
255
|
* **[Android Platform]**
|
|
237
256
|
* Supports [CleverTap Android SDK v5.2.1](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md#version-521-october-12-2023).
|
|
238
|
-
* Adds Custom Proxy Domain functionality for Push Impressions and Events raised from CleverTap Android SDK. Please refer to [Usage.md](docs/
|
|
257
|
+
* Adds Custom Proxy Domain functionality for Push Impressions and Events raised from CleverTap Android SDK. Please refer to [Usage.md](docs/usage.md#integrate-custom-proxy-domain) file to read more on how to configure custom proxy domains in Android.
|
|
239
258
|
|
|
240
259
|
* **[iOS Platform]**
|
|
241
260
|
* Supports [CleverTap iOS SDK v5.2.1](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/5.2.1).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
package/android/build.gradle
CHANGED
|
@@ -35,8 +35,8 @@ android {
|
|
|
35
35
|
defaultConfig {
|
|
36
36
|
minSdkVersion 21
|
|
37
37
|
targetSdkVersion 35
|
|
38
|
-
versionCode
|
|
39
|
-
versionName "3.
|
|
38
|
+
versionCode 360
|
|
39
|
+
versionName "3.6.0"
|
|
40
40
|
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -54,7 +54,7 @@ android {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
dependencies {
|
|
57
|
-
api 'com.clevertap.android:clevertap-android-sdk:7.
|
|
57
|
+
api 'com.clevertap.android:clevertap-android-sdk:7.5.0'
|
|
58
58
|
implementation 'com.android.installreferrer:installreferrer:2.2'
|
|
59
59
|
//compile 'com.android.support:appcompat-v7:28.0.0'
|
|
60
60
|
implementation 'com.facebook.react:react-native:+'
|
|
@@ -1073,12 +1073,17 @@ public class CleverTapModuleImpl {
|
|
|
1073
1073
|
clevertap.setOffline(value);
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
|
-
public void setOptOut(boolean
|
|
1076
|
+
public void setOptOut(boolean userOptOut, Boolean allowSystemEvents) {
|
|
1077
1077
|
CleverTapAPI clevertap = getCleverTapAPI();
|
|
1078
1078
|
if (clevertap == null) {
|
|
1079
1079
|
return;
|
|
1080
1080
|
}
|
|
1081
|
-
|
|
1081
|
+
|
|
1082
|
+
if (allowSystemEvents != null) {
|
|
1083
|
+
clevertap.setOptOut(userOptOut, allowSystemEvents);
|
|
1084
|
+
} else {
|
|
1085
|
+
clevertap.setOptOut(userOptOut);
|
|
1086
|
+
}
|
|
1082
1087
|
}
|
|
1083
1088
|
|
|
1084
1089
|
public void pushRegistrationToken(String token, ReadableMap type) {
|
|
@@ -400,8 +400,8 @@ class CleverTapModule(reactContext: ReactApplicationContext?) :
|
|
|
400
400
|
cleverTapModuleImpl.setOffline(value)
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
override fun setOptOut(
|
|
404
|
-
cleverTapModuleImpl.setOptOut(
|
|
403
|
+
override fun setOptOut(userOptOut: Boolean, allowSystemEvents: Boolean?) {
|
|
404
|
+
cleverTapModuleImpl.setOptOut(userOptOut, allowSystemEvents)
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
override fun pushRegistrationToken(token: String?, pushType: ReadableMap?) {
|
|
@@ -472,8 +472,8 @@ class CleverTapModule(reactContext: ReactApplicationContext?) :
|
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
@ReactMethod
|
|
475
|
-
fun setOptOut(
|
|
476
|
-
cleverTapModuleImpl.setOptOut(
|
|
475
|
+
fun setOptOut(userOptOut: Boolean, allowSystemEvents: Boolean?) {
|
|
476
|
+
cleverTapModuleImpl.setOptOut(userOptOut, allowSystemEvents)
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
@ReactMethod
|
|
@@ -206,9 +206,13 @@ RCT_EXPORT_METHOD(setOffline:(BOOL)enabled) {
|
|
|
206
206
|
|
|
207
207
|
#pragma mark - OptOut API
|
|
208
208
|
|
|
209
|
-
RCT_EXPORT_METHOD(setOptOut:(BOOL)
|
|
210
|
-
RCTLogInfo(@"[CleverTap setOptOut: %i]",
|
|
211
|
-
|
|
209
|
+
RCT_EXPORT_METHOD(setOptOut:(BOOL)userOptOut allowSystemEvents:(NSNumber *)allowSystemEvents) {
|
|
210
|
+
RCTLogInfo(@"[CleverTap setOptOut and allowSystemEvents: %i, %@]", userOptOut, allowSystemEvents);
|
|
211
|
+
if (allowSystemEvents != nil) {
|
|
212
|
+
[[self cleverTapInstance] setOptOut:userOptOut allowSystemEvents:[allowSystemEvents boolValue]];
|
|
213
|
+
} else {
|
|
214
|
+
[[self cleverTapInstance] setOptOut:userOptOut];
|
|
215
|
+
}
|
|
212
216
|
}
|
|
213
217
|
|
|
214
218
|
RCT_EXPORT_METHOD(enableDeviceNetworkInfoReporting:(BOOL)enabled) {
|
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@ export interface Spec extends TurboModule {
|
|
|
42
42
|
enablePersonalization(): void;
|
|
43
43
|
disablePersonalization(): void;
|
|
44
44
|
setOffline(enabled: boolean): void;
|
|
45
|
-
setOptOut(
|
|
45
|
+
setOptOut(userOptOut: boolean, allowSystemEvents?: boolean): void;
|
|
46
46
|
enableDeviceNetworkInfoReporting(enabled: boolean): void;
|
|
47
47
|
recordScreenView(screenName: string): void;
|
|
48
48
|
recordEvent(
|
package/src/index.d.ts
CHANGED
|
@@ -48,10 +48,36 @@
|
|
|
48
48
|
export function enablePersonalization(): void;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
51
|
+
* Sets the user's consent for event and profile tracking.
|
|
52
|
+
*
|
|
53
|
+
* You must call this method separately for each active user profile,
|
|
54
|
+
* for example, when switching user profiles using `onUserLogin`.
|
|
55
|
+
*
|
|
56
|
+
* Consent Scenarios:
|
|
57
|
+
*
|
|
58
|
+
* 1. **Complete Opt-Out**
|
|
59
|
+
* `userOptOut = true`, `allowSystemEvents = false`
|
|
60
|
+
* → No events (custom or system) are saved locally or remotely. Maximum privacy.
|
|
61
|
+
*
|
|
62
|
+
* 2. **Full Opt-In**
|
|
63
|
+
* `userOptOut = false`, `allowSystemEvents = true`
|
|
64
|
+
* → All events (custom and system) are tracked. Default behavior.
|
|
65
|
+
*
|
|
66
|
+
* 3. **Partial Opt-In**
|
|
67
|
+
* `userOptOut = true`, `allowSystemEvents = true`
|
|
68
|
+
* → Only system events (e.g., app launch, notification viewed) are tracked. Custom events are ignored.
|
|
69
|
+
*
|
|
70
|
+
* ⚠️ The combination `userOptOut = false` and `allowSystemEvents = false` is invalid.
|
|
71
|
+
* In such cases, the SDK defaults to **Full Opt-In**.
|
|
72
|
+
*
|
|
73
|
+
* To re-enable full tracking after opting out, call with:
|
|
74
|
+
* `userOptOut = false`, `allowSystemEvents = true`.
|
|
75
|
+
*
|
|
76
|
+
* @param {boolean} userOptOut - Set to `true` to disable custom event tracking.
|
|
77
|
+
* @param {boolean} allowSystemEvents - Set to `true` to allow system-level event tracking.
|
|
78
|
+
* @returns {void}
|
|
53
79
|
*/
|
|
54
|
-
|
|
80
|
+
export function setOptOut(userOptOut: boolean, allowSystemEvents?: boolean): void;
|
|
55
81
|
|
|
56
82
|
/**
|
|
57
83
|
* Enables the reporting of device network related information, including IP address. This reporting is disabled by default.
|
package/src/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const EventEmitter = Platform.select({
|
|
|
12
12
|
* @param {int} libVersion - The updated library version. If current version is 1.1.0 then pass as 10100
|
|
13
13
|
*/
|
|
14
14
|
const libName = 'React-Native';
|
|
15
|
-
const libVersion =
|
|
15
|
+
const libVersion = 30600;
|
|
16
16
|
CleverTapReact.setLibrary(libName,libVersion);
|
|
17
17
|
|
|
18
18
|
function defaultCallback(method, err, res) {
|
|
@@ -272,11 +272,37 @@ var CleverTap = {
|
|
|
272
272
|
},
|
|
273
273
|
|
|
274
274
|
/**
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
275
|
+
* Sets the user's consent for event and profile tracking.
|
|
276
|
+
*
|
|
277
|
+
* You must call this method separately for each active user profile,
|
|
278
|
+
* for example, when switching user profiles using `onUserLogin`.
|
|
279
|
+
*
|
|
280
|
+
* Consent Scenarios:
|
|
281
|
+
*
|
|
282
|
+
* 1. **Complete Opt-Out**
|
|
283
|
+
* `userOptOut = true`, `allowSystemEvents = false`
|
|
284
|
+
* → No events (custom or system) are saved locally or remotely. Maximum privacy.
|
|
285
|
+
*
|
|
286
|
+
* 2. **Full Opt-In**
|
|
287
|
+
* `userOptOut = false`, `allowSystemEvents = true`
|
|
288
|
+
* → All events (custom and system) are tracked. Default behavior.
|
|
289
|
+
*
|
|
290
|
+
* 3. **Partial Opt-In**
|
|
291
|
+
* `userOptOut = true`, `allowSystemEvents = true`
|
|
292
|
+
* → Only system events (e.g., app launch, notification viewed) are tracked. Custom events are ignored.
|
|
293
|
+
*
|
|
294
|
+
* ⚠️ The combination `userOptOut = false` and `allowSystemEvents = false` is invalid.
|
|
295
|
+
* In such cases, the SDK defaults to **Full Opt-In**.
|
|
296
|
+
*
|
|
297
|
+
* To re-enable full tracking after opting out, call with:
|
|
298
|
+
* `userOptOut = false`, `allowSystemEvents = true`.
|
|
299
|
+
*
|
|
300
|
+
* @param {boolean} userOptOut - Set to `true` to disable custom event tracking.
|
|
301
|
+
* @param {boolean} allowSystemEvents - Set to `true` to allow system-level event tracking.
|
|
302
|
+
* @returns {void}
|
|
303
|
+
*/
|
|
304
|
+
setOptOut: function(userOptOut, allowSystemEvents) {
|
|
305
|
+
CleverTapReact.setOptOut(userOptOut, allowSystemEvents);
|
|
280
306
|
},
|
|
281
307
|
|
|
282
308
|
/**
|