Skip to content

Commit

Permalink
Release 9.3.0 (#296)
Browse files Browse the repository at this point in the history
* Release 9.3.0

* Update cordova-ios to 6.1.1

* remove id from commit

* update package-lock.json
  • Loading branch information
liutingdu authored Nov 11, 2020
1 parent 1b3f306 commit 187c8f3
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 174 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Intercom for Cordova/PhoneGap

## 9.2.1 (2020-09-09)
## 9.3.0 (2020-11-10)

* The Intercom Cordova plugin has been updated to use v8.3.0 of the Intercom Android SDK and v8.1.0 of the iOS SDK as the latest version.
* New feature: You can now open an article or Mobile Carousel programmatically in your app. We have added two new methods to our API to enable this, [displayArticle](https://developers.intercom.com/installing-intercom/docs/cordova-phonegap-configuration#section-present-an-article-programmatically) and [displayCarousel](https://developers.intercom.com/installing-intercom/docs/cordova-phonegap-configuration#section-present-a-carousel-programmatically).
* Updated to cordova-ios 6.1.1.

## 9.2.1 (2020-09-17)

* The Intercom Cordova plugin has been updated to use v8.2.0 of the Intercom Android SDK.
* The Intercom Cordova plugin has been updated to use v8.0.0 of the Intercom iOS SDK.
Expand Down
173 changes: 12 additions & 161 deletions Example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"cordova-android": "^9.0.0",
"cordova-ios": "^6.0.0",
"cordova-ios": "^6.1.1",
"cordova-plugin-whitelist": "^1.0.0"
}
}
}
1 change: 1 addition & 0 deletions Example/www/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
* {
-webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
outline: none;
}

body {
Expand Down
2 changes: 2 additions & 0 deletions Example/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<p><button id="logout-btn">Logout</button></p>
<p><button id="open-intercom-btn">Open Intercom</button></p>
<p><button id="open-help-center-btn">Open Help Center</button></p>
<p><button id="display-carousel-btn">Display Carousel</button></p>
<p><button id="display-article-btn">Display Article</button></p>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
Expand Down
12 changes: 12 additions & 0 deletions Example/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ var app = {
document.getElementById("open-help-center-btn").addEventListener("click", function(){
intercom.displayHelpCenter();
}, false);

document.getElementById("display-carousel-btn").addEventListener("click", function(){
intercom.displayCarousel("carousel-id");
}, false);

document.getElementById("display-article-btn").addEventListener("click", function(){
intercom.displayArticle("article-id");
}, false);
},
// Update DOM on a Received Event
receivedEvent: function(id) {
Expand Down Expand Up @@ -89,13 +97,17 @@ var app = {
document.getElementById("logout-btn").style.visibility = 'visible';
document.getElementById("open-intercom-btn").style.visibility = 'visible';
document.getElementById("open-help-center-btn").style.visibility = 'visible';
document.getElementById("display-carousel-btn").style.visibility = 'visible';
document.getElementById("display-article-btn").style.visibility = 'visible';
document.getElementById("login-btn").style.visibility = 'hidden';
},

configureViewForLoggedOutUser: function() {
document.getElementById("logout-btn").style.visibility = 'hidden';
document.getElementById("open-intercom-btn").style.visibility = 'hidden';
document.getElementById("open-help-center-btn").style.visibility = 'hidden';
document.getElementById("display-carousel-btn").style.visibility = 'hidden';
document.getElementById("display-article-btn").style.visibility = 'hidden';
document.getElementById("login-btn").style.visibility = 'visible';
}
};
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cordova plugin add cordova-plugin-intercom

To add the plugin to your PhoneGap app, add the following to your `config.xml`:
```xml
<plugin name="cordova-plugin-intercom" version="~9.2.1" />
<plugin name="cordova-plugin-intercom" version="~9.3.0" />
```

## Example App
Expand Down
4 changes: 2 additions & 2 deletions intercom-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-intercom",
"version": "9.2.1",
"version": "9.3.0",
"description": "Official Cordova/PhoneGap plugin for Intercom",
"cordova": {
"id": "cordova-plugin-intercom",
Expand Down Expand Up @@ -31,7 +31,7 @@
},
{
"name": "cordova-ios",
"version": ">=5.0.0"
"version": ">=6.1.1"
}
],
"author": "Intercom",
Expand Down
6 changes: 3 additions & 3 deletions intercom-plugin/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-intercom" version="9.2.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<plugin id="cordova-plugin-intercom" version="9.3.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>Intercom</name>
<author>Intercom</author>
<license>MIT License</license>
Expand All @@ -10,7 +10,7 @@
<engines>
<engine name="cordova" version=">=9.0.0" />
<engine name="cordova-android" version=">=9.0.0" />
<engine name="cordova-ios" version=">=5.0.0" />
<engine name="cordova-ios" version=">=6.1.1" />
</engines>

<js-module name="Intercom" src="www/intercom.js">
Expand Down Expand Up @@ -47,7 +47,7 @@
</array>
</config-file>

<framework src="Intercom" type="podspec" spec="~> 8.0.0" />
<framework src="Intercom" type="podspec" spec="~> 8.1.0" />
</platform>

<platform name="android">
Expand Down
14 changes: 14 additions & 0 deletions intercom-plugin/src/android/IntercomBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,20 @@ private enum Action {
intercomPushClient.sendTokenToIntercom(cordova.getActivity().getApplication(), token);
}
},
displayCarousel {
@Override void performAction(JSONArray args, CallbackContext callbackContext, CordovaInterface cordova) {
String carouselId = args.optString(0);
Intercom.client().displayCarousel(carouselId);
callbackContext.success();
}
},
displayArticle {
@Override void performAction(JSONArray args, CallbackContext callbackContext, CordovaInterface cordova) {
String articleId = args.optString(0);
Intercom.client().displayArticle(articleId);
callbackContext.success();
}
},
unknown {
@Override void performAction(JSONArray args, CallbackContext callbackContext, CordovaInterface cordova) {
callbackContext.error("[Intercom-Cordova] ERROR: Undefined function");
Expand Down
4 changes: 2 additions & 2 deletions intercom-plugin/src/android/intercom.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ repositories {
}

dependencies {
implementation 'io.intercom.android:intercom-sdk-base:8.2.0'
implementation 'io.intercom.android:intercom-sdk-base:8.3.0'
if (pushType == 'fcm' || pushType == 'fcm-without-build-plugin') {
implementation 'com.google.firebase:firebase-messaging:20.+'
implementation 'io.intercom.android:intercom-sdk-fcm:8.2.0'
implementation 'io.intercom.android:intercom-sdk-fcm:8.3.0'
}
}

Expand Down
Loading

0 comments on commit 187c8f3

Please sign in to comment.