Skip to content

Commit

Permalink
Merge pull request #237 from intercom/skylerwshaw/bump_to_v5
Browse files Browse the repository at this point in the history
Bump version to 5.0.0
  • Loading branch information
Skyler Shaw authored Jan 22, 2018
2 parents 3d80f2c + 3c3952e commit d1c7aa4
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 11 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Intercom for Cordova/PhoneGap

## 5.0.0 (2018-01-22)

* Supports `cordova-android` 7.0.0, the default Android build version when using `cordova-cli` 8.0.0, though it may also be specified on earlier versions (tested on [Cordova 7.1.0](https://github.com/apache/cordova-cli/releases/tag/7.1.0))

* Deprecates GCM as a push type in favor of FCM. This includes removing the ability to specify a GCM/FCM sender id directly from config.xml. To use push on Android, adding your google-services.json to the root of your project is now required.

* Per the [`cordova-android` 7.0.0 release notes](cordova.apache.org/announcements/2017/12/04/cordova-android-7.0.0.html), the minimum Android API version supported is now API Level 19.

---

Update guide:

1. If you have not already done so, update your `cordova-cli`:
```
npm install -g cordova
cd my_project
cordova platform remove android
cordova platform add [email protected]
```
2. Update `plugin-cordova-intercom`:
```
cordova plugin remove cordova-plugin-intercom
cordova plugin add [email protected]
```
3. Ensure your config.xml specifies an android-minSdkVersion at or above 19:
* `<preference name="android-minSdkVersion" value="19" />`
4. To use push on Android:
* Ensure you've added `<preference name="intercom-android-push-type" value="FCM"/>` to your config.xml
* Copy your FCM `google-services.json` file to the root directory of your project.
_NB: The above steps may not be exhaustive and are dependent on your app and system Cordova configuration_
## 4.1.2 (2017-11-16)
* Further fixes to issue with diagnostic messages on Android: [#219](https://github.com/intercom/intercom-cordova/issues/219).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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="~4.1.2" />
<plugin name="cordova-plugin-intercom" version="~5.0.0" />
```
### Ionic

Expand Down
8 changes: 4 additions & 4 deletions intercom-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-intercom",
"version": "4.1.2",
"version": "5.0.0",
"description": "Official Cordova/PhoneGap plugin for Intercom",
"cordova": {
"id": "cordova-plugin-intercom",
Expand All @@ -23,15 +23,15 @@
"engines": [
{
"name": "cordova",
"version": ">=6.4.0"
"version": ">=7.1.0"
},
{
"name": "cordova-android",
"version": ">=4.0.0"
"version": ">=7.0.0"
},
{
"name": "cordova-ios",
"version": ">=4.3.1"
"version": ">=4.5.4"
}
],
"author": "Intercom",
Expand Down
8 changes: 4 additions & 4 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="4.1.2" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<plugin id="cordova-plugin-intercom" version="5.0.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 @@ -8,9 +8,9 @@
<keywords>intercom,intercom-cordova</keywords>

<engines>
<engine name="cordova" version=">=6.4.0" />
<engine name="cordova-android" version=">=4.0.0" />
<engine name="cordova-ios" version=">=4.3.1" />
<engine name="cordova" version=">=7.1.0" />
<engine name="cordova-android" version=">=7.0.0" />
<engine name="cordova-ios" version=">=4.5.4" />
</engines>

<js-module name="Intercom" src="www/intercom.js">
Expand Down
2 changes: 1 addition & 1 deletion intercom-plugin/src/android/IntercomBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void setUpIntercom() {
try {
Context context = IntercomBridge.this.cordova.getActivity().getApplicationContext();

CordovaHeaderInterceptor.setCordovaVersion(context, "4.1.2");
CordovaHeaderInterceptor.setCordovaVersion(context, "5.0.0");

switch (IntercomPushManager.getInstalledModuleType()) {
case GCM: {
Expand Down
2 changes: 1 addition & 1 deletion intercom-plugin/src/ios/IntercomBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ + (void)setCordovaVersion:(NSString *)v;
@implementation IntercomBridge : CDVPlugin

- (void)pluginInitialize {
[Intercom setCordovaVersion:@"4.1.2"];
[Intercom setCordovaVersion:@"5.0.0"];
#ifdef DEBUG
[Intercom enableLogging];
#endif
Expand Down

0 comments on commit d1c7aa4

Please sign in to comment.