clevertap-cordova
Advanced tools
Comparing version 2.0.8 to 2.0.9
Change Log | ||
========== | ||
Version 2.0.7 *(15 May, 2018)* | ||
Version 2.0.9 *(24 July, 2018)* | ||
------------------------------------------- | ||
Update Android post install script for Cordova 8.0.0 | ||
Version 2.0.8 *(15 May, 2018)* | ||
------------------------------------------- | ||
fixes CleverTapSDK.framework install issues (removes symlinks) | ||
@@ -7,0 +11,0 @@ |
{ | ||
"name": "clevertap-cordova", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "CleverTap Plugin for Cordova/PhoneGap", | ||
@@ -33,3 +33,6 @@ "cordova": { | ||
}, | ||
"homepage": "https://github.com/CleverTap/clevertap-cordova#readme" | ||
"homepage": "https://github.com/CleverTap/clevertap-cordova#readme", | ||
"dependencies": { | ||
"hoek": "^5.0.3" | ||
} | ||
} |
@@ -6,3 +6,3 @@ CleverTap Cordova Plugin | ||
Tested on Cordova 7.0.1 | ||
Tested on Cordova 8.0.0 | ||
@@ -16,3 +16,3 @@ - [CleverTap Android SDK version 3.1.9](https://github.com/CleverTap/clevertap-android-sdk/releases/tag/3.1.9) | ||
1. Sign up | ||
1. Sign up | ||
@@ -36,3 +36,3 @@ 2. Set up and register for Push notifications, if required. | ||
The plugin uses an `after plugin add` hook script to configure your project for FCM. | ||
If the google-services.json file is not present in your project when the script runs, FCM will not be configured properly and will not work. | ||
If the google-services.json file is not present in your project when the script runs, FCM will not be configured properly and will not work. | ||
@@ -42,3 +42,3 @@ #### Using Cordova | ||
``` | ||
cordova plugin add https://github.com/CleverTap/clevertap-cordova.git --variable CLEVERTAP_ACCOUNT_ID="YOUR CLEVERTAP ACCOUNT ID" --variable CLEVERTAP_TOKEN="YOUR CELVERTAP ACCOUNT TOKEN" | ||
cordova plugin add https://github.com/CleverTap/clevertap-cordova.git --variable CLEVERTAP_ACCOUNT_ID="YOUR CLEVERTAP ACCOUNT ID" --variable CLEVERTAP_TOKEN="YOUR CELVERTAP ACCOUNT TOKEN" | ||
``` | ||
@@ -49,7 +49,44 @@ | ||
- iOS: | ||
``` | ||
ionic plugin add https://github.com/CleverTap/clevertap-cordova.git --variable CLEVERTAP_ACCOUNT_ID="YOUR CLEVERTAP ACCOUNT ID" --variable CLEVERTAP_TOKEN="YOUR CELVERTAP ACCOUNT TOKEN" | ||
ionic cordova plugin add clevertap-cordova@latest --variable CLEVERTAP_ACCOUNT_ID="YOUR CLEVERTAP ACCOUNT ID" --variable CLEVERTAP_TOKEN="YOUR CELVERTAP ACCOUNT TOKEN" | ||
``` | ||
##### Workaround For Ionic3 | ||
- [see the included Ionic3 Example project for example usage](https://github.com/CleverTap/clevertap-cordova/blob/master/Ionic3Example/src/app/app.component.ts). | ||
in your typescript: | ||
``` | ||
declare var CleverTap: any; | ||
export class MyApp { | ||
rootPage:any = TabsPage; | ||
getCleverTap = () => { | ||
try { | ||
return CleverTap; | ||
} catch(e) { | ||
console.warn("CleverTap not available in the browser, run in a device/simulator"); | ||
return null; | ||
} | ||
}; | ||
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { | ||
platform.ready().then(() => { | ||
// Okay, so the platform is ready and our plugins are available. | ||
// Here you can do any higher level native things you might need. | ||
statusBar.styleDefault(); | ||
splashScreen.hide(); | ||
var clevertap = this.getCleverTap(); | ||
if (clevertap) { | ||
clevertap.setDebugLevel(2); | ||
clevertap.profileGetCleverTapID((id) => {console.log(id)}); | ||
} | ||
}); | ||
} | ||
} | ||
``` | ||
#### Using PhoneGap Build | ||
@@ -61,3 +98,3 @@ | ||
When using the plugin with PhoneGap Build: | ||
When using the plugin with PhoneGap Build: | ||
@@ -86,8 +123,2 @@ Add the following to your `www/config.xml` file: | ||
#### iOS | ||
Check your .plist file: | ||
![plist account values](http://staging.support.wizrocket.com.s3-website-eu-west-1.amazonaws.com/images/integration/plist-account.png) | ||
#### Android | ||
@@ -106,3 +137,3 @@ | ||
**Set the Lifecycle Callback** | ||
**Set the Lifecycle Callback** | ||
@@ -180,3 +211,3 @@ IMPORTANT! | ||
document.addEventListener('deviceready', this.onDeviceReady, false); | ||
document.addEventListener('onCleverTapProfileSync', this.onCleverTapProfileSync, false); // optional: to be notified of CleverTap user profile synchronization updates | ||
document.addEventListener('onCleverTapProfileSync', this.onCleverTapProfileSync, false); // optional: to be notified of CleverTap user profile synchronization updates | ||
document.addEventListener('onCleverTapProfileDidInitialize', this.onCleverTapProfileDidInitialize, false); // optional, to be notified when the CleverTap user profile is initialized | ||
@@ -196,3 +227,3 @@ document.addEventListener('onCleverTapInAppNotificationDismissed', this.onCleverTapInAppNotificationDismissed, false); // optional, to be receive a callback with custom in-app notification click data | ||
console.log(JSON.stringify(e.notification)); | ||
}, | ||
}, | ||
@@ -206,1 +237,2 @@ | ||
- [see the included Ionic3 Example project for example usage](https://github.com/CleverTap/clevertap-cordova/blob/master/Ionic3Example/src/app/app.component.ts). |
@@ -8,3 +8,3 @@ #!/usr/bin/env node | ||
var platformRoot = path.join(context.opts.projectRoot, 'platforms/android'); | ||
var platformRoot = path.join(context.opts.projectRoot, 'platforms/android/app/src/main'); | ||
@@ -46,3 +46,3 @@ var manifestFile = path.join(platformRoot, 'AndroidManifest.xml'); | ||
var jsonContents = JSON.parse(fileContents); | ||
var s = fs.readFileSync("platforms/android/res/values/strings.xml").toString(); | ||
var s = fs.readFileSync("platforms/android/app/src/main/res/values/strings.xml").toString(); | ||
@@ -59,3 +59,3 @@ s = s.replace(new RegExp('<string name="google_app_id">([^\@<]+?)<\/string>', "i"), '') | ||
fs.writeFileSync("platforms/android/res/values/strings.xml", s); | ||
fs.writeFileSync("platforms/android/app/src/main/res/values/strings.xml", s); | ||
} catch (err) { | ||
@@ -62,0 +62,0 @@ process.stdout.write(err); |
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
643
228
44941389
1
40
+ Addedhoek@^5.0.3
+ Addedhoek@5.0.4(transitive)