clevertap-cordova
Advanced tools
Comparing version 2.3.6 to 2.4.0
Change Log | ||
========== | ||
Version 2.4.0 *(January 31, 2022)* | ||
------------------------------------------- | ||
- Adds public methods for suspending, discarding & resuming InApp Notifications | ||
- Adds public methods to increment/decrement values set via User properties | ||
- Deprecates `profileGetCleverTapID()` and `profileGetCleverTapAttributionIdentifier()` methods | ||
- Adds a new public method `getCleverTapID()` as an alternative to above deprecated methods | ||
- Supports [CleverTap iOS SDK v3.10.0](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/3.10.0) | ||
- Supports [CleverTap Android SDK v4.2.0](https://github.com/CleverTap/clevertap-android-sdk/releases/tag/core-v4.2.0) | ||
Version 2.3.6 *(23rd November 2021)* | ||
@@ -5,0 +14,0 @@ ------------------------------------------- |
@@ -5,7 +5,7 @@ # 👩💻 iOS Integration | ||
[Set up push notifications for your app](https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns). | ||
- [Set up push notifications for your app](https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns). | ||
If you plan on using deep links, [please register your custom url scheme as described here](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app). | ||
- If you plan on using deep links, [please register your custom url scheme as described here](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app). | ||
Call the following from your Javascript. | ||
- Call the following from your Javascript. | ||
@@ -18,4 +18,3 @@ ```javascript | ||
All calls to the CleverTap plugin should be made from your Javascript. | ||
You can refer to our [Usage.md](/docs/Usage.md) for implementation. | ||
- Refer to our [Usage Documentation](/docs/Usage.md) for implementation. | ||
@@ -124,2 +124,14 @@ | ||
#### Increment Value For Key | ||
```javascript | ||
this.clevertap.profileIncrementValueBy('score', 15); | ||
``` | ||
#### Decrement Value For Key | ||
```javascript | ||
this.clevertap.profileDecrementValueBy('score', 10); | ||
``` | ||
#### Create a User profile when user logs in (On User Login) | ||
@@ -279,2 +291,22 @@ | ||
## InApp Notification Controls | ||
#### Suspend InApp Notifications | ||
```javascript | ||
this.clevertap.suspendInAppNotifications(); | ||
``` | ||
#### Discard InApp Notifications | ||
```javascript | ||
this.clevertap.discardInAppNotifications(); | ||
``` | ||
#### Resume InApp Notifications | ||
```javascript | ||
this.clevertap.resumeInAppNotifications(); | ||
``` | ||
## Native Display | ||
@@ -407,9 +439,7 @@ | ||
## Attributions | ||
#### Get CleverTap Identifier | ||
#### Get CleverTap Attribution Identifier | ||
```javascript | ||
this.clevertap.profileGetCleverTapAttributionIdentifier('Name').then(r => { | ||
console.log('profileGetCleverTapAttributionIdentifier: ' + r); | ||
this.clevertap.getCleverTapID().then(r => { | ||
console.log('getCleverTapID: ' + r); | ||
}); | ||
@@ -419,3 +449,3 @@ ``` | ||
### For more information: | ||
- [See included Starter Application](/Samples) | ||
- [See CleverTap JS interface](https://github.com/CleverTap/clevertap-cordova/blob/master/www/CleverTap.js) | ||
- [See included Example Projects](/Samples) | ||
- [See CleverTap JS interface](/www/CleverTap.js) |
{ | ||
"name": "clevertap-cordova", | ||
"version": "2.3.6", | ||
"version": "2.4.0", | ||
"description": "CleverTap Plugin for Cordova/PhoneGap", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -22,4 +22,4 @@ <p align="center"> | ||
- [CleverTap Android SDK version 4.1.1](https://github.com/CleverTap/clevertap-android-sdk/releases/tag/core-v4.1.1) | ||
- [CleverTap iOS SDK version 3.9.4](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/3.9.4) | ||
- [CleverTap Android SDK version 4.2.0](https://github.com/CleverTap/clevertap-android-sdk/releases/tag/core-v4.2.0) | ||
- [CleverTap iOS SDK version 3.10.0](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/3.10.0) | ||
@@ -70,3 +70,3 @@ ## 🚀 Installation and Quick Start | ||
clevertap.setDebugLevel(2); | ||
clevertap.profileGetCleverTapID((id) => {console.log(id)}); | ||
clevertap.getCleverTapID()((id) => {console.log(id)}); | ||
... | ||
@@ -73,0 +73,0 @@ }); |
@@ -272,14 +272,27 @@ // Copyright (C) 2015 CleverTap | ||
// Get a unique CleverTap identifier suitable for use with install attribution providers. | ||
// successCallback = callback function for result | ||
// success returns the unique CleverTap attribution identifier. | ||
/** | ||
* @deprecated This method is deprecated in v2.3.5. Use getCleverTapID() instead. | ||
* Get a unique CleverTap identifier suitable for use with install attribution providers | ||
* successCallback = callback function for result | ||
* success returns the unique CleverTap attribution identifier | ||
*/ | ||
CleverTap.prototype.profileGetCleverTapAttributionIdentifier = function (successCallback) { | ||
cordova.exec(successCallback, null, "CleverTapPlugin", "profileGetCleverTapAttributionIdentifier", []); | ||
} | ||
/** | ||
* @deprecated This method is deprecated in v2.3.5. Use getCleverTapID() instead. | ||
* Get User Profile CleverTapID | ||
* successCallback = callback function for result | ||
* success calls back with CleverTapID or false | ||
*/ | ||
CleverTap.prototype.profileGetCleverTapID = function (successCallback) { | ||
cordova.exec(successCallback, null, "CleverTapPlugin", "profileGetCleverTapID", []); | ||
} | ||
// Get User Profile CleverTapID | ||
// successCallback = callback function for result | ||
// success calls back with CleverTapID or false | ||
CleverTap.prototype.profileGetCleverTapID = function (successCallback) { | ||
cordova.exec(successCallback, null, "CleverTapPlugin", "profileGetCleverTapID", []); | ||
CleverTap.prototype.getCleverTapID = function (successCallback) { | ||
cordova.exec(successCallback, null, "CleverTapPlugin", "getCleverTapID", []); | ||
} | ||
@@ -327,2 +340,15 @@ | ||
} | ||
// Method for incrementing a value for a single-value profile property (if it exists). | ||
// key = string | ||
// value = number | ||
CleverTap.prototype.profileIncrementValueBy = function (key, value) { | ||
cordova.exec(null, null, "CleverTapPlugin", "profileIncrementValueBy", [key, value]); | ||
} | ||
// Method for decrementing a value for a single-value profile property (if it exists). | ||
// key = string | ||
// value = number | ||
CleverTap.prototype.profileDecrementValueBy = function (key, value) { | ||
cordova.exec(null, null, "CleverTapPlugin", "profileDecrementValueBy", [key, value]); | ||
} | ||
@@ -440,2 +466,27 @@ /******************* | ||
/******************* | ||
* In-App Controls | ||
******************/ | ||
/** | ||
Suspends and saves inApp notifications until 'resumeInAppNotifications' is called for current session. | ||
Automatically resumes InApp notifications display on CleverTap shared instance creation. Pending inApp notifications are displayed only for current session. | ||
*/ | ||
CleverTap.prototype.suspendInAppNotifications = function () { | ||
cordova.exec(null, null, "CleverTapPlugin", "suspendInAppNotifications", []); | ||
} | ||
/** | ||
Discards inApp notifications until 'resumeInAppNotifications' is called for current session. | ||
Automatically resumes InApp notifications display on CleverTap shared instance creation. Pending inApp notifications are not displayed. */ | ||
CleverTap.prototype.discardInAppNotifications = function () { | ||
cordova.exec(null, null, "CleverTapPlugin", "discardInAppNotifications", []); | ||
} | ||
/** | ||
Resumes displaying inApps notifications and shows pending inApp notifications if any. | ||
*/ | ||
CleverTap.prototype.resumeInAppNotifications = function () { | ||
cordova.exec(null, null, "CleverTapPlugin", "resumeInAppNotifications", []); | ||
} | ||
/**************************** | ||
@@ -442,0 +493,0 @@ * Native Display methods |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
222935
643
24
525
0