diff --git a/CHANGELOG.md b/CHANGELOG.md index ea6da7c..23cabd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Intercom for Cordova/PhoneGap +## 6.0.0 (2018-06-12) + +The Business Messenger reimagined. + +**Messenger apps** +* Complete actions beyond chat in the Messenger seamlessly with a growing library of apps. Messenger apps are being rolled out to all customers over the next 2 weeks. + +**Extendable platform** +* Create your own Messenger apps to suit your unique workflows – and enable entirely new ones. + +**Updated Design** +* Updated visual design with new wallpapers and expanded color settings. + +**Messenger settings** +* New wallpapers to customize your profile. +* Set a background color for your profile and an action color for cards and chat bubbles. +* Support light theme colors in your messenger. + +**Help Center** +* Added the method `displayHelpCenter()`. Calling this method in your app displays your Articles Help Center. Learn more about Articles [here](https://www.intercom.com/articles/features). + +![5-0-0-android-release-screens](https://user-images.githubusercontent.com/2615468/39157445-befb7196-4752-11e8-8a33-57636975ecec.png) + +![5-0-0-ios-release-screens](https://user-images.githubusercontent.com/3185423/39155559-6a3f239e-474a-11e8-8eb0-fdb0c69d288f.jpg) + ## 5.1.1 (2018-02-26) * Include FCM libraries when building without build plugin [#257](https://github.com/intercom/intercom-cordova/pull/257) diff --git a/Example/config.xml b/Example/config.xml index a294df8..3a12845 100644 --- a/Example/config.xml +++ b/Example/config.xml @@ -40,17 +40,7 @@ - - - - - - - - - - - + @@ -62,6 +52,6 @@ --> - + diff --git a/Example/package-lock.json b/Example/package-lock.json index baab178..f988ae0 100644 --- a/Example/package-lock.json +++ b/Example/package-lock.json @@ -5,12 +5,12 @@ "requires": true, "dependencies": { "cordova-android": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.0.0.tgz", - "integrity": "sha1-yVvt/PvDhjsYDE0p7/7E95Nh0Z0=", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.0.tgz", + "integrity": "sha1-HNNu57nRm61Q0+mEK3Mf5ZCSTdU=", "requires": { - "android-versions": "1.2.1", - "cordova-common": "2.2.0", + "android-versions": "1.3.0", + "cordova-common": "2.2.1", "elementtree": "0.1.6", "nopt": "3.0.6", "properties-parser": "0.2.3", @@ -23,8 +23,11 @@ "bundled": true }, "android-versions": { - "version": "1.2.1", - "bundled": true + "version": "1.3.0", + "bundled": true, + "requires": { + "semver": "5.5.0" + } }, "ansi": { "version": "0.3.1", @@ -50,7 +53,7 @@ } }, "brace-expansion": { - "version": "1.1.8", + "version": "1.1.11", "bundled": true, "requires": { "balanced-match": "1.0.0", @@ -62,7 +65,7 @@ "bundled": true }, "cordova-common": { - "version": "2.2.0", + "version": "2.2.1", "bundled": true, "requires": { "ansi": "0.3.1", @@ -71,10 +74,10 @@ "elementtree": "0.1.6", "glob": "5.0.15", "minimatch": "3.0.4", - "osenv": "0.1.4", + "osenv": "0.1.5", "plist": "1.2.0", "q": "1.5.1", - "semver": "5.4.1", + "semver": "5.5.0", "shelljs": "0.5.3", "underscore": "1.8.3", "unorm": "1.4.1" @@ -122,7 +125,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "1.1.11" } }, "nopt": { @@ -148,7 +151,7 @@ "bundled": true }, "osenv": { - "version": "0.1.4", + "version": "0.1.5", "bundled": true, "requires": { "os-homedir": "1.0.2", @@ -182,7 +185,7 @@ "bundled": true }, "semver": { - "version": "5.4.1", + "version": "5.5.0", "bundled": true }, "shelljs": { diff --git a/Example/package.json b/Example/package.json index 5297046..a1bdb43 100644 --- a/Example/package.json +++ b/Example/package.json @@ -1,19 +1,19 @@ { - "name": "io.intercom.cordova.sample", - "version": "0.0.1", - "displayName": "Intercom Cordova", - "cordova": { - "platforms": [ - "android", - "ios" - ], - "plugins": { - "cordova-plugin-whitelist": {} + "name": "io.intercom.cordova.sample", + "version": "0.0.1", + "displayName": "Intercom Cordova", + "cordova": { + "platforms": [ + "ios", + "android" + ], + "plugins": { + "cordova-plugin-whitelist": {} + } + }, + "dependencies": { + "cordova-android": "^7.1.0", + "cordova-ios": "^4.5.4", + "cordova-plugin-whitelist": "1.0.0" } - }, - "dependencies": { - "cordova-android": "^7.0.0", - "cordova-ios": "^4.5.4", - "cordova-plugin-whitelist": "1.0.0" - } } \ No newline at end of file diff --git a/Example/www/img/launch/Default-568h@2x.png b/Example/www/img/launch/Default-568h@2x.png deleted file mode 100644 index 4203ca3..0000000 Binary files a/Example/www/img/launch/Default-568h@2x.png and /dev/null differ diff --git a/Example/www/img/launch/Default-667h@2x.png b/Example/www/img/launch/Default-667h@2x.png deleted file mode 100644 index f1547bb..0000000 Binary files a/Example/www/img/launch/Default-667h@2x.png and /dev/null differ diff --git a/Example/www/img/launch/Default-736@2x.png b/Example/www/img/launch/Default-736@2x.png deleted file mode 100644 index d6d55f6..0000000 Binary files a/Example/www/img/launch/Default-736@2x.png and /dev/null differ diff --git a/Example/www/img/launch/Default-Portrait_iPad.png b/Example/www/img/launch/Default-Portrait_iPad.png deleted file mode 100644 index a811af1..0000000 Binary files a/Example/www/img/launch/Default-Portrait_iPad.png and /dev/null differ diff --git a/Example/www/img/launch/Default-Portrait_iPad@2x.png b/Example/www/img/launch/Default-Portrait_iPad@2x.png deleted file mode 100644 index 36ce454..0000000 Binary files a/Example/www/img/launch/Default-Portrait_iPad@2x.png and /dev/null differ diff --git a/Example/www/img/launch/Default.png b/Example/www/img/launch/Default.png deleted file mode 100644 index c808e24..0000000 Binary files a/Example/www/img/launch/Default.png and /dev/null differ diff --git a/Example/www/img/launch/Default@2x.png b/Example/www/img/launch/Default@2x.png deleted file mode 100644 index fc1a986..0000000 Binary files a/Example/www/img/launch/Default@2x.png and /dev/null differ diff --git a/Example/www/img/launch/Default@2x~universal~anyany.png b/Example/www/img/launch/Default@2x~universal~anyany.png new file mode 100644 index 0000000..709e015 Binary files /dev/null and b/Example/www/img/launch/Default@2x~universal~anyany.png differ diff --git a/Example/www/img/launch/iPad_landscape.png b/Example/www/img/launch/iPad_landscape.png deleted file mode 100644 index 4f8f31e..0000000 Binary files a/Example/www/img/launch/iPad_landscape.png and /dev/null differ diff --git a/Example/www/img/launch/iPad_landscape@2x.png b/Example/www/img/launch/iPad_landscape@2x.png deleted file mode 100644 index c37731d..0000000 Binary files a/Example/www/img/launch/iPad_landscape@2x.png and /dev/null differ diff --git a/Example/www/img/launch/iPad_landscape_large.png b/Example/www/img/launch/iPad_landscape_large.png deleted file mode 100644 index f7d3a99..0000000 Binary files a/Example/www/img/launch/iPad_landscape_large.png and /dev/null differ diff --git a/Example/www/img/launch/iPhone_small.png b/Example/www/img/launch/iPhone_small.png deleted file mode 100644 index 5451a74..0000000 Binary files a/Example/www/img/launch/iPhone_small.png and /dev/null differ diff --git a/Example/www/index.html b/Example/www/index.html index 1b89039..d53046d 100644 --- a/Example/www/index.html +++ b/Example/www/index.html @@ -2,7 +2,7 @@ - + Intercom Cordova Sample @@ -14,6 +14,7 @@

