Skip to content

Commit

Permalink
[MOBILE-1900] Release 12.0.0 (#362)
Browse files Browse the repository at this point in the history
* [MOBILE-1900] Release 12.0.0

* Fix CI

* Modify Google-services

* Update scripts/create_sample.sh

Co-authored-by: Ulrich Giberné <[email protected]>

Co-authored-by: Ulrich Giberné <[email protected]>
  • Loading branch information
rlepinski and Ulrico972 authored Sep 21, 2020
1 parent 06f06e5 commit ef3b212
Show file tree
Hide file tree
Showing 14 changed files with 960 additions and 54 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ on: [pull_request]

jobs:
android:
runs-on: ubuntu-latest
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_12.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: Run CI
run: bash ./scripts/run_ci_tasks.sh -a
ios:
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_11.3.1.app
DEVELOPER_DIR: /Applications/Xcode_12.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: Run CI
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
build:
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_12.app/Contents/Developer

steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Cordova Plugin Changelog

## Version 12.0.0 - September 17, 2020

Major release for Airship Android SDK 14.0 and iOS SDK 14.1.

## Changes
- Xcode 12 is now required.
- Requires Cordova iOS 6.1.0+, Cordova Android 9.0.0+.
- Fixed conflict with play services with Cordova Android 9.0.0.


## Version 11.0.1 - August 17, 2020
Patch release updating iOS and Android SDK versions to 13.5.4 and 13.3.2, respectively.

Expand Down
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,23 @@ Please visit http://support.urbanairship.com/ for any issues integrating or usin

### Requirements:
- cordova >= 9.0.0
- cordova-ios >= 5.0.1
- cococapods >= 1.7.3
- cordova-ios >= 6.1.0
- cordova-android >= 9.0.0
- cococapods >= 1.9

#### iOS:
- Xcode 11+
- Xcode 12+
- [APNS Setup](https://docs.airship.com/platform/ios/getting-started/#apple-setup)

#### Android
- Android [FCM Setup](https://docs.airship.com/platform/android/getting-started/#fcm-setup)

##### Jetpack / AndroidX

This plugin requires modern Jetpack libraries (AndroidX). If the application includes plugins that are still on the old Android
Support libraries, you will face build issues. The quickest way to work around the issue is to install `cordova-plugin-androidx`
and `cordova-plugin-androidx-adapter`, which will automatically enable Jetpack and migrate plugins in the application:
This plugin requires modern Jetpack libraries (AndroidX). Enable AndroidX in your config.xml:

```
cordova plugin add cordova-plugin-androidx-adapter
cordova plugin add cordova-plugin-androidx
<preference name="AndroidXEnabled" value="true" />
```

### Quickstart
Expand Down Expand Up @@ -208,14 +206,6 @@ In order to take advantage of iOS notification attachments, such as images,
animated gifs, and video, you will need to create a [notification service extension](https://developer.apple.com/reference/usernotifications/unnotificationserviceextension/)
by following the [iOS Notification Service Extension Guide](https://docs.airship.com/platform/ios/getting-started/#notification-service-extension).

### Android GoogleServicesPlugin

The plugin will automatically apply the `GoogleServicesPlugin` for FCM. This can cause conflicts with other plugins that also apply
the `GoogleServicesPlugin`. Applications can disable applying the plugin by setting the gradle property `uaSkipApplyGoogleServicesPlugin`
to `true`. See (Setting Gradle Properties)[https://cordova.apache.org/docs/en/latest/guide/platforms/android/#setting-gradle-properties]
for details on how to set a gradle property in a Cordova project.


### Sample

A sample can be found in the Example directory.
Expand Down
4 changes: 4 additions & 0 deletions config_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<resource-file src="google-services.json" target="app/google-services.json" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>

<preference name="AndroidXEnabled" value="true" />

<!-- Urban Airship app credentials -->
<preference name="com.urbanairship.production_app_key" value="APP_KEY_PLACEHOLDER" />
<preference name="com.urbanairship.production_app_secret" value="APP_SECRET_PLACEHOLDER" />
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "urbanairship-cordova",
"version": "11.0.1",
"version": "12.0.0",
"description": "Urban Airship Cordova plugin",
"cordova": {
"id": "urbanairship-cordova",
Expand Down
16 changes: 10 additions & 6 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="urbanairship-cordova"
version="11.0.1"
version="12.0.0"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">

Expand All @@ -11,8 +11,8 @@
<repo>https://github.com/urbanairship/urbanairship-cordova.git</repo>

<engines>
<engine name="cordova-android" version=">=4.1.0"/>
<engine name="cordova-ios" version=">=5.0.1"/>
<engine name="cordova-android" version=">=9.0.0"/>
<engine name="cordova-ios" version=">=6.1.0"/>
<engine name="cordova" version=">=9.0.1"/>
</engines>

Expand All @@ -22,6 +22,10 @@

<!-- android -->
<platform name="android">
<config-file target="config.xml" parent="/*">
<preference name="GradlePluginGoogleServicesEnabled" value="true" />
<preference name="GradlePluginGoogleServicesVersion" value="4.2.0" />
</config-file>
<config-file parent="/widget" target="res/xml/config.xml">
<feature name="UAirship">
<param
Expand All @@ -36,7 +40,7 @@
<config-file parent="/manifest/application" target="AndroidManifest.xml">
<meta-data
android:name="com.urbanairship.cordova.version"
android:value="11.0.1"/>
android:value="12.0.0"/>

<meta-data
android:name="com.urbanairship.autopilot"
Expand Down Expand Up @@ -138,7 +142,7 @@
</config-file>

<config-file target="*-Info.plist" parent="UACordovaPluginVersion">
<string>11.0.1</string>
<string>12.0.0</string>
</config-file>

<config-file parent="/widget" target="config.xml">
Expand Down Expand Up @@ -189,7 +193,7 @@
<source url="https://github.com/CocoaPods/Specs.git"/>
</config>
<pods use-frameworks="true">
<pod name="Airship" spec="13.5.4" />
<pod name="Airship" spec="14.1.0" />
</pods>
</podspec>

Expand Down
6 changes: 3 additions & 3 deletions scripts/config.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

CORDOVA_VERSION=9.0.0
IOS_CORDOVA_VERSION=5.1.1
ANDROID_CORDOVA_VERSION=8.1.0
CORDOVA_VERSION=10.0.0
IOS_CORDOVA_VERSION=6.1.1
ANDROID_CORDOVA_VERSION=9.0.0
6 changes: 4 additions & 2 deletions scripts/create_sample.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ cp "$ROOT_PATH/Example/index.html" www/index.html
cp "$ROOT_PATH/Example/css/"* www/css
cp "$ROOT_PATH/Example/js/"* www/js

# copy mock google-services.json
cp "$ROOT_PATH/scripts/mock-google-services.json" google-services.json


# add required plugins
npx cordova plugin add cordova-plugin-device
npx cordova plugin add cordova-plugin-androidx-adapter
npx cordova plugin add cordova-plugin-androidx

# set up iOS
npx cordova platform add ios@$IOS_CORDOVA_VERSION
Expand Down
Loading

0 comments on commit ef3b212

Please sign in to comment.