+

diff --git a/Example/www/js/index.js b/Example/www/js/index.js index f36415d..f12050e 100644 --- a/Example/www/js/index.js +++ b/Example/www/js/index.js @@ -57,6 +57,10 @@ var app = { document.getElementById("open-intercom-btn").addEventListener("click", function(){ intercom.displayMessenger(); }, false); + + document.getElementById("open-help-center-btn").addEventListener("click", function(){ + intercom.displayHelpCenter(); + }, false); }, // Update DOM on a Received Event receivedEvent: function(id) { @@ -83,12 +87,14 @@ var app = { configureViewForLoggedInUser: function() { 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("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("login-btn").style.visibility = 'visible'; } }; diff --git a/intercom-plugin/package.json b/intercom-plugin/package.json index 5e46611..f5d9a4e 100644 --- a/intercom-plugin/package.json +++ b/intercom-plugin/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-intercom", - "version": "5.1.1", + "version": "6.0.0", "description": "Official Cordova/PhoneGap plugin for Intercom", "cordova": { "id": "cordova-plugin-intercom", diff --git a/intercom-plugin/plugin.xml b/intercom-plugin/plugin.xml index 98f1ab0..0a0504b 100644 --- a/intercom-plugin/plugin.xml +++ b/intercom-plugin/plugin.xml @@ -1,5 +1,5 @@ - + Intercom Intercom MIT License @@ -9,7 +9,7 @@ - + @@ -47,7 +47,7 @@ - + diff --git a/intercom-plugin/src/android/IntercomBridge.java b/intercom-plugin/src/android/IntercomBridge.java index 0d4bfaa..dd79725 100644 --- a/intercom-plugin/src/android/IntercomBridge.java +++ b/intercom-plugin/src/android/IntercomBridge.java @@ -189,6 +189,12 @@ private enum Action { callbackContext.success(); } }, + displayHelpCenter { + @Override void performAction(JSONArray args, CallbackContext callbackContext, CordovaInterface cordova) { + Intercom.client().displayHelpCenter(); + callbackContext.success(); + } + }, setLauncherVisibility { @Override void performAction(JSONArray args, CallbackContext callbackContext, CordovaInterface cordova) { String visibilityString = args.optString(0); diff --git a/intercom-plugin/src/android/intercom.gradle b/intercom-plugin/src/android/intercom.gradle index ec2bfe7..95f30be 100644 --- a/intercom-plugin/src/android/intercom.gradle +++ b/intercom-plugin/src/android/intercom.gradle @@ -26,12 +26,12 @@ repositories { } dependencies { - compile 'io.intercom.android:intercom-sdk-base:4.1.+' + compile 'io.intercom.android:intercom-sdk-base:5.0.+' if (pushType == 'gcm') { - compile 'io.intercom.android:intercom-sdk-gcm:4.1.+' + compile 'io.intercom.android:intercom-sdk-gcm:5.0.+' } else if (pushType == 'fcm' || pushType == 'fcm-without-build-plugin') { compile 'com.google.firebase:firebase-messaging:11.+' - compile 'io.intercom.android:intercom-sdk-fcm:4.1.+' + compile 'io.intercom.android:intercom-sdk-fcm:5.0.+' } } diff --git a/intercom-plugin/src/ios/IntercomBridge.h b/intercom-plugin/src/ios/IntercomBridge.h index f1baaea..00ac7c6 100644 --- a/intercom-plugin/src/ios/IntercomBridge.h +++ b/intercom-plugin/src/ios/IntercomBridge.h @@ -19,6 +19,7 @@ - (void)displayMessageComposer:(CDVInvokedUrlCommand*)command; - (void)displayMessageComposerWithInitialMessage:(CDVInvokedUrlCommand*)command; - (void)displayConversationsList:(CDVInvokedUrlCommand*)command; +- (void)displayHelpCenter:(CDVInvokedUrlCommand*)command; - (void)setLauncherVisibility:(CDVInvokedUrlCommand*)command; - (void)setInAppMessageVisibility:(CDVInvokedUrlCommand*)command; diff --git a/intercom-plugin/src/ios/IntercomBridge.m b/intercom-plugin/src/ios/IntercomBridge.m index dfc9570..e04f334 100644 --- a/intercom-plugin/src/ios/IntercomBridge.m +++ b/intercom-plugin/src/ios/IntercomBridge.m @@ -108,6 +108,11 @@ - (void)displayConversationsList:(CDVInvokedUrlCommand*)command { [self sendSuccess:command]; } +- (void)displayHelpCenter:(CDVInvokedUrlCommand*)command { + [Intercom presentHelpCenter]; + [self sendSuccess:command]; +} + - (void)hideMessenger:(CDVInvokedUrlCommand*)command { [Intercom hideMessenger]; [self sendSuccess:command]; diff --git a/intercom-plugin/www/intercom.js b/intercom-plugin/www/intercom.js index 762188a..ec2e397 100644 --- a/intercom-plugin/www/intercom.js +++ b/intercom-plugin/www/intercom.js @@ -47,6 +47,10 @@ var intercom = { cordova.exec(success, error, 'Intercom', 'displayConversationsList', []); }, + displayHelpCenter: function(success, error) { + cordova.exec(success, error, 'Intercom', 'displayHelpCenter', []); + }, + unreadConversationCount: function(success, error) { cordova.exec(success, error, 'Intercom', 'unreadConversationCount', []); },