summaryrefslogtreecommitdiff
path: root/StoneIsland/plugins
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-09-26 01:35:13 +0200
committerJules Laplace <julescarbon@gmail.com>2017-09-26 01:35:13 +0200
commit597fa051833ca3df6eb185c0143ff82e02dacba1 (patch)
treecb25347477c57f82e955b054b70f4bb5359fb0d2 /StoneIsland/plugins
parent6a9186aea6b85beef28e3eb765fbf2322a1c7890 (diff)
push plugin ugh
Diffstat (limited to 'StoneIsland/plugins')
-rwxr-xr-xStoneIsland/plugins/android.json10
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/LICENSE21
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/README.md342
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/package.json60
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/plugin.xml108
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/scripts/after_prepare.js134
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePlugin.java601
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePluginInstanceIDService.java26
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePluginMessagingService.java127
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/android/OnNotificationOpenReceiver.java24
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/android/build-extras.gradle1
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/android/build.gradle15
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/android/colors.xml6
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/android/google-services.json0
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/AppDelegate+FirebasePlugin.h5
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/AppDelegate+FirebasePlugin.m132
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalyticsbin14943968 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h57
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h102
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h1
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRApp.h1
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRConfiguration.h1
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h336
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIROptions.h1
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h369
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h13
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h9
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap10
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/FirebaseCorebin4836560 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h38
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h98
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h52
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h12
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h93
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h5
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap8
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceIDbin4472464 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h245
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h1
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap7
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMacbin626792 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/FirebaseCrashbin5551304 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Headers/FIRCrashLog.h164
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Headers/FirebaseCrash.h1
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Modules/module.modulemap12
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/Protobuf.framework/Protobufbin7721656 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/batch-upload416
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/dump_symsbin211352 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/extract-keys12
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym273
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym-util.bash382
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym.sh4
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Firebase.h52
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessagingbin6370360 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h227
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h1
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap11
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/Protobuf.framework/Protobufbin7721656 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/FirebaseRemoteConfigbin3170248 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FIRRemoteConfig.h224
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FirebaseRemoteConfig.h1
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Modules/module.modulemap11
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/Protobuf.framework/Protobufbin7721656 -> 0 bytes
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/src/ios/FirebasePlugin.h30
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/ios/FirebasePlugin.m331
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/src/ios/GoogleService-Info.plist6
-rwxr-xr-xStoneIsland/plugins/cordova-plugin-firebase/www/firebase-browser.js119
-rw-r--r--StoneIsland/plugins/cordova-plugin-firebase/www/firebase.js121
-rwxr-xr-xStoneIsland/plugins/fetch.json26
-rw-r--r--StoneIsland/plugins/ios.json18
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/CHANGELOG.md582
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/MIT-LICENSE2
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/README.md10
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/docs/API.md32
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/docs/EXAMPLES.md1
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/docs/INSTALLATION.md166
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/docs/PAYLOAD.md817
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/docs/PHONEGAP_BUILD.md29
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/docs/TYPESCRIPT.md5
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/hooks/windows/setToastCapable.js8
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/package.json108
-rwxr-xr-xStoneIsland/plugins/phonegap-plugin-push/plugin.xml63
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/push.gradle18
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js72
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java4
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/FCMService.java (renamed from StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/GCMIntentService.java)139
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PermissionUtils.java4
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushConstants.java16
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushDismissedHandler.java25
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushHandlerActivity.java32
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushInstanceIDListenerService.java19
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushPlugin.java132
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/RegistrationIntentService.java38
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/browser/manifest.json2
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.h17
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.m295
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/js/push.js316
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/src/windows/PushPluginProxy.js6
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/types/index.d.ts302
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/www/browser/push.js31
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/www/push.js483
101 files changed, 2792 insertions, 6495 deletions
diff --git a/StoneIsland/plugins/android.json b/StoneIsland/plugins/android.json
index 6ad5cf91..c72d0395 100755
--- a/StoneIsland/plugins/android.json
+++ b/StoneIsland/plugins/android.json
@@ -44,19 +44,15 @@
"ionic-plugin-keyboard": {
"PACKAGE_NAME": "us.okfoc.stoneisland"
},
- "phonegap-plugin-push": {
- "SENDER_ID": "XXXXXXX",
- "PACKAGE_NAME": "us.okfoc.stoneisland"
- },
"cordova-plugin-statusbar": {
"PACKAGE_NAME": "us.okfoc.stoneisland"
},
- "cordova-plugin-firebase": {
- "PACKAGE_NAME": "us.okfoc.stoneisland"
- },
"cordova-plugin-app-name": {
"APP_NAME": "Stone Island",
"PACKAGE_NAME": "us.okfoc.stoneisland"
+ },
+ "phonegap-plugin-push": {
+ "PACKAGE_NAME": "us.okfoc.stoneisland"
}
},
"dependent_plugins": {
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/LICENSE b/StoneIsland/plugins/cordova-plugin-firebase/LICENSE
deleted file mode 100644
index 4a12e4dc..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2016 Robert Arnesson AB
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/README.md b/StoneIsland/plugins/cordova-plugin-firebase/README.md
deleted file mode 100644
index 2fed7ef5..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/README.md
+++ /dev/null
@@ -1,342 +0,0 @@
-# cordova-plugin-firebase
-This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project!
-Android and iOS supported.
-
-Donations are welcome and will go towards further development of this project. Use the wallet address below to donate.
-
-BTC: 1JuXhHMCPHXT2fDfSRUTef9TpE2D67sc9f
-
-Thank you for your support!
-
-## Installation
-See npm package for versions - https://www.npmjs.com/package/cordova-plugin-firebase
-
-Install the plugin by adding it your project's config.xml:
-```
-<plugin name="cordova-plugin-firebase" spec="0.1.24" />
-```
-or by running:
-```
-cordova plugin add cordova-plugin-firebase@0.1.24 --save
-```
-Download your Firebase configuration files, GoogleService-Info.plist for ios and google-services.json for android, and place them in the root folder of your cordova project:
-
-```
-- My Project/
- platforms/
- plugins/
- www/
- config.xml
- google-services.json <--
- GoogleService-Info.plist <--
- ...
-```
-
-See https://support.google.com/firebase/answer/7015592 for details how to download the files from firebase.
-
-This plugin uses a hook (after prepare) that copies the configuration files to the right place, namely platforms/ios/\<My Project\>/Resources for ios and platforms/android for android.
-
-**Note that the Firebase SDK requires the configuration files to be present and valid, otherwise your app will crash on boot or Firebase features won't work.**
-
-## Changing Notification Icon
-The plugin will use notification_icon from drawable resources if it exists, otherwise the default app icon will is used.
-To set a big icon and small icon for notifications, define them through drawable nodes.
-Create the required styles.xml files and add the icons to the
-`<projectroot>/res/native/android/res/<drawable-DPI>` folders.
-
-The example below uses a png named "ic_silhouette.png", the app Icon (@mipmap/icon) and sets a base theme.
-From android version 21 (Lollipop) notifications were changed, needing a seperate setting.
-If you only target Lollipop and above, you don't need to setup both.
-Thankfully using the version dependant asset selections, we can make one build/apk supporting all target platforms.
-`<projectroot>/res/native/android/res/values/styles.xml`
-```
-<?xml version="1.0" encoding="utf-8" ?>
-<resources>
- <!-- inherit from the holo theme -->
- <style name="AppTheme" parent="android:Theme.Light">
- <item name="android:windowDisablePreview">true</item>
- </style>
- <drawable name="notification_big">@mipmap/icon</drawable>
- <drawable name="notification_icon">@mipmap/icon</drawable>
-</resources>
-```
-and
-`<projectroot>/res/native/android/res/values-v21/styles.xml`
-```
-<?xml version="1.0" encoding="utf-8" ?>
-<resources>
- <!-- inherit from the material theme -->
- <style name="AppTheme" parent="android:Theme.Material">
- <item name="android:windowDisablePreview">true</item>
- </style>
- <drawable name="notification_big">@mipmap/icon</drawable>
- <drawable name="notification_icon">@drawable/ic_silhouette</drawable>
-</resources>
-```
-
-## Notification Colors
-
-On Android Lollipop and above you can also set the accent color for the notification by adding a color setting.
-
-`<projectroot>/res/native/android/res/values/colors.xml`
-```
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <color name="primary">#FFFFFF00</color>
- <color name="primary_dark">#FF220022</color>
- <color name="accent">#FF00FFFF</color>
-</resources>
-```
-
-
-### Notes about PhoneGap Build
-
-Hooks does not work with PhoneGap Build. This means you will have to manually make sure the configuration files are included. One way to do that is to make a private fork of this plugin and replace the placeholder config files (see src/ios and src/android) with your actual ones, as well as hard coding your app id and api key in plugin.xml.
-
-
-## Methods
-
-### getToken
-
-Get the device token (id):
-```
-window.FirebasePlugin.getToken(function(token) {
- // save this server-side and use it to push notifications to this device
- console.log(token);
-}, function(error) {
- console.error(error);
-});
-```
-Note that token will be null if it has not been established yet
-
-### onTokenRefresh
-
-Register for token changes:
-```
-window.FirebasePlugin.onTokenRefresh(function(token) {
- // save this server-side and use it to push notifications to this device
- console.log(token);
-}, function(error) {
- console.error(error);
-});
-```
-This is the best way to get a valid token for the device as soon as the token is established
-
-### onNotificationOpen
-
-Register notification callback:
-```
-window.FirebasePlugin.onNotificationOpen(function(notification) {
- console.log(notification);
-}, function(error) {
- console.error(error);
-});
-```
-Notification flow:
-
-1. App is in foreground:
- 1. User receives the notification data in the JavaScript callback without any notification on the device itself (this is the normal behaviour of push notifications, it is up to you, the developer, to notify the user)
-2. App is in background:
- 1. User receives the notification message in its device notification bar
- 2. User taps the notification and the app opens
- 3. User receives the notification data in the JavaScript callback
-
-Notification icon on Android:
-
-[Changing notification icon](#changing-notification-icon)
-
-### grantPermission (iOS only)
-
-Grant permission to recieve push notifications (will trigger prompt):
-```
-window.FirebasePlugin.grantPermission();
-```
-### hasPermission
-
-Check permission to recieve push notifications:
-```
-window.FirebasePlugin.hasPermission(function(data){
- console.log(data.isEnabled);
-});
-```
-
-### setBadgeNumber
-
-Set a number on the icon badge:
-```
-window.FirebasePlugin.setBadgeNumber(3);
-```
-
-Set 0 to clear the badge
-```
-window.FirebasePlugin.setBadgeNumber(0);
-```
-
-### getBadgeNumber
-
-Get icon badge number:
-```
-window.FirebasePlugin.getBadgeNumber(function(n) {
- console.log(n);
-});
-```
-
-### subscribe
-
-Subscribe to a topic:
-```
-window.FirebasePlugin.subscribe("example");
-```
-
-### unsubscribe
-
-Unsubscribe from a topic:
-```
-window.FirebasePlugin.unsubscribe("example");
-```
-
-### unregister
-
-Unregister from firebase, used to stop receiving push notifications. Call this when you logout user from your app. :
-```
-window.FirebasePlugin.unregister();
-```
-
-### logEvent
-
-Log an event using Analytics:
-```
-window.FirebasePlugin.logEvent("select_content", {content_type: "page_view", item_id: "home"});
-```
-
-### setScreenName
-
-Set the name of the current screen in Analytics:
-```
-window.FirebasePlugin.setScreenName("Home");
-```
-
-### setUserId
-
-Set a user id for use in Analytics:
-```
-window.FirebasePlugin.setUserId("user_id");
-```
-
-### setUserProperty
-
-Set a user property for use in Analytics:
-```
-window.FirebasePlugin.setUserProperty("name", "value");
-```
-
-### fetch
-
-Fetch Remote Config parameter values for your app:
-```
-window.FirebasePlugin.fetch();
-// or, specify the cacheExpirationSeconds
-window.FirebasePlugin.fetch(600);
-```
-
-### activateFetched
-
-Activate the Remote Config fetched config:
-```
-window.FirebasePlugin.activateFetched(function(activated) {
- // activated will be true if there was a fetched config activated,
- // or false if no fetched config was found, or the fetched config was already activated.
- console.log(activated);
-}, function(error) {
- console.error(error);
-});
-```
-
-### getValue
-
-Retrieve a Remote Config value:
-```
-window.FirebasePlugin.getValue("key", function(value) {
- console.log(value);
-}, function(error) {
- console.error(error);
-});
-// or, specify a namespace for the config value
-window.FirebasePlugin.getValue("key", "namespace", function(value) {
- console.log(value);
-}, function(error) {
- console.error(error);
-});
-```
-
-### getByteArray (Android only)
-**NOTE: byte array is only available for SDK 19+**
-Retrieve a Remote Config byte array:
-```
-window.FirebasePlugin.getByteArray("key", function(bytes) {
- // a Base64 encoded string that represents the value for "key"
- console.log(bytes.base64);
- // a numeric array containing the values of the byte array (i.e. [0xFF, 0x00])
- console.log(bytes.array);
-}, function(error) {
- console.error(error);
-});
-// or, specify a namespace for the byte array
-window.FirebasePlugin.getByteArray("key", "namespace", function(bytes) {
- // a Base64 encoded string that represents the value for "key"
- console.log(bytes.base64);
- // a numeric array containing the values of the byte array (i.e. [0xFF, 0x00])
- console.log(bytes.array);
-}, function(error) {
- console.error(error);
-});
-```
-
-### getInfo (Android only)
-
-Get the current state of the FirebaseRemoteConfig singleton object:
-```
-window.FirebasePlugin.getInfo(function(info) {
- // the status of the developer mode setting (true/false)
- console.log(info.configSettings.developerModeEnabled);
- // the timestamp (milliseconds since epoch) of the last successful fetch
- console.log(info.fetchTimeMillis);
- // the status of the most recent fetch attempt (int)
- console.log(info.lastFetchStatus);
-}, function(error) {
- console.error(error);
-});
-```
-
-### setConfigSettings (Android only)
-
-Change the settings for the FirebaseRemoteConfig object's operations:
-```
-var settings = {
- developerModeEnabled: true
-}
-window.FirebasePlugin.setConfigSettings(settings);
-```
-
-### setDefaults (Android only)
-
-Set defaults in the Remote Config:
-```
-// define defaults
-var defaults = {
- // map property name to value in Remote Config defaults
- mLong: 1000,
- mString: 'hello world',
- mDouble: 3.14,
- mBoolean: true,
- // map "mBase64" to a Remote Config byte array represented by a Base64 string
- // Note: the Base64 string is in an array in order to differentiate from a string config value
- mBase64: ["SGVsbG8gV29ybGQ="],
- // map "mBytes" to a Remote Config byte array represented by a numeric array
- mBytes: [0xFF, 0x00]
-}
-// set defaults
-window.FirebasePlugin.setDefaults(defaults);
-// or, specify a namespace
-window.FirebasePlugin.setDefaults(defaults, "namespace");
-```
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/package.json b/StoneIsland/plugins/cordova-plugin-firebase/package.json
deleted file mode 100644
index 90b5d164..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "_from": "cordova-plugin-firebase",
- "_id": "cordova-plugin-firebase@0.1.24",
- "_inBundle": false,
- "_integrity": "sha1-qZk6XHZxFQJM2IIJDuiBT6TvuYQ=",
- "_location": "/cordova-plugin-firebase",
- "_phantomChildren": {},
- "_requested": {
- "type": "tag",
- "registry": true,
- "raw": "cordova-plugin-firebase",
- "name": "cordova-plugin-firebase",
- "escapedName": "cordova-plugin-firebase",
- "rawSpec": "",
- "saveSpec": null,
- "fetchSpec": "latest"
- },
- "_requiredBy": [
- "#USER",
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/cordova-plugin-firebase/-/cordova-plugin-firebase-0.1.24.tgz",
- "_shasum": "a9993a5c767115024cd882090ee8814fa4efb984",
- "_spec": "cordova-plugin-firebase",
- "_where": "/Users/user/Sites/stone-island/StoneIsland/node_modules",
- "author": {
- "name": "Robert Arnesson"
- },
- "bugs": {
- "url": "https://github.com/arnesson/cordova-plugin-firebase/issues"
- },
- "bundleDependencies": false,
- "cordova": {
- "id": "cordova-plugin-firebase",
- "platforms": [
- "android",
- "ios",
- "browser"
- ]
- },
- "deprecated": false,
- "description": "Cordova plugin for Google Firebase",
- "homepage": "https://github.com/arnesson/cordova-plugin-firebase#readme",
- "keywords": [
- "ecosystem:cordova",
- "cordova-android",
- "cordova-ios",
- "cordova-browser",
- "firebase",
- "push",
- "notifications"
- ],
- "license": "MIT",
- "name": "cordova-plugin-firebase",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/arnesson/cordova-plugin-firebase.git"
- },
- "version": "0.1.24"
-}
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/plugin.xml b/StoneIsland/plugins/cordova-plugin-firebase/plugin.xml
deleted file mode 100644
index c0cacd43..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/plugin.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-firebase" version="0.1.24"
-xmlns="http://apache.org/cordova/ns/plugins/1.0"
-xmlns:android="http://schemas.android.com/apk/res/android">
- <name>Google Firebase Plugin</name>
-
- <license>MIT</license>
-
- <engines>
- <engine name="cordova" version=">=3.2.0" />
- </engines>
-
- <platform name="android">
- <js-module name="FirebasePlugin" src="www/firebase.js">
- <clobbers target="FirebasePlugin" />
- </js-module>
- <config-file parent="/*" target="res/xml/config.xml">
- <feature name="FirebasePlugin">
- <param name="android-package" value="org.apache.cordova.firebase.FirebasePlugin" />
- <param name="onload" value="true" />
- </feature>
- </config-file>
- <config-file parent="/resources" target="res/values/strings.xml">
- <string name="google_app_id">@string/google_app_id</string>
- </config-file>
- <config-file parent="/resources" target="res/values/strings.xml">
- <string name="google_api_key">@string/google_api_key</string>
- </config-file>
- <config-file target="AndroidManifest.xml" parent="/*">
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.WAKE_LOCK" />
- </config-file>
- <config-file target="AndroidManifest.xml" parent="/manifest/application">
- <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService" />
- </config-file>
- <config-file target="AndroidManifest.xml" parent="/manifest/application">
- <service android:name="org.apache.cordova.firebase.FirebasePluginMessagingService">
- <intent-filter>
- <action android:name="com.google.firebase.MESSAGING_EVENT"/>
- </intent-filter>
- </service>
- <service android:name="org.apache.cordova.firebase.FirebasePluginInstanceIDService">
- <intent-filter>
- <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
- </intent-filter>
- </service>
- <receiver android:name="org.apache.cordova.firebase.OnNotificationOpenReceiver"></receiver>
- </config-file>
- <source-file src="src/android/google-services.json" target-dir="." />
- <source-file src="src/android/FirebasePlugin.java" target-dir="src/org/apache/cordova/firebase" />
- <source-file src="src/android/OnNotificationOpenReceiver.java" target-dir="src/org/apache/cordova/firebase" />
- <source-file src="src/android/FirebasePluginInstanceIDService.java" target-dir="src/org/apache/cordova/firebase" />
- <source-file src="src/android/FirebasePluginMessagingService.java" target-dir="src/org/apache/cordova/firebase" />
- <source-file src="src/android/colors.xml" target-dir="res/values" />
-
- <framework src="src/android/build.gradle" custom="true" type="gradleReference" />
- <framework src="com.google.gms:google-services:+" />
- <framework src="com.google.firebase:firebase-core:+" />
- <framework src="com.google.firebase:firebase-messaging:+" />
- <framework src="com.google.firebase:firebase-crash:+" />
- <framework src="com.google.firebase:firebase-config:+" />
- </platform>
-
- <platform name="ios">
- <js-module name="FirebasePlugin" src="www/firebase.js">
- <clobbers target="FirebasePlugin" />
- </js-module>
- <config-file parent="/*" target="config.xml">
- <feature name="FirebasePlugin">
- <param name="ios-package" value="FirebasePlugin" />
- <param name="onload" value="true" />
- </feature>
- </config-file>
- <config-file parent="aps-environment" target="*/Entitlements-Debug.plist">
- <string>development</string>
- </config-file>
- <config-file parent="aps-environment" target="*/Entitlements-Release.plist">
- <string>production</string>
- </config-file>
-
- <resource-file src="src/ios/GoogleService-Info.plist" />
-
- <header-file src="src/ios/AppDelegate+FirebasePlugin.h" />
- <source-file src="src/ios/AppDelegate+FirebasePlugin.m" />
- <header-file src="src/ios/FirebasePlugin.h" />
- <source-file src="src/ios/FirebasePlugin.m" />
-
- <header-file src="src/ios/Firebase/Firebase.h" />
-
- <framework custom="true" src="src/ios/Firebase/Analytics/FirebaseAnalytics.framework" />
- <framework custom="true" src="src/ios/Firebase/Analytics/FirebaseCore.framework" />
- <framework custom="true" src="src/ios/Firebase/Analytics/FirebaseInstanceID.framework" />
- <framework custom="true" src="src/ios/Firebase/Analytics/GoogleToolboxForMac.framework" />
- <framework custom="true" src="src/ios/Firebase/Messaging/Protobuf.framework" />
- <framework custom="true" src="src/ios/Firebase/Messaging/FirebaseMessaging.framework" />
- <framework custom="true" src="src/ios/Firebase/Crash/FirebaseCrash.framework" />
- <framework custom="true" src="src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework" />
- </platform>
-
- <platform name="browser">
- <js-module name="FirebasePlugin" src="www/firebase-browser.js">
- <clobbers target="FirebasePlugin" />
- </js-module>
- </platform>
-
- <hook src="scripts/after_prepare.js" type="after_prepare" />
-</plugin>
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/scripts/after_prepare.js b/StoneIsland/plugins/cordova-plugin-firebase/scripts/after_prepare.js
deleted file mode 100755
index 3f8406c2..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/scripts/after_prepare.js
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-
-/**
- * This hook makes sure projects using [cordova-plugin-firebase](https://github.com/arnesson/cordova-plugin-firebase)
- * will build properly and have the required key files copied to the proper destinations when the app is build on Ionic Cloud using the package command.
- * Credits: https://github.com/arnesson.
- */
-var fs = require('fs');
-var path = require('path');
-
-fs.ensureDirSync = function (dir) {
- if (!fs.existsSync(dir)) {
- dir.split(path.sep).reduce(function (currentPath, folder) {
- currentPath += folder + path.sep;
- if (!fs.existsSync(currentPath)) {
- fs.mkdirSync(currentPath);
- }
- return currentPath;
- }, '');
- }
-};
-
-var config = fs.readFileSync('config.xml').toString();
-var name = getValue(config, 'name');
-
-var IOS_DIR = 'platforms/ios';
-var ANDROID_DIR = 'platforms/android';
-
-var PLATFORM = {
- IOS: {
- dest: [
- IOS_DIR + '/' + name + '/Resources/GoogleService-Info.plist',
- IOS_DIR + '/' + name + '/Resources/Resources/GoogleService-Info.plist'
- ],
- src: [
- 'GoogleService-Info.plist',
- IOS_DIR + '/www/GoogleService-Info.plist',
- 'www/GoogleService-Info.plist'
- ]
- },
- ANDROID: {
- dest: [
- ANDROID_DIR + '/google-services.json'
- ],
- src: [
- 'google-services.json',
- ANDROID_DIR + '/assets/www/google-services.json',
- 'www/google-services.json'
- ],
- stringsXml: ANDROID_DIR + '/res/values/strings.xml'
- }
-};
-
-// Copy key files to their platform specific folders
-if (directoryExists(IOS_DIR)) {
- copyKey(PLATFORM.IOS);
-} else if (directoryExists(ANDROID_DIR)) {
- copyKey(PLATFORM.ANDROID, updateStringsXml)
-}
-
-function updateStringsXml(contents) {
- var json = JSON.parse(contents);
- var strings = fs.readFileSync(PLATFORM.ANDROID.stringsXml).toString();
-
- // strip non-default value
- strings = strings.replace(new RegExp('<string name="google_app_id">([^\@<]+?)</string>', 'i'), '');
-
- // strip non-default value
- strings = strings.replace(new RegExp('<string name="google_api_key">([^\@<]+?)</string>', 'i'), '');
-
- // strip empty lines
- strings = strings.replace(new RegExp('(\r\n|\n|\r)[ \t]*(\r\n|\n|\r)', 'gm'), '$1');
-
- // replace the default value
- strings = strings.replace(new RegExp('<string name="google_app_id">([^<]+?)</string>', 'i'), '<string name="google_app_id">' + json.client[0].client_info.mobilesdk_app_id + '</string>');
-
- // replace the default value
- strings = strings.replace(new RegExp('<string name="google_api_key">([^<]+?)</string>', 'i'), '<string name="google_api_key">' + json.client[0].api_key[0].current_key + '</string>');
-
- fs.writeFileSync(PLATFORM.ANDROID.stringsXml, strings);
-}
-
-function copyKey(platform, callback) {
- for (var i = 0; i < platform.src.length; i++) {
- var file = platform.src[i];
- if (fileExists(file)) {
- try {
- var contents = fs.readFileSync(file).toString();
-
- try {
- platform.dest.forEach(function (destinationPath) {
- var folder = destinationPath.substring(0, destinationPath.lastIndexOf('/'));
- fs.ensureDirSync(folder);
- fs.writeFileSync(destinationPath, contents);
- });
- } catch (e) {
- // skip
- }
-
- callback && callback(contents);
- } catch (err) {
- console.log(err)
- }
-
- break;
- }
- }
-}
-
-function getValue(config, name) {
- var value = config.match(new RegExp('<' + name + '>(.*?)</' + name + '>', 'i'));
- if (value && value[1]) {
- return value[1]
- } else {
- return null
- }
-}
-
-function fileExists(path) {
- try {
- return fs.statSync(path).isFile();
- } catch (e) {
- return false;
- }
-}
-
-function directoryExists(path) {
- try {
- return fs.statSync(path).isDirectory();
- } catch (e) {
- return false;
- }
-}
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePlugin.java b/StoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePlugin.java
deleted file mode 100755
index 7e4431df..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePlugin.java
+++ /dev/null
@@ -1,601 +0,0 @@
-package org.apache.cordova.firebase;
-
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.support.v4.app.NotificationManagerCompat;
-import android.util.Base64;
-import android.util.Log;
-import com.google.android.gms.tasks.OnCompleteListener;
-import com.google.android.gms.tasks.OnFailureListener;
-import com.google.android.gms.tasks.Task;
-import com.google.firebase.analytics.FirebaseAnalytics;
-import com.google.firebase.iid.FirebaseInstanceId;
-import com.google.firebase.messaging.FirebaseMessaging;
-import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
-import com.google.firebase.remoteconfig.FirebaseRemoteConfigInfo;
-import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings;
-import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue;
-import com.google.firebase.crash.FirebaseCrash;
-import me.leolin.shortcutbadger.ShortcutBadger;
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.PluginResult;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-public class FirebasePlugin extends CordovaPlugin {
-
- private FirebaseAnalytics mFirebaseAnalytics;
- private final String TAG = "FirebasePlugin";
- protected static final String KEY = "badge";
-
- private static boolean inBackground = true;
- private static ArrayList<Bundle> notificationStack = null;
- private static CallbackContext notificationCallbackContext;
- private static CallbackContext tokenRefreshCallbackContext;
-
- @Override
- protected void pluginInitialize() {
- final Context context = this.cordova.getActivity().getApplicationContext();
- final Bundle extras = this.cordova.getActivity().getIntent().getExtras();
- this.cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- Log.d(TAG, "Starting Firebase plugin");
- mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
- mFirebaseAnalytics.setAnalyticsCollectionEnabled(true);
- if (extras != null && extras.size() > 1) {
- if (FirebasePlugin.notificationStack == null) {
- FirebasePlugin.notificationStack = new ArrayList<Bundle>();
- }
- if (extras.containsKey("google.message_id")) {
- extras.putBoolean("tap", true);
- notificationStack.add(extras);
- }
- }
- }
- });
- }
-
- @Override
- public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
- if (action.equals("getInstanceId")) {
- this.getInstanceId(callbackContext);
- return true;
- } else if (action.equals("getToken")) {
- this.getToken(callbackContext);
- return true;
- } else if (action.equals("hasPermission")) {
- this.hasPermission(callbackContext);
- return true;
- } else if (action.equals("setBadgeNumber")) {
- this.setBadgeNumber(callbackContext, args.getInt(0));
- return true;
- } else if (action.equals("getBadgeNumber")) {
- this.getBadgeNumber(callbackContext);
- return true;
- } else if (action.equals("subscribe")) {
- this.subscribe(callbackContext, args.getString(0));
- return true;
- } else if (action.equals("unsubscribe")) {
- this.unsubscribe(callbackContext, args.getString(0));
- return true;
- } else if (action.equals("unregister")) {
- this.unregister(callbackContext);
- return true;
- } else if (action.equals("onNotificationOpen")) {
- this.onNotificationOpen(callbackContext);
- return true;
- } else if (action.equals("onTokenRefresh")) {
- this.onTokenRefresh(callbackContext);
- return true;
- } else if (action.equals("logEvent")) {
- this.logEvent(callbackContext, args.getString(0), args.getJSONObject(1));
- return true;
- } else if (action.equals("logError")) {
- this.logError(callbackContext, args.getString(0));
- return true;
- } else if (action.equals("setScreenName")) {
- this.setScreenName(callbackContext, args.getString(0));
- return true;
- } else if (action.equals("setUserId")) {
- this.setUserId(callbackContext, args.getString(0));
- return true;
- } else if (action.equals("setUserProperty")) {
- this.setUserProperty(callbackContext, args.getString(0), args.getString(1));
- return true;
- } else if (action.equals("activateFetched")) {
- this.activateFetched(callbackContext);
- return true;
- } else if (action.equals("fetch")) {
- if (args.length() > 0) this.fetch(callbackContext, args.getLong(0));
- else this.fetch(callbackContext);
- return true;
- } else if (action.equals("getByteArray")) {
- if (args.length() > 1) this.getByteArray(callbackContext, args.getString(0), args.getString(1));
- else this.getByteArray(callbackContext, args.getString(0), null);
- return true;
- } else if (action.equals("getValue")) {
- if (args.length() > 1) this.getValue(callbackContext, args.getString(0), args.getString(1));
- else this.getValue(callbackContext, args.getString(0), null);
- return true;
- } else if (action.equals("getInfo")) {
- this.getInfo(callbackContext);
- return true;
- } else if (action.equals("setConfigSettings")) {
- this.setConfigSettings(callbackContext, args.getJSONObject(0));
- return true;
- } else if (action.equals("setDefaults")) {
- if (args.length() > 1) this.setDefaults(callbackContext, args.getJSONObject(0), args.getString(1));
- else this.setDefaults(callbackContext, args.getJSONObject(0), null);
- return true;
- }
- return false;
- }
-
- @Override
- public void onPause(boolean multitasking) {
- FirebasePlugin.inBackground = true;
- }
-
- @Override
- public void onResume(boolean multitasking) {
- FirebasePlugin.inBackground = false;
- }
-
- @Override
- public void onReset() {
- FirebasePlugin.notificationCallbackContext = null;
- FirebasePlugin.tokenRefreshCallbackContext = null;
- }
-
- private void onNotificationOpen(final CallbackContext callbackContext) {
- FirebasePlugin.notificationCallbackContext = callbackContext;
- if (FirebasePlugin.notificationStack != null) {
- for (Bundle bundle : FirebasePlugin.notificationStack) {
- FirebasePlugin.sendNotification(bundle);
- }
- FirebasePlugin.notificationStack.clear();
- }
- }
-
- private void onTokenRefresh(final CallbackContext callbackContext) {
- FirebasePlugin.tokenRefreshCallbackContext = callbackContext;
-
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- String currentToken = FirebaseInstanceId.getInstance().getToken();
-
- if (currentToken != null) {
- FirebasePlugin.sendToken(currentToken);
- }
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- public static void sendNotification(Bundle bundle) {
- if (!FirebasePlugin.hasNotificationsCallback()) {
- if (FirebasePlugin.notificationStack == null) {
- FirebasePlugin.notificationStack = new ArrayList<Bundle>();
- }
- notificationStack.add(bundle);
- return;
- }
- final CallbackContext callbackContext = FirebasePlugin.notificationCallbackContext;
- if (callbackContext != null && bundle != null) {
- JSONObject json = new JSONObject();
- Set<String> keys = bundle.keySet();
- for (String key : keys) {
- try {
- json.put(key, bundle.get(key));
- } catch (JSONException e) {
- callbackContext.error(e.getMessage());
- return;
- }
- }
-
- PluginResult pluginresult = new PluginResult(PluginResult.Status.OK, json);
- pluginresult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginresult);
- }
- }
-
- public static void sendToken(String token) {
- if (FirebasePlugin.tokenRefreshCallbackContext == null) {
- return;
- }
- final CallbackContext callbackContext = FirebasePlugin.tokenRefreshCallbackContext;
- if (callbackContext != null && token != null) {
- PluginResult pluginresult = new PluginResult(PluginResult.Status.OK, token);
- pluginresult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginresult);
- }
- }
-
- public static boolean inBackground() {
- return FirebasePlugin.inBackground;
- }
-
- public static boolean hasNotificationsCallback() {
- return FirebasePlugin.notificationCallbackContext != null;
- }
-
- @Override
- public void onNewIntent(Intent intent) {
- super.onNewIntent(intent);
- final Bundle data = intent.getExtras();
- if (data != null && data.containsKey("google.message_id")) {
- data.putBoolean("tap", true);
- FirebasePlugin.sendNotification(data);
- }
- }
-
- // DEPRECTED - alias of getToken
- private void getInstanceId(final CallbackContext callbackContext) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- String token = FirebaseInstanceId.getInstance().getToken();
- callbackContext.success(token);
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void getToken(final CallbackContext callbackContext) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- String token = FirebaseInstanceId.getInstance().getToken();
- callbackContext.success(token);
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void hasPermission(final CallbackContext callbackContext) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- Context context = cordova.getActivity();
- NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context);
- boolean areNotificationsEnabled = notificationManagerCompat.areNotificationsEnabled();
- JSONObject object = new JSONObject();
- object.put("isEnabled", areNotificationsEnabled);
- callbackContext.success(object);
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void setBadgeNumber(final CallbackContext callbackContext, final int number) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- Context context = cordova.getActivity();
- SharedPreferences.Editor editor = context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit();
- editor.putInt(KEY, number);
- editor.apply();
- ShortcutBadger.applyCount(context, number);
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void getBadgeNumber(final CallbackContext callbackContext) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- Context context = cordova.getActivity();
- SharedPreferences settings = context.getSharedPreferences(KEY, Context.MODE_PRIVATE);
- int number = settings.getInt(KEY, 0);
- callbackContext.success(number);
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void subscribe(final CallbackContext callbackContext, final String topic) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- FirebaseMessaging.getInstance().subscribeToTopic(topic);
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void unsubscribe(final CallbackContext callbackContext, final String topic) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- FirebaseMessaging.getInstance().unsubscribeFromTopic(topic);
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void unregister(final CallbackContext callbackContext) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- FirebaseInstanceId.getInstance().deleteInstanceId();
- String currentToken = FirebaseInstanceId.getInstance().getToken();
- if (currentToken != null) {
- FirebasePlugin.sendToken(currentToken);
- }
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void logEvent(final CallbackContext callbackContext, final String name, final JSONObject params) throws JSONException {
- final Bundle bundle = new Bundle();
- Iterator iter = params.keys();
- while (iter.hasNext()) {
- String key = (String) iter.next();
- Object value = params.get(key);
-
- if (value instanceof Integer || value instanceof Double) {
- bundle.putFloat(key, ((Number) value).floatValue());
- } else {
- bundle.putString(key, value.toString());
- }
- }
-
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- mFirebaseAnalytics.logEvent(name, bundle);
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void logError(final CallbackContext callbackContext, final String message) throws JSONException {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- FirebaseCrash.report(new Exception(message));
- callbackContext.success(1);
- } catch (Exception e) {
- FirebaseCrash.log(e.getMessage());
- e.printStackTrace();
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void setScreenName(final CallbackContext callbackContext, final String name) {
- // This must be called on the main thread
- cordova.getActivity().runOnUiThread(new Runnable() {
- public void run() {
- try {
- mFirebaseAnalytics.setCurrentScreen(cordova.getActivity(), name, null);
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void setUserId(final CallbackContext callbackContext, final String id) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- mFirebaseAnalytics.setUserId(id);
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void setUserProperty(final CallbackContext callbackContext, final String name, final String value) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- mFirebaseAnalytics.setUserProperty(name, value);
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void activateFetched(final CallbackContext callbackContext) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- final boolean activated = FirebaseRemoteConfig.getInstance().activateFetched();
- callbackContext.success(String.valueOf(activated));
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void fetch(CallbackContext callbackContext) {
- fetch(callbackContext, FirebaseRemoteConfig.getInstance().fetch());
- }
-
- private void fetch(CallbackContext callbackContext, long cacheExpirationSeconds) {
- fetch(callbackContext, FirebaseRemoteConfig.getInstance().fetch(cacheExpirationSeconds));
- }
-
- private void fetch(final CallbackContext callbackContext, final Task<Void> task) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- task.addOnCompleteListener(new OnCompleteListener<Void>() {
- @Override
- public void onComplete(Task<Void> task) {
- callbackContext.success();
- }
- }).addOnFailureListener(new OnFailureListener() {
- @Override
- public void onFailure(Exception e) {
- callbackContext.error(e.getMessage());
- }
- });
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void getByteArray(final CallbackContext callbackContext, final String key, final String namespace) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- byte[] bytes = namespace == null ? FirebaseRemoteConfig.getInstance().getByteArray(key)
- : FirebaseRemoteConfig.getInstance().getByteArray(key, namespace);
- JSONObject object = new JSONObject();
- object.put("base64", Base64.encodeToString(bytes, Base64.DEFAULT));
- object.put("array", new JSONArray(bytes));
- callbackContext.success(object);
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void getValue(final CallbackContext callbackContext, final String key, final String namespace) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- FirebaseRemoteConfigValue value = namespace == null ? FirebaseRemoteConfig.getInstance().getValue(key)
- : FirebaseRemoteConfig.getInstance().getValue(key, namespace);
- callbackContext.success(value.asString());
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void getInfo(final CallbackContext callbackContext) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- FirebaseRemoteConfigInfo remoteConfigInfo = FirebaseRemoteConfig.getInstance().getInfo();
- JSONObject info = new JSONObject();
-
- JSONObject settings = new JSONObject();
- settings.put("developerModeEnabled", remoteConfigInfo.getConfigSettings().isDeveloperModeEnabled());
- info.put("configSettings", settings);
-
- info.put("fetchTimeMillis", remoteConfigInfo.getFetchTimeMillis());
- info.put("lastFetchStatus", remoteConfigInfo.getLastFetchStatus());
-
- callbackContext.success(info);
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void setConfigSettings(final CallbackContext callbackContext, final JSONObject config) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- boolean devMode = config.getBoolean("developerModeEnabled");
- FirebaseRemoteConfigSettings.Builder settings = new FirebaseRemoteConfigSettings.Builder()
- .setDeveloperModeEnabled(devMode);
- FirebaseRemoteConfig.getInstance().setConfigSettings(settings.build());
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private void setDefaults(final CallbackContext callbackContext, final JSONObject defaults, final String namespace) {
- cordova.getThreadPool().execute(new Runnable() {
- public void run() {
- try {
- if (namespace == null)
- FirebaseRemoteConfig.getInstance().setDefaults(defaultsToMap(defaults));
- else
- FirebaseRemoteConfig.getInstance().setDefaults(defaultsToMap(defaults), namespace);
- callbackContext.success();
- } catch (Exception e) {
- callbackContext.error(e.getMessage());
- }
- }
- });
- }
-
- private static Map<String, Object> defaultsToMap(JSONObject object) throws JSONException {
- final Map<String, Object> map = new HashMap<String, Object>();
-
- for (Iterator<String> keys = object.keys(); keys.hasNext(); ) {
- String key = keys.next();
- Object value = object.get(key);
-
- if (value instanceof Integer) {
- //setDefaults() should take Longs
- value = new Long((Integer) value);
- } else if (value instanceof JSONArray) {
- JSONArray array = (JSONArray) value;
- if (array.length() == 1 && array.get(0) instanceof String) {
- //parse byte[] as Base64 String
- value = Base64.decode(array.getString(0), Base64.DEFAULT);
- } else {
- //parse byte[] as numeric array
- byte[] bytes = new byte[array.length()];
- for (int i = 0; i < array.length(); i++)
- bytes[i] = (byte) array.getInt(i);
- value = bytes;
- }
- }
-
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePluginInstanceIDService.java b/StoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePluginInstanceIDService.java
deleted file mode 100755
index 96140f02..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePluginInstanceIDService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.apache.cordova.firebase;
-
-import android.util.Log;
-
-import com.google.firebase.iid.FirebaseInstanceId;
-import com.google.firebase.iid.FirebaseInstanceIdService;
-
-
-public class FirebasePluginInstanceIDService extends FirebaseInstanceIdService {
-
- private static final String TAG = "FirebasePlugin";
-
- /**
- * Called if InstanceID token is updated. This may occur if the security of
- * the previous token had been compromised. Note that this is called when the InstanceID token
- * is initially generated so this is where you would retrieve the token.
- */
- @Override
- public void onTokenRefresh() {
- // Get updated InstanceID token.
- String refreshedToken = FirebaseInstanceId.getInstance().getToken();
- Log.d(TAG, "Refreshed token: " + refreshedToken);
-
- FirebasePlugin.sendToken(refreshedToken);
- }
-}
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePluginMessagingService.java b/StoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePluginMessagingService.java
deleted file mode 100755
index a42ce60e..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/android/FirebasePluginMessagingService.java
+++ /dev/null
@@ -1,127 +0,0 @@
-package org.apache.cordova.firebase;
-
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.Intent;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.os.Bundle;
-import android.support.v4.app.NotificationCompat;
-import android.util.Log;
-import android.app.Notification;
-import android.text.TextUtils;
-
-import com.google.firebase.messaging.FirebaseMessagingService;
-import com.google.firebase.messaging.RemoteMessage;
-
-import java.util.Map;
-import java.util.Random;
-
-public class FirebasePluginMessagingService extends FirebaseMessagingService {
-
- private static final String TAG = "FirebasePlugin";
-
- /**
- * Called when message is received.
- *
- * @param remoteMessage Object representing the message received from Firebase Cloud Messaging.
- */
- @Override
- public void onMessageReceived(RemoteMessage remoteMessage) {
- // [START_EXCLUDE]
- // There are two types of messages data messages and notification messages. Data messages are handled
- // here in onMessageReceived whether the app is in the foreground or background. Data messages are the type
- // traditionally used with GCM. Notification messages are only received here in onMessageReceived when the app
- // is in the foreground. When the app is in the background an automatically generated notification is displayed.
- // When the user taps on the notification they are returned to the app. Messages containing both notification
- // and data payloads are treated as notification messages. The Firebase console always sends notification
- // messages. For more see: https://firebase.google.com/docs/cloud-messaging/concept-options
- // [END_EXCLUDE]
-
- // TODO(developer): Handle FCM messages here.
- // Not getting messages here? See why this may be: https://goo.gl/39bRNJ
- String title;
- String text;
- String id;
- if (remoteMessage.getNotification() != null) {
- title = remoteMessage.getNotification().getTitle();
- text = remoteMessage.getNotification().getBody();
- id = remoteMessage.getMessageId();
- } else {
- title = remoteMessage.getData().get("title");
- text = remoteMessage.getData().get("text");
- id = remoteMessage.getData().get("id");
- }
-
- if(TextUtils.isEmpty(id)){
- Random rand = new Random();
- int n = rand.nextInt(50) + 1;
- id = Integer.toString(n);
- }
-
- Log.d(TAG, "From: " + remoteMessage.getFrom());
- Log.d(TAG, "Notification Message id: " + id);
- Log.d(TAG, "Notification Message Title: " + title);
- Log.d(TAG, "Notification Message Body/Text: " + text);
-
- // TODO: Add option to developer to configure if show notification when app on foreground
- if (!TextUtils.isEmpty(text) || !TextUtils.isEmpty(title) || (!remoteMessage.getData().isEmpty())) {
- boolean showNotification = (FirebasePlugin.inBackground() || !FirebasePlugin.hasNotificationsCallback()) && (!TextUtils.isEmpty(text) || !TextUtils.isEmpty(title));
- sendNotification(id, title, text, remoteMessage.getData(), showNotification);
- }
- }
-
- private void sendNotification(String id, String title, String messageBody, Map<String, String> data, boolean showNotification) {
- Bundle bundle = new Bundle();
- for (String key : data.keySet()) {
- bundle.putString(key, data.get(key));
- }
- if (showNotification) {
- Intent intent = new Intent(this, OnNotificationOpenReceiver.class);
- intent.putExtras(bundle);
- PendingIntent pendingIntent = PendingIntent.getBroadcast(this, id.hashCode(), intent,
- PendingIntent.FLAG_UPDATE_CURRENT);
-
- Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
- NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
- .setContentTitle(title)
- .setContentText(messageBody)
- .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
- .setStyle(new NotificationCompat.BigTextStyle().bigText(messageBody))
- .setAutoCancel(true)
- .setSound(defaultSoundUri)
- .setContentIntent(pendingIntent);
-
- int resID = getResources().getIdentifier("notification_icon", "drawable", getPackageName());
- if (resID != 0) {
- notificationBuilder.setSmallIcon(resID);
- } else {
- notificationBuilder.setSmallIcon(getApplicationInfo().icon);
- }
-
- if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M)
- {
- int accentID = getResources().getIdentifier("accent", "color", getPackageName());
- notificationBuilder.setColor(getResources().getColor(accentID, null));
- }
-
- Notification notification = notificationBuilder.build();
- if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){
- int iconID = android.R.id.icon;
- int notiID = getResources().getIdentifier("notification_big", "drawable", getPackageName());
- if (notification.contentView != null) {
- notification.contentView.setImageViewResource(iconID, notiID);
- }
- }
- NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
-
- notificationManager.notify(id.hashCode(), notification);
- } else {
- bundle.putBoolean("tap", false);
- bundle.putString("title", title);
- bundle.putString("body", messageBody);
- FirebasePlugin.sendNotification(bundle);
- }
- }
-}
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/android/OnNotificationOpenReceiver.java b/StoneIsland/plugins/cordova-plugin-firebase/src/android/OnNotificationOpenReceiver.java
deleted file mode 100644
index a7f63757..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/android/OnNotificationOpenReceiver.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.apache.cordova.firebase;
-
-import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.os.Bundle;
-
-public class OnNotificationOpenReceiver extends BroadcastReceiver {
-
- @Override
- public void onReceive(Context context, Intent intent) {
- PackageManager pm = context.getPackageManager();
- Intent launchIntent = pm.getLaunchIntentForPackage(context.getPackageName());
-
- launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
- Bundle data = intent.getExtras();
- data.putBoolean("tap", true);
- FirebasePlugin.sendNotification(data);
- launchIntent.putExtras(data);
- context.startActivity(launchIntent);
- }
-}
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/android/build-extras.gradle b/StoneIsland/plugins/cordova-plugin-firebase/src/android/build-extras.gradle
deleted file mode 100755
index 67b387f5..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/android/build-extras.gradle
+++ /dev/null
@@ -1 +0,0 @@
-apply plugin: 'com.google.gms.google-services' \ No newline at end of file
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/android/build.gradle b/StoneIsland/plugins/cordova-plugin-firebase/src/android/build.gradle
deleted file mode 100755
index d5cb4edd..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/android/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-buildscript {
- repositories {
- mavenCentral()
- }
- dependencies {
- classpath 'com.google.gms:google-services:3.0.0'
- }
-}
-repositories {
- mavenCentral()
-}
-dependencies {
- compile 'me.leolin:ShortcutBadger:1.1.4@aar'
- compile 'com.google.firebase:firebase-crash:+'
-}
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/android/colors.xml b/StoneIsland/plugins/cordova-plugin-firebase/src/android/colors.xml
deleted file mode 100644
index 6f1665a5..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/android/colors.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <color name="primary">#FFFFFF00</color>
- <color name="primary_dark">#FF220022</color>
- <color name="accent">#FF00FFFF</color>
-</resources> \ No newline at end of file
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/android/google-services.json b/StoneIsland/plugins/cordova-plugin-firebase/src/android/google-services.json
deleted file mode 100644
index e69de29b..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/android/google-services.json
+++ /dev/null
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/AppDelegate+FirebasePlugin.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/AppDelegate+FirebasePlugin.h
deleted file mode 100755
index 210cbb65..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/AppDelegate+FirebasePlugin.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#import "AppDelegate.h"
-
-@interface AppDelegate (FirebasePlugin)
-@property (nonatomic, strong) NSNumber *applicationInBackground;
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/AppDelegate+FirebasePlugin.m b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/AppDelegate+FirebasePlugin.m
deleted file mode 100755
index c4c45778..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/AppDelegate+FirebasePlugin.m
+++ /dev/null
@@ -1,132 +0,0 @@
-#import "AppDelegate+FirebasePlugin.h"
-#import "FirebasePlugin.h"
-#import "Firebase.h"
-#import <objc/runtime.h>
-
-#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
-@import UserNotifications;
-#endif
-
-// Implement UNUserNotificationCenterDelegate to receive display notification via APNS for devices
-// running iOS 10 and above. Implement FIRMessagingDelegate to receive data message via FCM for
-// devices running iOS 10 and above.
-#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
-@interface AppDelegate () <UNUserNotificationCenterDelegate, FIRMessagingDelegate>
-@end
-#endif
-
-#define kApplicationInBackgroundKey @"applicationInBackground"
-
-@implementation AppDelegate (FirebasePlugin)
-
-+ (void)load {
- Method original = class_getInstanceMethod(self, @selector(application:didFinishLaunchingWithOptions:));
- Method swizzled = class_getInstanceMethod(self, @selector(application:swizzledDidFinishLaunchingWithOptions:));
- method_exchangeImplementations(original, swizzled);
-}
-
-- (void)setApplicationInBackground:(NSNumber *)applicationInBackground {
- objc_setAssociatedObject(self, kApplicationInBackgroundKey, applicationInBackground, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-}
-
-- (NSNumber *)applicationInBackground {
- return objc_getAssociatedObject(self, kApplicationInBackgroundKey);
-}
-
-- (BOOL)application:(UIApplication *)application swizzledDidFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- [self application:application swizzledDidFinishLaunchingWithOptions:launchOptions];
-
- if(![FIRApp defaultApp]) {
- [FIRApp configure];
- }
-
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tokenRefreshNotification:)
- name:kFIRInstanceIDTokenRefreshNotification object:nil];
-
- self.applicationInBackground = @(YES);
-
- return YES;
-}
-
-- (void)applicationDidBecomeActive:(UIApplication *)application {
- [self connectToFcm];
- self.applicationInBackground = @(NO);
-}
-
-- (void)applicationDidEnterBackground:(UIApplication *)application {
- [[FIRMessaging messaging] disconnect];
- self.applicationInBackground = @(YES);
- NSLog(@"Disconnected from FCM");
-}
-
-- (void)tokenRefreshNotification:(NSNotification *)notification {
- // Note that this callback will be fired everytime a new token is generated, including the first
- // time. So if you need to retrieve the token as soon as it is available this is where that
- // should be done.
- NSString *refreshedToken = [[FIRInstanceID instanceID] token];
- NSLog(@"InstanceID token: %@", refreshedToken);
-
- // Connect to FCM since connection may have failed when attempted before having a token.
- [self connectToFcm];
-
- [FirebasePlugin.firebasePlugin sendToken:refreshedToken];
-}
-
-- (void)connectToFcm {
- [[FIRMessaging messaging] connectWithCompletion:^(NSError * _Nullable error) {
- if (error != nil) {
- NSLog(@"Unable to connect to FCM. %@", error);
- } else {
- NSLog(@"Connected to FCM.");
- NSString *refreshedToken = [[FIRInstanceID instanceID] token];
- NSLog(@"InstanceID token: %@", refreshedToken);
- }
- }];
-}
-
-- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
- NSDictionary *mutableUserInfo = [userInfo mutableCopy];
-
- [mutableUserInfo setValue:self.applicationInBackground forKey:@"tap"];
-
- // Pring full message.
- NSLog(@"%@", mutableUserInfo);
-
- [FirebasePlugin.firebasePlugin sendNotification:mutableUserInfo];
-}
-
-- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
- fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
-
- NSDictionary *mutableUserInfo = [userInfo mutableCopy];
-
- [mutableUserInfo setValue:self.applicationInBackground forKey:@"tap"];
-
- // Pring full message.
- NSLog(@"%@", mutableUserInfo);
-
- [FirebasePlugin.firebasePlugin sendNotification:mutableUserInfo];
-}
-
-#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
-- (void)userNotificationCenter:(UNUserNotificationCenter *)center
- willPresentNotification:(UNNotification *)notification
- withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
- NSDictionary *mutableUserInfo = [notification.request.content.userInfo mutableCopy];
-
- [mutableUserInfo setValue:self.applicationInBackground forKey:@"tap"];
-
- // Pring full message.
- NSLog(@"%@", mutableUserInfo);
-
- [FirebasePlugin.firebasePlugin sendNotification:mutableUserInfo];
-}
-
-// Receive data message on iOS 10 devices.
-- (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
- // Print full message
- NSLog(@"%@", [remoteMessage appData]);
-}
-#endif
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics
deleted file mode 100755
index 61f61cd1..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h
deleted file mode 100755
index e3ff4c12..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#import "FIRAnalytics.h"
-
-/**
- * Provides App Delegate handlers to be used in your App Delegate.
- *
- * To save time integrating Firebase Analytics in an application, Firebase Analytics does not
- * require delegation implementation from the AppDelegate. Instead this is automatically done by
- * Firebase Analytics. Should you choose instead to delegate manually, you can turn off the App
- * Delegate Proxy by adding FirebaseAppDelegateProxyEnabled into your app's Info.plist and setting
- * it to NO, and adding the methods in this category to corresponding delegation handlers.
- *
- * To handle Universal Links, you must return YES in
- * [UIApplicationDelegate application:didFinishLaunchingWithOptions:].
- */
-@interface FIRAnalytics (AppDelegate)
-
-/**
- * Handles events related to a URL session that are waiting to be processed.
- *
- * For optimal use of Firebase Analytics, call this method from the
- * [UIApplicationDelegate application:handleEventsForBackgroundURLSession:completionHandler]
- * method of the app delegate in your app.
- *
- * @param identifier The identifier of the URL session requiring attention.
- * @param completionHandler The completion handler to call when you finish processing the events.
- * Calling this completion handler lets the system know that your app's user interface is
- * updated and a new snapshot can be taken.
- */
-+ (void)handleEventsForBackgroundURLSession:(NSString *)identifier
- completionHandler:(void (^)(void))completionHandler;
-
-/**
- * Handles the event when the app is launched by a URL.
- *
- * Call this method from [UIApplicationDelegate application:openURL:options:] (on iOS 9.0 and
- * above), or [UIApplicationDelegate application:openURL:sourceApplication:annotation:] (on iOS 8.x
- * and below) in your app.
- *
- * @param url The URL resource to open. This resource can be a network resource or a file.
- */
-+ (void)handleOpenURL:(NSURL *)url;
-
-/**
- * Handles the event when the app receives data associated with user activity that includes a
- * Universal Link (on iOS 9.0 and above).
- *
- * Call this method from [UIApplication continueUserActivity:restorationHandler:] in your app
- * delegate (on iOS 9.0 and above).
- *
- * @param userActivity The activity object containing the data associated with the task the user
- * was performing.
- */
-+ (void)handleUserActivity:(id)userActivity;
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h
deleted file mode 100755
index f5023f57..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h
+++ /dev/null
@@ -1,102 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#import "FIREventNames.h"
-#import "FIRParameterNames.h"
-#import "FIRUserPropertyNames.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// The top level Firebase Analytics singleton that provides methods for logging events and setting
-/// user properties. See <a href="http://goo.gl/gz8SLz">the developer guides</a> for general
-/// information on using Firebase Analytics in your apps.
-@interface FIRAnalytics : NSObject
-
-/// Logs an app event. The event can have up to 25 parameters. Events with the same name must have
-/// the same parameters. Up to 500 event names are supported. Using predefined events and/or
-/// parameters is recommended for optimal reporting.
-///
-/// The following event names are reserved and cannot be used:
-/// <ul>
-/// <li>app_clear_data</li>
-/// <li>app_remove</li>
-/// <li>app_update</li>
-/// <li>error</li>
-/// <li>first_open</li>
-/// <li>in_app_purchase</li>
-/// <li>notification_dismiss</li>
-/// <li>notification_foreground</li>
-/// <li>notification_open</li>
-/// <li>notification_receive</li>
-/// <li>os_update</li>
-/// <li>session_start</li>
-/// <li>user_engagement</li>
-/// </ul>
-///
-/// @param name The name of the event. Should contain 1 to 40 alphanumeric characters or
-/// underscores. The name must start with an alphabetic character. Some event names are
-/// reserved. See FIREventNames.h for the list of reserved event names. The "firebase_" prefix
-/// is reserved and should not be used. Note that event names are case-sensitive and that
-/// logging two events whose names differ only in case will result in two distinct events.
-/// @param parameters The dictionary of event parameters. Passing nil indicates that the event has
-/// no parameters. Parameter names can be up to 40 characters long and must start with an
-/// alphabetic character and contain only alphanumeric characters and underscores. Only NSString
-/// and NSNumber (signed 64-bit integer and 64-bit floating-point number) parameter types are
-/// supported. NSString parameter values can be up to 100 characters long. The "firebase_"
-/// prefix is reserved and should not be used for parameter names.
-+ (void)logEventWithName:(NSString *)name
- parameters:(nullable NSDictionary<NSString *, NSObject *> *)parameters;
-
-/// Sets a user property to a given value. Up to 25 user property names are supported. Once set,
-/// user property values persist throughout the app lifecycle and across sessions.
-///
-/// The following user property names are reserved and cannot be used:
-/// <ul>
-/// <li>first_open_time</li>
-/// <li>last_deep_link_referrer</li>
-/// <li>user_id</li>
-/// </ul>
-///
-/// @param value The value of the user property. Values can be up to 36 characters long. Setting the
-/// value to nil removes the user property.
-/// @param name The name of the user property to set. Should contain 1 to 24 alphanumeric characters
-/// or underscores and must start with an alphabetic character. The "firebase_" prefix is
-/// reserved and should not be used for user property names.
-+ (void)setUserPropertyString:(nullable NSString *)value forName:(NSString *)name;
-
-/// Sets the user ID property. This feature must be used in accordance with
-/// <a href="https://www.google.com/policies/privacy">Google's Privacy Policy</a>
-///
-/// @param userID The user ID to ascribe to the user of this app on this device, which must be
-/// non-empty and no more than 36 characters long. Setting userID to nil removes the user ID.
-+ (void)setUserID:(nullable NSString *)userID;
-
-/// Sets the current screen name, which specifies the current visual context in your app. This helps
-/// identify the areas in your app where users spend their time and how they interact with your app.
-///
-/// Note that screen reporting is enabled automatically and records the class name of the current
-/// UIViewController for you without requiring you to call this method. If you implement
-/// viewDidAppear in your UIViewController but do not call [super viewDidAppear:], that screen class
-/// will not be automatically tracked. The class name can optionally be overridden by calling this
-/// method in the viewDidAppear callback of your UIViewController and specifying the
-/// screenClassOverride parameter.
-///
-/// If your app does not use a distinct UIViewController for each screen, you should call this
-/// method and specify a distinct screenName each time a new screen is presented to the user.
-///
-/// The screen name and screen class remain in effect until the current UIViewController changes or
-/// a new call to setScreenName:screenClass: is made.
-///
-/// @param screenName The name of the current screen. Should contain 1 to 100 characters. Set to nil
-/// to clear the current screen name.
-/// @param screenClassOverride The name of the screen class. Should contain 1 to 100 characters. By
-/// default this is the class name of the current UIViewController. Set to nil to revert to the
-/// default class name.
-+ (void)setScreenName:(nullable NSString *)screenName
- screenClass:(nullable NSString *)screenClassOverride;
-
-/// The unique ID for this instance of the application.
-+ (NSString *)appInstanceID;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h
deleted file mode 100755
index dc227a4c..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h
+++ /dev/null
@@ -1 +0,0 @@
-#import <FirebaseCore/FIRAnalyticsConfiguration.h>
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRApp.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRApp.h
deleted file mode 100755
index de24da17..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRApp.h
+++ /dev/null
@@ -1 +0,0 @@
-#import <FirebaseCore/FIRApp.h>
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRConfiguration.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRConfiguration.h
deleted file mode 100755
index be2ff7bf..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRConfiguration.h
+++ /dev/null
@@ -1 +0,0 @@
-#import <FirebaseCore/FIRConfiguration.h>
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h
deleted file mode 100755
index 3b40eecf..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h
+++ /dev/null
@@ -1,336 +0,0 @@
-/// @file FIREventNames.h
-///
-/// Predefined event names.
-///
-/// An Event is an important occurrence in your app that you want to measure. You can report up to
-/// 500 different types of Events per app and you can associate up to 25 unique parameters with each
-/// Event type. Some common events are suggested below, but you may also choose to specify custom
-/// Event types that are associated with your specific app. Each event type is identified by a
-/// unique name. Event names can be up to 40 characters long, may only contain alphanumeric
-/// characters and underscores ("_"), and must start with an alphabetic character. The "firebase_"
-/// prefix is reserved and should not be used.
-
-/// Add Payment Info event. This event signifies that a user has submitted their payment information
-/// to your app.
-static NSString *const kFIREventAddPaymentInfo = @"add_payment_info";
-
-/// E-Commerce Add To Cart event. This event signifies that an item was added to a cart for
-/// purchase. Add this event to a funnel with kFIREventEcommercePurchase to gauge the effectiveness
-/// of your checkout process. Note: If you supply the @c kFIRParameterValue parameter, you must
-/// also supply the @c kFIRParameterCurrency parameter so that revenue metrics can be computed
-/// accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterQuantity (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// <li>@c kFIRParameterItemLocationID (NSString) (optional)</li>
-/// <li>@c kFIRParameterPrice (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventAddToCart = @"add_to_cart";
-
-/// E-Commerce Add To Wishlist event. This event signifies that an item was added to a wishlist.
-/// Use this event to identify popular gift items in your app. Note: If you supply the
-/// @c kFIRParameterValue parameter, you must also supply the @c kFIRParameterCurrency
-/// parameter so that revenue metrics can be computed accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterQuantity (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// <li>@c kFIRParameterItemLocationID (NSString) (optional)</li>
-/// <li>@c kFIRParameterPrice (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// </ul>
-static NSString *const kFIREventAddToWishlist = @"add_to_wishlist";
-
-/// App Open event. By logging this event when an App is moved to the foreground, developers can
-/// understand how often users leave and return during the course of a Session. Although Sessions
-/// are automatically reported, this event can provide further clarification around the continuous
-/// engagement of app-users.
-static NSString *const kFIREventAppOpen = @"app_open";
-
-/// E-Commerce Begin Checkout event. This event signifies that a user has begun the process of
-/// checking out. Add this event to a funnel with your kFIREventEcommercePurchase event to gauge the
-/// effectiveness of your checkout process. Note: If you supply the @c kFIRParameterValue
-/// parameter, you must also supply the @c kFIRParameterCurrency parameter so that revenue
-/// metrics can be computed accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterTransactionID (NSString) (optional)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional)
-/// for travel bookings</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterTravelClass (NSString) (optional) for travel bookings</li>
-/// </ul>
-static NSString *const kFIREventBeginCheckout = @"begin_checkout";
-
-/// Campaign Detail event. Log this event to supply the referral details of a re-engagement
-/// campaign. Note: you must supply at least one of the required parameters kFIRParameterSource,
-/// kFIRParameterMedium or kFIRParameterCampaign. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterSource (NSString)</li>
-/// <li>@c kFIRParameterMedium (NSString)</li>
-/// <li>@c kFIRParameterCampaign (NSString)</li>
-/// <li>@c kFIRParameterTerm (NSString) (optional)</li>
-/// <li>@c kFIRParameterContent (NSString) (optional)</li>
-/// <li>@c kFIRParameterAdNetworkClickID (NSString) (optional)</li>
-/// <li>@c kFIRParameterCP1 (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventCampaignDetails = @"campaign_details";
-
-/// Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log
-/// this along with @c kFIREventSpendVirtualCurrency to better understand your virtual economy.
-/// Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterVirtualCurrencyName (NSString)</li>
-/// <li>@c kFIRParameterValue (signed 64-bit integer or double as NSNumber)</li>
-/// </ul>
-static NSString *const kFIREventEarnVirtualCurrency = @"earn_virtual_currency";
-
-/// E-Commerce Purchase event. This event signifies that an item was purchased by a user. Note:
-/// This is different from the in-app purchase event, which is reported automatically for App
-/// Store-based apps. Note: If you supply the @c kFIRParameterValue parameter, you must also
-/// supply the @c kFIRParameterCurrency parameter so that revenue metrics can be computed
-/// accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterTransactionID (NSString) (optional)</li>
-/// <li>@c kFIRParameterTax (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterShipping (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCoupon (NSString) (optional)</li>
-/// <li>@c kFIRParameterLocation (NSString) (optional)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional)
-/// for travel bookings</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterTravelClass (NSString) (optional) for travel bookings</li>
-/// </ul>
-static NSString *const kFIREventEcommercePurchase = @"ecommerce_purchase";
-
-/// Generate Lead event. Log this event when a lead has been generated in the app to understand the
-/// efficacy of your install and re-engagement campaigns. Note: If you supply the
-/// @c kFIRParameterValue parameter, you must also supply the @c kFIRParameterCurrency
-/// parameter so that revenue metrics can be computed accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// </ul>
-static NSString *const kFIREventGenerateLead = @"generate_lead";
-
-/// Join Group event. Log this event when a user joins a group such as a guild, team or family. Use
-/// this event to analyze how popular certain groups or social features are in your app. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterGroupID (NSString)</li>
-/// </ul>
-static NSString *const kFIREventJoinGroup = @"join_group";
-
-/// Level Up event. This event signifies that a player has leveled up in your gaming app. It can
-/// help you gauge the level distribution of your userbase and help you identify certain levels that
-/// are difficult to pass. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterLevel (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterCharacter (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventLevelUp = @"level_up";
-
-/// Login event. Apps with a login feature can report this event to signify that a user has logged
-/// in.
-static NSString *const kFIREventLogin = @"login";
-
-/// Post Score event. Log this event when the user posts a score in your gaming app. This event can
-/// help you understand how users are actually performing in your game and it can help you correlate
-/// high scores with certain audiences or behaviors. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterScore (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterLevel (signed 64-bit integer as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCharacter (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventPostScore = @"post_score";
-
-/// Present Offer event. This event signifies that the app has presented a purchase offer to a user.
-/// Add this event to a funnel with the kFIREventAddToCart and kFIREventEcommercePurchase to gauge
-/// your conversion process. Note: If you supply the @c kFIRParameterValue parameter, you must
-/// also supply the @c kFIRParameterCurrency parameter so that revenue metrics can be computed
-/// accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterQuantity (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// <li>@c kFIRParameterItemLocationID (NSString) (optional)</li>
-/// <li>@c kFIRParameterPrice (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// </ul>
-static NSString *const kFIREventPresentOffer = @"present_offer";
-
-/// E-Commerce Purchase Refund event. This event signifies that an item purchase was refunded.
-/// Note: If you supply the @c kFIRParameterValue parameter, you must also supply the
-/// @c kFIRParameterCurrency parameter so that revenue metrics can be computed accurately.
-/// Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterTransactionID (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventPurchaseRefund = @"purchase_refund";
-
-/// Search event. Apps that support search features can use this event to contextualize search
-/// operations by supplying the appropriate, corresponding parameters. This event can help you
-/// identify the most popular content in your app. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterSearchTerm (NSString)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional)
-/// for travel bookings</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterTravelClass (NSString) (optional) for travel bookings</li>
-/// </ul>
-static NSString *const kFIREventSearch = @"search";
-
-/// Select Content event. This general purpose event signifies that a user has selected some content
-/// of a certain type in an app. The content can be any object in your app. This event can help you
-/// identify popular content and categories of content in your app. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterContentType (NSString)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// </ul>
-static NSString *const kFIREventSelectContent = @"select_content";
-
-/// Share event. Apps with social features can log the Share event to identify the most viral
-/// content. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterContentType (NSString)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// </ul>
-static NSString *const kFIREventShare = @"share";
-
-/// Sign Up event. This event indicates that a user has signed up for an account in your app. The
-/// parameter signifies the method by which the user signed up. Use this event to understand the
-/// different behaviors between logged in and logged out users. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterSignUpMethod (NSString)</li>
-/// </ul>
-static NSString *const kFIREventSignUp = @"sign_up";
-
-/// Spend Virtual Currency event. This event tracks the sale of virtual goods in your app and can
-/// help you identify which virtual goods are the most popular objects of purchase. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterVirtualCurrencyName (NSString)</li>
-/// <li>@c kFIRParameterValue (signed 64-bit integer or double as NSNumber)</li>
-/// </ul>
-static NSString *const kFIREventSpendVirtualCurrency = @"spend_virtual_currency";
-
-/// Tutorial Begin event. This event signifies the start of the on-boarding process in your app. Use
-/// this in a funnel with kFIREventTutorialComplete to understand how many users complete this
-/// process and move on to the full app experience.
-static NSString *const kFIREventTutorialBegin = @"tutorial_begin";
-
-/// Tutorial End event. Use this event to signify the user's completion of your app's on-boarding
-/// process. Add this to a funnel with kFIREventTutorialBegin to gauge the completion rate of your
-/// on-boarding process.
-static NSString *const kFIREventTutorialComplete = @"tutorial_complete";
-
-/// Unlock Achievement event. Log this event when the user has unlocked an achievement in your
-/// game. Since achievements generally represent the breadth of a gaming experience, this event can
-/// help you understand how many users are experiencing all that your game has to offer. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterAchievementID (NSString)</li>
-/// </ul>
-static NSString *const kFIREventUnlockAchievement = @"unlock_achievement";
-
-/// View Item event. This event signifies that some content was shown to the user. This content may
-/// be a product, a webpage or just a simple image or text. Use the appropriate parameters to
-/// contextualize the event. Use this event to discover the most popular items viewed in your app.
-/// Note: If you supply the @c kFIRParameterValue parameter, you must also supply the
-/// @c kFIRParameterCurrency parameter so that revenue metrics can be computed accurately.
-/// Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// <li>@c kFIRParameterItemLocationID (NSString) (optional)</li>
-/// <li>@c kFIRParameterPrice (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterQuantity (signed 64-bit integer as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterFlightNumber (NSString) (optional) for travel bookings</li>
-/// <li>@c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional)
-/// for travel bookings</li>
-/// <li>@c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for
-/// travel bookings</li>
-/// <li>@c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for
-/// travel bookings</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterSearchTerm (NSString) (optional) for travel bookings</li>
-/// <li>@c kFIRParameterTravelClass (NSString) (optional) for travel bookings</li>
-/// </ul>
-static NSString *const kFIREventViewItem = @"view_item";
-
-/// View Item List event. Log this event when the user has been presented with a list of items of a
-/// certain category. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// </ul>
-static NSString *const kFIREventViewItemList = @"view_item_list";
-
-/// View Search Results event. Log this event when the user has been presented with the results of a
-/// search. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterSearchTerm (NSString)</li>
-/// </ul>
-static NSString *const kFIREventViewSearchResults = @"view_search_results";
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIROptions.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIROptions.h
deleted file mode 100755
index 126824b0..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIROptions.h
+++ /dev/null
@@ -1 +0,0 @@
-#import <FirebaseCore/FIROptions.h>
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h
deleted file mode 100755
index a43e3473..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h
+++ /dev/null
@@ -1,369 +0,0 @@
-/// @file FIRParameterNames.h
-///
-/// Predefined event parameter names.
-///
-/// Params supply information that contextualize Events. You can associate up to 25 unique Params
-/// with each Event type. Some Params are suggested below for certain common Events, but you are
-/// not limited to these. You may supply extra Params for suggested Events or custom Params for
-/// Custom events. Param names can be up to 40 characters long, may only contain alphanumeric
-/// characters and underscores ("_"), and must start with an alphabetic character. Param values can
-/// be up to 100 characters long. The "firebase_" prefix is reserved and should not be used.
-
-/// Game achievement ID (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterAchievementID : @"10_matches_won",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterAchievementID = @"achievement_id";
-
-/// Ad Network Click ID (NSString). Used for network-specific click IDs which vary in format.
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterAdNetworkClickID : @"1234567",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterAdNetworkClickID = @"aclid";
-
-/// The individual campaign name, slogan, promo code, etc. Some networks have pre-defined macro to
-/// capture campaign information, otherwise can be populated by developer. Highly Recommended
-/// (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCampaign : @"winter_promotion",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCampaign = @"campaign";
-
-/// Character used in game (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCharacter : @"beat_boss",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCharacter = @"character";
-
-/// Campaign content (NSString).
-static NSString *const kFIRParameterContent = @"content";
-
-/// Type of content selected (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterContentType : @"news article",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterContentType = @"content_type";
-
-/// Coupon code for a purchasable item (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCoupon : @"zz123",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCoupon = @"coupon";
-
-/// Campaign custom parameter (NSString). Used as a method of capturing custom data in a campaign.
-/// Use varies by network.
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCP1 : @"custom_data",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCP1 = @"cp1";
-
-/// Purchase currency in 3-letter <a href="http://en.wikipedia.org/wiki/ISO_4217#Active_codes">
-/// ISO_4217</a> format (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCurrency : @"USD",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCurrency = @"currency";
-
-/// Flight or Travel destination (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterDestination : @"Mountain View, CA",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterDestination = @"destination";
-
-/// The arrival date, check-out date or rental end date for the item. This should be in
-/// YYYY-MM-DD format (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterEndDate : @"2015-09-14",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterEndDate = @"end_date";
-
-/// Flight number for travel events (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterFlightNumber : @"ZZ800",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterFlightNumber = @"flight_number";
-
-/// Group/clan/guild ID (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterGroupID : @"g1",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterGroupID = @"group_id";
-
-/// Item category (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemCategory : @"t-shirts",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemCategory = @"item_category";
-
-/// Item ID (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemID : @"p7654",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemID = @"item_id";
-
-/// The Google <a href="https://developers.google.com/places/place-id">Place ID</a> (NSString) that
-/// corresponds to the associated item. Alternatively, you can supply your own custom Location ID.
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemLocationID : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemLocationID = @"item_location_id";
-
-/// Item name (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemName : @"abc",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemName = @"item_name";
-
-/// Level in game (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterLevel : @(42),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterLevel = @"level";
-
-/// Location (NSString). The Google <a href="https://developers.google.com/places/place-id">Place ID
-/// </a> that corresponds to the associated event. Alternatively, you can supply your own custom
-/// Location ID.
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterLocation : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterLocation = @"location";
-
-/// The advertising or marketing medium, for example: cpc, banner, email, push. Highly recommended
-/// (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterMedium : @"email",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterMedium = @"medium";
-
-/// Number of nights staying at hotel (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterNumberOfNights : @(3),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterNumberOfNights = @"number_of_nights";
-
-/// Number of passengers traveling (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterNumberOfPassengers : @(11),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterNumberOfPassengers = @"number_of_passengers";
-
-/// Number of rooms for travel events (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterNumberOfRooms : @(2),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterNumberOfRooms = @"number_of_rooms";
-
-/// Flight or Travel origin (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterOrigin : @"Mountain View, CA",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterOrigin = @"origin";
-
-/// Purchase price (double as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterPrice : @(1.0),
-/// kFIRParameterCurrency : @"USD", // e.g. $1.00 USD
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterPrice = @"price";
-
-/// Purchase quantity (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterQuantity : @(1),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterQuantity = @"quantity";
-
-/// Score in game (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterScore : @(4200),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterScore = @"score";
-
-/// The search string/keywords used (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterSearchTerm : @"periodic table",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterSearchTerm = @"search_term";
-
-/// Shipping cost (double as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterShipping : @(9.50),
-/// kFIRParameterCurrency : @"USD", // e.g. $9.50 USD
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterShipping = @"shipping";
-
-/// Sign up method (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterSignUpMethod : @"google",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterSignUpMethod = @"sign_up_method";
-
-/// The origin of your traffic, such as an Ad network (for example, google) or partner (urban
-/// airship). Identify the advertiser, site, publication, etc. that is sending traffic to your
-/// property. Highly recommended (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterSource : @"InMobi",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterSource = @"source";
-
-/// The departure date, check-in date or rental start date for the item. This should be in
-/// YYYY-MM-DD format (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterStartDate : @"2015-09-14",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterStartDate = @"start_date";
-
-/// Tax amount (double as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterTax : @(1.0),
-/// kFIRParameterCurrency : @"USD", // e.g. $1.00 USD
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterTax = @"tax";
-
-/// If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword
-/// (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterTerm : @"game",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterTerm = @"term";
-
-/// A single ID for a ecommerce group transaction (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterTransactionID : @"ab7236dd9823",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterTransactionID = @"transaction_id";
-
-/// Travel class (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterTravelClass : @"business",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterTravelClass = @"travel_class";
-
-/// A context-specific numeric value which is accumulated automatically for each event type. This is
-/// a general purpose parameter that is useful for accumulating a key metric that pertains to an
-/// event. Examples include revenue, distance, time and points. Value should be specified as signed
-/// 64-bit integer or double as NSNumber. Notes: Values for pre-defined currency-related events
-/// (such as @c kFIREventAddToCart) should be supplied using double as NSNumber and must be
-/// accompanied by a @c kFIRParameterCurrency parameter. The valid range of accumulated values is
-/// [-9,223,372,036,854.77, 9,223,372,036,854.77].
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterValue : @(3.99),
-/// kFIRParameterCurrency : @"USD", // e.g. $3.99 USD
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterValue = @"value";
-
-/// Name of virtual currency type (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterVirtualCurrencyName : @"virtual_currency_name",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterVirtualCurrencyName = @"virtual_currency_name";
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h
deleted file mode 100755
index 54cf1c20..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/// @file FIRUserPropertyNames.h
-///
-/// Predefined user property names.
-///
-/// A UserProperty is an attribute that describes the app-user. By supplying UserProperties, you can
-/// later analyze different behaviors of various segments of your userbase. You may supply up to 25
-/// unique UserProperties per app, and you can use the name and value of your choosing for each one.
-/// UserProperty names can be up to 24 characters long, may only contain alphanumeric characters and
-/// underscores ("_"), and must start with an alphabetic character. UserProperty values can be up to
-/// 36 characters long. The "firebase_" prefix is reserved and should not be used.
-
-/// The method used to sign in. For example, "google", "facebook" or "twitter".
-static NSString *const kFIRUserPropertySignUpMethod = @"sign_up_method";
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h
deleted file mode 100755
index 3142c97b..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#import "FIRAnalyticsConfiguration.h"
-#import "FIRApp.h"
-#import "FIRConfiguration.h"
-#import "FIROptions.h"
-#import "FIRAnalytics+AppDelegate.h"
-#import "FIRAnalytics.h"
-#import "FIREventNames.h"
-#import "FIRParameterNames.h"
-#import "FIRUserPropertyNames.h"
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap
deleted file mode 100755
index c9bd66bc..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,10 +0,0 @@
-framework module FirebaseAnalytics {
- umbrella header "FirebaseAnalytics.h"
- export *
- module * { export *}
- link "sqlite3"
- link "z"
- link framework "CoreGraphics"
- link framework "Foundation"
- link framework "UIKit"
-} \ No newline at end of file
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/FirebaseCore b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/FirebaseCore
deleted file mode 100755
index 364c6d67..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/FirebaseCore
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h
deleted file mode 100755
index 667d5a4b..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#import <Foundation/Foundation.h>
-
-/**
- * This class provides configuration fields for Firebase Analytics.
- */
-@interface FIRAnalyticsConfiguration : NSObject
-
-/**
- * Returns the shared instance of FIRAnalyticsConfiguration.
- */
-+ (FIRAnalyticsConfiguration *)sharedInstance;
-
-/**
- * Sets the minimum engagement time in seconds required to start a new session. The default value
- * is 10 seconds.
- */
-- (void)setMinimumSessionInterval:(NSTimeInterval)minimumSessionInterval;
-
-/**
- * Sets the interval of inactivity in seconds that terminates the current session. The default
- * value is 1800 seconds (30 minutes).
- */
-- (void)setSessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval;
-
-/**
- * Sets whether analytics collection is enabled for this app on this device. This setting is
- * persisted across app sessions. By default it is enabled.
- */
-- (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled;
-
-/**
- * Deprecated. Sets whether measurement and reporting are enabled for this app on this device. By
- * default they are enabled.
- */
-- (void)setIsEnabled:(BOOL)isEnabled
- DEPRECATED_MSG_ATTRIBUTE("Use setAnalyticsCollectionEnabled: instead.");
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h
deleted file mode 100755
index 263c4bef..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h
+++ /dev/null
@@ -1,98 +0,0 @@
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-
-@class FIROptions;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** A block that takes a BOOL and has no return value. */
-typedef void (^FIRAppVoidBoolCallback)(BOOL success);
-
-/**
- * The entry point of Firebase SDKs.
- *
- * Initialize and configure FIRApp using +[FIRApp configure]
- * or other customized ways as shown below.
- *
- * The logging system has two modes: default mode and debug mode. In default mode, only logs with
- * log level Notice, Warning and Error will be sent to device. In debug mode, all logs will be sent
- * to device. The log levels that Firebase uses are consistent with the ASL log levels.
- *
- * Enable debug mode by passing the -FIRDebugEnabled argument to the application. You can add this
- * argument in the application's Xcode scheme. When debug mode is enabled via -FIRDebugEnabled,
- * further executions of the application will also be in debug mode. In order to return to default
- * mode, you must explicitly disable the debug mode with the application argument -FIRDebugDisabled.
- *
- * It is also possible to change the default logging level in code by calling setLoggerLevel: on
- * the FIRConfiguration interface.
- */
-@interface FIRApp : NSObject
-
-/**
- * Configures a default Firebase app. Raises an exception if any configuration step fails. The
- * default app is named "__FIRAPP_DEFAULT". This method should be called after the app is launched
- * and before using Firebase services. This method is thread safe.
- */
-+ (void)configure;
-
-/**
- * Configures the default Firebase app with the provided options. The default app is named
- * "__FIRAPP_DEFAULT". Raises an exception if any configuration step fails. This method is thread
- * safe.
- *
- * @param options The Firebase application options used to configure the service.
- */
-+ (void)configureWithOptions:(FIROptions *)options;
-
-/**
- * Configures a Firebase app with the given name and options. Raises an exception if any
- * configuration step fails. This method is thread safe.
- *
- * @param name The application's name given by the developer. The name should should only contain
- Letters, Numbers and Underscore.
- * @param options The Firebase application options used to configure the services.
- */
-+ (void)configureWithName:(NSString *)name options:(FIROptions *)options;
-
-/**
- * Returns the default app, or nil if the default app does not exist.
- */
-+ (nullable FIRApp *)defaultApp NS_SWIFT_NAME(defaultApp());
-
-/**
- * Returns a previously created FIRApp instance with the given name, or nil if no such app exists.
- * This method is thread safe.
- */
-+ (nullable FIRApp *)appNamed:(NSString *)name;
-
-/**
- * Returns the set of all extant FIRApp instances, or nil if there are no FIRApp instances. This
- * method is thread safe.
- */
-+ (nullable NSDictionary *)allApps;
-
-/**
- * Cleans up the current FIRApp, freeing associated data and returning its name to the pool for
- * future use. This method is thread safe.
- */
-- (void)deleteApp:(FIRAppVoidBoolCallback)completion;
-
-/**
- * FIRApp instances should not be initialized directly. Call +[FIRApp configure],
- * +[FIRApp configureWithOptions:], or +[FIRApp configureWithNames:options:] directly.
- */
-- (instancetype)init NS_UNAVAILABLE;
-
-/**
- * Gets the name of this app.
- */
-@property(nonatomic, copy, readonly) NSString *name;
-
-/**
- * Gets the options for this app.
- */
-@property(nonatomic, readonly) FIROptions *options;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h
deleted file mode 100755
index a25647b4..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#import "FIRAnalyticsConfiguration.h"
-#import "FIRLoggerLevel.h"
-
-/**
- * The log levels used by FIRConfiguration.
- */
-typedef NS_ENUM(NSInteger, FIRLogLevel) {
- /** Error */
- kFIRLogLevelError __deprecated = 0,
- /** Warning */
- kFIRLogLevelWarning __deprecated,
- /** Info */
- kFIRLogLevelInfo __deprecated,
- /** Debug */
- kFIRLogLevelDebug __deprecated,
- /** Assert */
- kFIRLogLevelAssert __deprecated,
- /** Max */
- kFIRLogLevelMax __deprecated = kFIRLogLevelAssert
-} DEPRECATED_MSG_ATTRIBUTE(
- "Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details.");
-
-/**
- * This interface provides global level properties that the developer can tweak, and the singleton
- * of the Firebase Analytics configuration class.
- */
-@interface FIRConfiguration : NSObject
-
-/** Returns the shared configuration object. */
-+ (FIRConfiguration *)sharedInstance;
-
-/** The configuration class for Firebase Analytics. */
-@property(nonatomic, readwrite) FIRAnalyticsConfiguration *analyticsConfiguration;
-
-/** Global log level. Defaults to kFIRLogLevelError. */
-@property(nonatomic, readwrite, assign) FIRLogLevel logLevel DEPRECATED_MSG_ATTRIBUTE(
- "Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details.");
-
-/**
- * Sets the logging level for internal Firebase logging. Firebase will only log messages
- * that are logged at or below loggerLevel. The messages are logged both to the Xcode
- * console and to the device's log. Note that if an app is running from AppStore, it will
- * never log above FIRLoggerLevelNotice even if loggerLevel is set to a higher (more verbose)
- * setting.
- *
- * @param loggerLevel The maximum logging level. The default level is set to FIRLoggerLevelNotice.
- */
-- (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel;
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h
deleted file mode 100755
index ddf683f7..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * The log levels used by internal logging.
- */
-typedef NS_ENUM(NSInteger, FIRLoggerLevel) {
- FIRLoggerLevelError = 3 /*ASL_LEVEL_ERR*/,
- FIRLoggerLevelWarning = 4 /*ASL_LEVEL_WARNING*/,
- FIRLoggerLevelNotice = 5 /*ASL_LEVEL_NOTICE*/,
- FIRLoggerLevelInfo = 6 /*ASL_LEVEL_INFO*/,
- FIRLoggerLevelDebug = 7 /*ASL_LEVEL_DEBUG*/,
- FIRLoggerLevelMin = FIRLoggerLevelError,
- FIRLoggerLevelMax = FIRLoggerLevelDebug
-};
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h
deleted file mode 100755
index 083082ab..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h
+++ /dev/null
@@ -1,93 +0,0 @@
-#import <Foundation/Foundation.h>
-
-/**
- * This class provides constant fields of Google APIs.
- */
-@interface FIROptions : NSObject<NSCopying>
-
-/**
- * Returns the default options.
- */
-+ (FIROptions *)defaultOptions;
-
-/**
- * An iOS API key used for authenticating requests from your app, e.g.
- * @"AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk", used to identify your app to Google servers.
- */
-@property(nonatomic, readonly, copy) NSString *APIKey;
-
-/**
- * The OAuth2 client ID for iOS application used to authenticate Google users, for example
- * @"12345.apps.googleusercontent.com", used for signing in with Google.
- */
-@property(nonatomic, readonly, copy) NSString *clientID;
-
-/**
- * The tracking ID for Google Analytics, e.g. @"UA-12345678-1", used to configure Google Analytics.
- */
-@property(nonatomic, readonly, copy) NSString *trackingID;
-
-/**
- * The Project Number from the Google Developer's console, for example @"012345678901", used to
- * configure Google Cloud Messaging.
- */
-@property(nonatomic, readonly, copy) NSString *GCMSenderID;
-
-/**
- * The Project ID from the Firebase console, for example @"abc-xyz-123". Currently only populated
- * when using [FIROptions defaultOptions].
- */
-@property(nonatomic, readonly, copy) NSString *projectID;
-
-/**
- * The Android client ID used in Google AppInvite when an iOS app has its Android version, for
- * example @"12345.apps.googleusercontent.com".
- */
-@property(nonatomic, readonly, copy) NSString *androidClientID;
-
-/**
- * The Google App ID that is used to uniquely identify an instance of an app.
- */
-@property(nonatomic, readonly, copy) NSString *googleAppID;
-
-/**
- * The database root URL, e.g. @"http://abc-xyz-123.firebaseio.com".
- */
-@property(nonatomic, readonly, copy) NSString *databaseURL;
-
-/**
- * The URL scheme used to set up Durable Deep Link service.
- */
-@property(nonatomic, readwrite, copy) NSString *deepLinkURLScheme;
-
-/**
- * The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com".
- */
-@property(nonatomic, readonly, copy) NSString *storageBucket;
-
-/**
- * Initializes a customized instance of FIROptions with keys. googleAppID, bundleID and GCMSenderID
- * are required. Other keys may required for configuring specific services.
- */
-- (instancetype)initWithGoogleAppID:(NSString *)googleAppID
- bundleID:(NSString *)bundleID
- GCMSenderID:(NSString *)GCMSenderID
- APIKey:(NSString *)APIKey
- clientID:(NSString *)clientID
- trackingID:(NSString *)trackingID
- androidClientID:(NSString *)androidClientID
- databaseURL:(NSString *)databaseURL
- storageBucket:(NSString *)storageBucket
- deepLinkURLScheme:(NSString *)deepLinkURLScheme;
-
-/**
- * Initializes a customized instance of FIROptions from the file at the given plist file path.
- * For example,
- * NSString *filePath =
- * [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
- * FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
- * Returns nil if the plist file does not exist or is invalid.
- */
-- (instancetype)initWithContentsOfFile:(NSString *)plistPath;
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h
deleted file mode 100755
index 52a222f5..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#import "FIRAnalyticsConfiguration.h"
-#import "FIRApp.h"
-#import "FIRConfiguration.h"
-#import "FIRLoggerLevel.h"
-#import "FIROptions.h"
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap
deleted file mode 100755
index f3db90d8..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,8 +0,0 @@
-framework module FirebaseCore {
- umbrella header "FirebaseCore.h"
- export *
- module * { export *}
- link "z"
- link framework "Foundation"
- link framework "UIKit"
-} \ No newline at end of file
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceID b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceID
deleted file mode 100755
index 2ebc6e68..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceID
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h
deleted file mode 100755
index 5ff8372e..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h
+++ /dev/null
@@ -1,245 +0,0 @@
-#import <Foundation/Foundation.h>
-
-/**
- * @memberof FIRInstanceID
- *
- * The scope to be used when fetching/deleting a token for Firebase Messaging.
- */
-FOUNDATION_EXPORT NSString * __nonnull const kFIRInstanceIDScopeFirebaseMessaging;
-
-/**
- * Called when the system determines that tokens need to be refreshed.
- * This method is also called if Instance ID has been reset in which
- * case, tokens and FCM topic subscriptions also need to be refreshed.
- *
- * Instance ID service will throttle the refresh event across all devices
- * to control the rate of token updates on application servers.
- */
-FOUNDATION_EXPORT NSString * __nonnull const kFIRInstanceIDTokenRefreshNotification;
-
-/**
- * @related FIRInstanceID
- *
- * The completion handler invoked when the InstanceID token returns. If
- * the call fails we return the appropriate `error code` as described below.
- *
- * @param token The valid token as returned by InstanceID backend.
- *
- * @param error The error describing why generating a new token
- * failed. See the error codes below for a more detailed
- * description.
- */
-typedef void(^FIRInstanceIDTokenHandler)( NSString * __nullable token, NSError * __nullable error);
-
-
-/**
- * @related FIRInstanceID
- *
- * The completion handler invoked when the InstanceID `deleteToken` returns. If
- * the call fails we return the appropriate `error code` as described below
- *
- * @param error The error describing why deleting the token failed.
- * See the error codes below for a more detailed description.
- */
-typedef void(^FIRInstanceIDDeleteTokenHandler)(NSError * __nullable error);
-
-/**
- * @related FIRInstanceID
- *
- * The completion handler invoked when the app identity is created. If the
- * identity wasn't created for some reason we return the appropriate error code.
- *
- * @param identity A valid identity for the app instance, nil if there was an error
- * while creating an identity.
- * @param error The error if fetching the identity fails else nil.
- */
-typedef void(^FIRInstanceIDHandler)(NSString * __nullable identity, NSError * __nullable error);
-
-/**
- * @related FIRInstanceID
- *
- * The completion handler invoked when the app identity and all the tokens associated
- * with it are deleted. Returns a valid error object in case of failure else nil.
- *
- * @param error The error if deleting the identity and all the tokens associated with
- * it fails else nil.
- */
-typedef void(^FIRInstanceIDDeleteHandler)(NSError * __nullable error);
-
-/**
- * @enum FIRInstanceIDError
- */
-typedef NS_ENUM(NSUInteger, FIRInstanceIDError) {
- // Http related errors.
-
- /// Unknown error.
- FIRInstanceIDErrorUnknown = 0,
-
- /// Auth Error -- GCM couldn't validate request from this client.
- FIRInstanceIDErrorAuthentication = 1,
-
- /// NoAccess -- InstanceID service cannot be accessed.
- FIRInstanceIDErrorNoAccess = 2,
-
- /// Timeout -- Request to InstanceID backend timed out.
- FIRInstanceIDErrorTimeout = 3,
-
- /// Network -- No network available to reach the servers.
- FIRInstanceIDErrorNetwork = 4,
-
- /// OperationInProgress -- Another similar operation in progress,
- /// bailing this one.
- FIRInstanceIDErrorOperationInProgress = 5,
-
- /// InvalidRequest -- Some parameters of the request were invalid.
- FIRInstanceIDErrorInvalidRequest = 7,
-};
-
-/**
- * The APNS token type for the app. If the token type is set to `UNKNOWN`
- * InstanceID will implicitly try to figure out what the actual token type
- * is from the provisioning profile.
- */
-typedef NS_ENUM(NSInteger, FIRInstanceIDAPNSTokenType) {
- /// Unknown token type.
- FIRInstanceIDAPNSTokenTypeUnknown,
- /// Sandbox token type.
- FIRInstanceIDAPNSTokenTypeSandbox,
- /// Production token type.
- FIRInstanceIDAPNSTokenTypeProd,
-};
-
-/**
- * Instance ID provides a unique identifier for each app instance and a mechanism
- * to authenticate and authorize actions (for example, sending a GCM message).
- *
- * Instance ID is long lived but, may be reset if the device is not used for
- * a long time or the Instance ID service detects a problem.
- * If Instance ID is reset, the app will be notified via
- * `kFIRInstanceIDTokenRefreshNotification`.
- *
- * If the Instance ID has become invalid, the app can request a new one and
- * send it to the app server.
- * To prove ownership of Instance ID and to allow servers to access data or
- * services associated with the app, call
- * `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`.
- */
-@interface FIRInstanceID : NSObject
-
-/**
- * FIRInstanceID.
- *
- * @return A shared instance of FIRInstanceID.
- */
-+ (nonnull instancetype)instanceID NS_SWIFT_NAME(instanceID());
-
-/**
- * Unavailable. Use +instanceID instead.
- */
-- (nonnull instancetype)init __attribute__((unavailable("Use +instanceID instead.")));
-
-/**
- * Set APNS token for the application. This APNS token will be used to register
- * with Firebase Messaging using `token` or
- * `tokenWithAuthorizedEntity:scope:options:handler`. If the token type is set to
- * `FIRInstanceIDAPNSTokenTypeUnknown` InstanceID will read the provisioning profile
- * to find out the token type.
- *
- * @param token The APNS token for the application.
- * @param type The APNS token type for the above token.
- */
-- (void)setAPNSToken:(nonnull NSData *)token
- type:(FIRInstanceIDAPNSTokenType)type;
-
-#pragma mark - Tokens
-
-/**
- * Returns a Firebase Messaging scoped token for the firebase app.
- *
- * @return Null Returns null if the device has not yet been registerd with
- * Firebase Message else returns a valid token.
- */
-- (nullable NSString *)token;
-
-/**
- * Returns a token that authorizes an Entity (example: cloud service) to perform
- * an action on behalf of the application identified by Instance ID.
- *
- * This is similar to an OAuth2 token except, it applies to the
- * application instance instead of a user.
- *
- * This is an asynchronous call. If the token fetching fails for some reason
- * we invoke the completion callback with nil `token` and the appropriate
- * error.
- *
- * Note, you can only have one `token` or `deleteToken` call for a given
- * authorizedEntity and scope at any point of time. Making another such call with the
- * same authorizedEntity and scope before the last one finishes will result in an
- * error with code `OperationInProgress`.
- *
- * @see FIRInstanceID deleteTokenWithAuthorizedEntity:scope:handler:
- *
- * @param authorizedEntity Entity authorized by the token.
- * @param scope Action authorized for authorizedEntity.
- * @param options The extra options to be sent with your token request. The
- * value for the `apns_token` should be the NSData object
- * passed to UIApplication's
- * `didRegisterForRemoteNotificationsWithDeviceToken` method.
- * All other keys and values in the options dict need to be
- * instances of NSString or else they will be discarded. Bundle
- * keys starting with 'GCM.' and 'GOOGLE.' are reserved.
- * @param handler The callback handler which is invoked when the token is
- * successfully fetched. In case of success a valid `token` and
- * `nil` error are returned. In case of any error the `token`
- * is nil and a valid `error` is returned. The valid error
- * codes have been documented above.
- */
-- (void)tokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity
- scope:(nonnull NSString *)scope
- options:(nullable NSDictionary *)options
- handler:(nonnull FIRInstanceIDTokenHandler)handler;
-
-/**
- * Revokes access to a scope (action) for an entity previously
- * authorized by `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`.
- *
- * This is an asynchronous call. Call this on the main thread since InstanceID lib
- * is not thread safe. In case token deletion fails for some reason we invoke the
- * `handler` callback passed in with the appropriate error code.
- *
- * Note, you can only have one `token` or `deleteToken` call for a given
- * authorizedEntity and scope at a point of time. Making another such call with the
- * same authorizedEntity and scope before the last one finishes will result in an error
- * with code `OperationInProgress`.
- *
- * @param authorizedEntity Entity that must no longer have access.
- * @param scope Action that entity is no longer authorized to perform.
- * @param handler The handler that is invoked once the unsubscribe call ends.
- * In case of error an appropriate error object is returned
- * else error is nil.
- */
-- (void)deleteTokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity
- scope:(nonnull NSString *)scope
- handler:(nonnull FIRInstanceIDDeleteTokenHandler)handler;
-
-#pragma mark - Identity
-
-/**
- * Asynchronously fetch a stable identifier that uniquely identifies the app
- * instance. If the identifier has been revoked or has expired, this method will
- * return a new identifier.
- *
- *
- * @param handler The handler to invoke once the identifier has been fetched.
- * In case of error an appropriate error object is returned else
- * a valid identifier is returned and a valid identifier for the
- * application instance.
- */
-- (void)getIDWithHandler:(nonnull FIRInstanceIDHandler)handler;
-
-/**
- * Resets Instance ID and revokes all tokens.
- */
-- (void)deleteIDWithHandler:(nonnull FIRInstanceIDDeleteHandler)handler;
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h
deleted file mode 100755
index 053ec2b1..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h
+++ /dev/null
@@ -1 +0,0 @@
-#import "FIRInstanceID.h"
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap
deleted file mode 100755
index 267c0356..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,7 +0,0 @@
-framework module FirebaseInstanceID {
- umbrella header "FirebaseInstanceID.h"
- export *
- module * { export *}
- link framework "Foundation"
- link framework "UIKit"
-} \ No newline at end of file
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac
deleted file mode 100644
index 345b889c..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/FirebaseCrash b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/FirebaseCrash
deleted file mode 100755
index 7cf08c10..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/FirebaseCrash
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Headers/FIRCrashLog.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Headers/FIRCrashLog.h
deleted file mode 100755
index ac446a62..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Headers/FIRCrashLog.h
+++ /dev/null
@@ -1,164 +0,0 @@
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * @abstract Logs a message to the Firebase Crash Reporter system.
- *
- * @discussion This method adds a message to the crash reporter
- * logging system. The recent logs will be sent with the crash
- * report when the application exits abnormally. Note that the
- * timestamp of this message and the timestamp of the console
- * message may differ by a few milliseconds.
- *
- * Messages should be brief as the total size of the message payloads
- * is limited by the uploader and may change between releases of the
- * crash reporter. Excessively long messages will be truncated
- * safely but that will introduce a delay in submitting the message.
- *
- * @warning Raises an NSInvalidArgumentException if @p format is nil.
- *
- * @param format A format string.
- *
- * @param ap A variable argument list.
- */
-FOUNDATION_EXTERN NS_FORMAT_FUNCTION(1, 0)
-void FIRCrashLogv(NSString *format, va_list ap);
-
-/**
- * @abstract Logs a message to the Firebase Crash Reporter system.
- *
- * @discussion This method adds a message to the crash reporter
- * logging system. The recent logs will be sent with the crash
- * report when the application exits abnormally. Note that the
- * timestamp of this message and the timestamp of the console
- * message may differ by a few milliseconds.
- *
- * Messages should be brief as the total size of the message payloads
- * is limited by the uploader and may change between releases of the
- * crash reporter. Excessively long messages will be truncated
- * safely but that will introduce a delay in submitting the message.
- *
- * @warning Raises an NSInvalidArgumentException if @p format is nil.
- *
- * @param format A format string.
- *
- * @param ... A comma-separated list of arguments to substitute into
- * format.
- *
- * @see FIRCrashLogv(format, ap)
- */
-FOUNDATION_STATIC_INLINE NS_FORMAT_FUNCTION(1, 2)
-void FIRCrashLog(NSString *format, ...) {
- va_list ap;
-
- va_start(ap, format);
- FIRCrashLogv(format, ap);
- va_end(ap);
-}
-
-/**
- * @abstract Logs a message to the Firebase Crash Reporter system as
- * well as <code>NSLog()</code>.
- *
- * @discussion This method adds a message to the crash reporter
- * logging system. The recent logs will be sent with the crash
- * report when the application exits abnormally. Note that the
- * timestamp of this message and the timestamp of the console
- * message may differ by a few milliseconds.
- *
- * Messages should be brief as the total size of the message payloads
- * is limited by the uploader and may change between releases of the
- * crash reporter. Excessively long messages will be truncated
- * safely but that will introduce a delay in submitting the message.
- *
- * @warning Raises an NSInvalidArgumentException if @p format is nil.
- *
- * @param format A format string.
- *
- * @param ap A variable argument list.
- */
-FOUNDATION_STATIC_INLINE NS_FORMAT_FUNCTION(1, 0)
-void FIRCrashNSLogv(NSString *format, va_list ap) {
- va_list ap2;
-
- va_copy(ap2, ap);
- NSLogv(format, ap);
- FIRCrashLogv(format, ap2);
- va_end(ap2);
-}
-
-/**
- * @abstract Logs a message to the Firebase Crash Reporter system as
- * well as <code>NSLog()</code>.
- *
- * @discussion This method adds a message to the crash reporter
- * logging system. The recent logs will be sent with the crash
- * report when the application exits abnormally. Note that the
- * timestamp of this message and the timestamp of the console
- * message may differ by a few milliseconds.
- *
- * Messages should be brief as the total size of the message payloads
- * is limited by the uploader and may change between releases of the
- * crash reporter. Excessively long messages will be truncated
- * safely but that will introduce a delay in submitting the message.
- *
- * @warning Raises an NSInvalidArgumentException if @p format is nil.
- *
- * @param format A format string.
- *
- * @param ... A comma-separated list of arguments to substitute into
- * format.
- *
- * @see FIRCrashLogv(format, ap)
- */
-FOUNDATION_STATIC_INLINE NS_FORMAT_FUNCTION(1, 2)
-void FIRCrashNSLog(NSString *format, ...) {
- va_list ap;
-
- va_start(ap, format);
- FIRCrashNSLogv(format, ap);
- va_end(ap);
-}
-
-/**
- * @abstract Logs a message to the Firebase Crash Reporter system in
- * a way that is easily called from Swift code.
- *
- * @discussion This method adds a message to the crash reporter
- * logging system. Similar to FIRCrashLog, but with a call signature
- * that is more Swift friendly. Unlike FIRCrashLog, callers
- * use string interpolation instead of formatting arguments.
- *
- * @code
- * public func mySwiftFunction() {
- * let unexpected_number = 10;
- * FIRCrashMessage("This number doesn't seem right: \(unexpected_number)");
- * }
- * @endcode
- *
- * Messages should be brief as the total size of the message payloads
- * is limited by the uploader and may change between releases of the
- * crash reporter. Excessively long messages will be truncated
- * safely but that will introduce a delay in submitting the message.
- *
- * @param Message A log message
- *
- * @see FIRCrashLog(format, ...)
- */
-FOUNDATION_STATIC_INLINE
-void FIRCrashMessage(NSString *message) {
- FIRCrashLog(@"%@", message);
-}
-
-NS_ASSUME_NONNULL_END
-
-#ifdef FIRCRASH_REPLACE_NSLOG
-#if defined(DEBUG) || defined(FIRCRASH_LOG_TO_CONSOLE)
-#define NSLog(...) FIRCrashNSLog(__VA_ARGS__)
-#define NSLogv(...) FIRCrashNSLogv(__VA_ARGS__)
-#else
-#define NSLog(...) FIRCrashLog(__VA_ARGS__)
-#define NSLogv(...) FIRCrashLogv(__VA_ARGS__)
-#endif
-#endif
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Headers/FirebaseCrash.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Headers/FirebaseCrash.h
deleted file mode 100755
index 18659214..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Headers/FirebaseCrash.h
+++ /dev/null
@@ -1 +0,0 @@
-#import "FIRCrashLog.h"
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Modules/module.modulemap b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Modules/module.modulemap
deleted file mode 100755
index 537a790a..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/FirebaseCrash.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,12 +0,0 @@
-framework module FirebaseCrash {
- umbrella header "FirebaseCrash.h"
- export *
- module * { export *}
- link "sqlite3"
- link "z"
- link framework "CoreGraphics"
- link framework "CoreTelephony"
- link framework "Foundation"
- link framework "SystemConfiguration"
- link framework "UIKit"
-} \ No newline at end of file
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/Protobuf.framework/Protobuf b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/Protobuf.framework/Protobuf
deleted file mode 100644
index 546e02ec..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/Protobuf.framework/Protobuf
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/batch-upload b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/batch-upload
deleted file mode 100755
index 053a3ee7..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/batch-upload
+++ /dev/null
@@ -1,416 +0,0 @@
-#!/bin/bash
-
-usage () {
- echo >&2 "usage: ${0##*/} [-hv] [-p google-service] [-i info] service-account-file {mach-o file|uuid} ..."
-}
-
-help () {
- usage
- cat >&2 <<EOF
-
--h Show this help.
--p Location of GoogleService-Info.plist.
--i Location of Info.plist.
--v Be verbose.
-
-account JSON file containing account information.
-mach-o A path to an executable, dSYM file, library,
- or other Mach-O object.
-uuid A dSYM file's UUID (searches for the file).
-
-Processes one or more Mach-O files for use with the Firebase Crash
-Reporter. dSYM bundles may be specified by full path to the dSYM
-companion file (usually found under "DWARF") or by UUID.
-
-For applications and frameworks, please use the full path to the
-Mach-O file. For frameworks, this will be "Blah.framework/Blah".
-For applications, this will be "Blah.app/Blah".
-
-Useful environment variables:
-
- SERVICE_PLIST - path to GoogleService-Info.plist (-p command-line option)
- INFO_PLIST - path to Info.plist (-i command-line option)
- DUMP_SYMS - path to dump_syms executable
- FCR_BUNDLE_ID - CFBundleIdentifier (build version) from Info.plist
- FCR_PROD_VERS - CFBundleShortVersionString from Info.plist
- FIREBASE_API_KEY - API key from GoogleService-Info.plist
- FIREBASE_APP_ID - App ID from GoogleService-Info.plist
- SWIFT_DEMANGLE - path to swift-demangle executable
-
-Setting any of the above prevents this script from searching for the
-values. Specifically, the SERVICE_PLIST and INFO_PLIST files are not
-required if FCR_* and FIREBASE_* environment variables are not empty.
-
-EOF
-}
-
-KEEP_TEMPORARIES=false # mostly for debugging (not documented)
-
-while getopts hi:kp:v-: OPT; do
- case ${OPT} in
- h) help; exit 0;;
- i) INFO_PLIST="${OPTARG}";;
- k) KEEP_TEMPORARIES=true;;
- p) SERVICE_PLIST="${OPTARG}";;
- v) ((VERBOSE+=1));;
- -) case "${OPTARG}" in
- help) help; exit 0;;
- info=*) INFO_PLIST="${OPTARG#info=}";;
- service=*) SERVICE_PLIST="${OPTARG#service=}";;
- verbose) ((VERBOSE+=1));;
- *) usage; exit 2;;
- esac;;
- ?) usage; exit 2;;
- esac
-done
-
-shift $((OPTIND - 1))
-
-. "$(dirname "$0")/upload-sym-util.bash"
-
-var_check () {
- for VAR; do
- if [[ "${!VAR}" =~ \$\(.*\) ]]; then
- xcwarning "${VAR} (== \"${!VAR}\") appears to have unexpanded variables."
- xcnote "Consider specifying it through an environment variable."
- fi
- done
-}
-
-SERVICE_ACCOUNT_FILE="$1"
-
-if [[ ! -f "${SERVICE_ACCOUNT_FILE}" ]]; then
- xcwarning "The first argument does not look like a service account file."
- xcdebug "Will attempt to extract account file from legacy cache."
- unset SERVICE_ACCOUNT_FILE
-else
- shift
-fi
-
-if (( $# == 0 )); then
- usage
- exit 2
-fi
-
-if [[ "${INFO_PLIST}" && -f "${INFO_PLIST%/*}/GoogleService-Info.plist" ]]; then
- : "${SERVICE_PLIST:="${INFO_PLIST%/*}/GoogleService-Info.plist"}"
-fi
-
-if [[ "${SERVICE_PLIST}" && -f "${SERVICE_PLIST%/*}/Info.plist" ]]; then
- : "${INFO_PLIST:="${SERVICE_PLIST%/*}/Info.plist"}"
-fi
-
-xcdebug "SERVICE_PLIST = ${SERVICE_PLIST:="$(find . -name GoogleService-Info.plist | head -n1)"}"
-
-xcdebug "INFO_PLIST = ${INFO_PLIST:="$(find . -name Info.plist | head -n1)"}"
-
-if [[ -f "${SERVICE_PLIST}" ]]; then
- xcdebug "FIREBASE_API_KEY = ${FIREBASE_API_KEY:="$(/usr/libexec/PlistBuddy -c 'print API_KEY' "${SERVICE_PLIST}")"}"
- xcdebug "FIREBASE_APP_ID = ${FIREBASE_APP_ID:="$(/usr/libexec/PlistBuddy -c 'print GOOGLE_APP_ID' "${SERVICE_PLIST}")"}"
- xcdebug "FCR_BUNDLE_ID = ${FCR_BUNDLE_ID:="$(/usr/libexec/PlistBuddy -c 'print BUNDLE_ID' "${SERVICE_PLIST}")"}"
-fi
-
-if [[ -f "${INFO_PLIST}" ]]; then
- xcdebug "FCR_PROD_VERS = ${FCR_PROD_VERS:="$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' "${INFO_PLIST}" 2>/dev/null)"}"
-fi
-
-var_check FCR_PROD_VERS FCR_BUNDLE_ID
-
-ERROR=$'environment variable empty or unset\n\nExplicitly add to environment or set GoogleService-Info.plist (-p)\nand Info.plist (-i) flags to extract values from the files.\n\nTry "'"$0"' -h" for details.'
-
-: "${FIREBASE_API_KEY:?"${ERROR}"}" "${FIREBASE_APP_ID:?"${ERROR}"}"
-: "${FCR_PROD_VERS:?"${ERROR}"}" "${FCR_BUNDLE_ID:?"${ERROR}"}"
-
-# Extract key from legacy cache.
-
-if [[ ! "${SERVICE_ACCOUNT_FILE}" ]]; then
- xcwarning "Running extract-keys on desktop."
- EXTRACT_KEYS="$(script_dir)/extract-keys"
- (cd "${HOME}/Desktop"; "${EXTRACT_KEYS}") || exit $?
- SERVICE_ACCOUNT_FILE="${HOME}/Desktop/${FIREBASE_APP_ID}.json"
- xcdebug "Using ${SERVICE_ACCOUNT_FILE} as account file. Please move this and all other extracted keys to a safe place."
-fi
-
-if [[ ! -f "${SERVICE_ACCOUNT_FILE}" ]]; then
- echo >&2 "Unable to find service account file."
- echo >&2
- usage
- exit 2
-fi
-
-# usage: extract_symbols_and_upload *dwarf-file* *arch* *exe-file*
-#
-# Do NOT use the dSYM bundle path. While it may work on occasion, it
-# is not guaranteed to do so; the full path to the DWARF companion
-# file will always work. (Discovered by Kerem Erkan.)
-#
-# If the executable is empty, use the DWARF companion file as a proxy
-# for the executable.
-extract_symbols_and_upload () {
- local DWARF_COMPANION="$1" ARCH="$2" EXECUTABLE="$3"
-
- if [[ ! "${EXECUTABLE}" ]]; then
- xcdebug "No executable; using ${DWARF_COMPANION} as symbol source."
-
- EXECUTABLE="${DWARF_COMPANION}"
- unset DWARF_COMPANION
- fi
-
- [[ "${EXECUTABLE}" ]] || return 1
-
- if [[ -x "${SWIFT_DEMANGLE:=$(xcrun --find swift-demangle 2>/dev/null)}" ]];
- then
- SWIFT_DEMANGLE_COMMAND="${SWIFT_DEMANGLE} -simplified"
- else
- SWIFT_DEMANGLE_COMMAND=/bin/cat
- fi
- fcr_mktemp SYMBOL_FILE
-
- "${DUMP_SYMS:="$(script_dir)/dump_syms"}" -a "${ARCH}" ${DWARF_COMPANION:+-g "${DWARF_COMPANION}"} "${EXECUTABLE}" | ${SWIFT_DEMANGLE_COMMAND} >|"${SYMBOL_FILE}" || return $?
-
- fcr_upload_files "${SYMBOL_FILE}" || return $?
-}
-
-# usage: is_executable *path*
-#
-# Check to see if the file is an executable or a dSYM bundle
-is_executable () {
- [[ -f "$1" || ( -d "$1" && "${1%/}" == *.dSYM ) ]]
-}
-
-# usage: is_uuid *string*
-#
-# Verify that the argument is a UUID.
-is_uuid () {
- [[ "$1" =~ ^[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}$ ]]
-}
-
-# usage: set_uuids_archs *mach-o-file*
-#
-# side effect: appends to UUIDS, ARCHS
-#
-# Extract the uuid and architecture information from the given Mach-O
-# file and append the information to the UUIDS and ARCHS arrays.
-set_uuids_archs () {
- eval "$(dwarfdump --uuid "$1" | awk '/^UUID:/ { print "UUIDS+=(" $2 "); ARCHS+=" $3 }')"
-}
-
-# usage: mdls_to_bash
-#
-# Convert the output of mdls to a string consumable by bash. mdls
-# outputs string arrays as quoted strings separated by commas, and
-# Unicode characters as '\Uxxxx'.
-#
-# Note: this is sensitive to the current locale. If the locale is not
-# UTF-8, then wide-character warnings will result if the strings
-# contain non-ASCII characters. This is actually a desired behavior,
-# because bash has issues with non-Unicode encodings for file names.
-# (The macOS default is to have UTF-8 enabled, so this should not be a
-# problem for the majority of use cases.)
-mdls_to_bash () {
- perl -C -ple 's/,$//; s/\\U(....)/chr hex $1/ge'
-}
-
-for EXE; do
- if is_executable "${EXE}"; then
- xcdebug "Assuming ${EXE} is an executable or dSYM bundle."
-
- # Import architecture UUID information
- UUIDS=() ARCHS=()
- set_uuids_archs "${EXE}"
-
- for I in "${!UUIDS[@]}"; do
- xcdebug "Found ${UUIDS[$I]} for ${ARCHS[$I]} in ${EXE}"
- done
-
- if ((${#UUIDS[*]} == 0)); then
- xcwarning "${EXE} exists, but has no architecture information."
- continue
- fi
-
- if [[ "${EXE}" = *.dSYM ]]; then
- xcdebug "Removing dSYM bundle as executable target."
- unset EXE
- fi
-
- elif is_uuid "${EXE}"; then
- xcdebug "${EXE} looks like a UUID to me."
- UUIDS=("${EXE}"); unset EXE
-
- else
- xcwarning "${EXE}: not an executable, bundle, or UUID."
- continue
- fi
-
- BUNDLES=()
-
- for UUID in "${UUIDS[@]}"; do
- xcdebug "Searching for ${UUID} ..."
-
- QUERY_UUID="com_apple_xcode_dsym_uuids == '${UUID}'"
- QUERY_TYPE="kMDItemContentType == 'com.apple.xcode.dsym' || kMDItemContentType == 'com.apple.xcode.archive'"
- QUERY="(${QUERY_UUID}) && (${QUERY_TYPE})"
-
- if ((VERBOSE > 1)); then
- xcnote "Passing query \"${QUERY}\" to mdfind."
- fi
-
- MD_FIND_RESULT=()
-
- eval "$(mdfind "${QUERY}" -0 | xargs -0 perl -le 'print "MD_FIND_RESULT+=(\Q$_\E)" for @ARGV')"
-
- xcdebug "mdfind returned (${MD_FIND_RESULT[*]})"
-
- # BUNDLES should contain no duplicates.
- for I in "${!MD_FIND_RESULT[@]}"; do
- for BUNDLE in "${BUNDLES[@]}"; do
- if [[ "${MD_FIND_RESULT[$I]}" == "$BUNDLE" ]]; then
- unset "MD_FIND_RESULT[$I]"
- fi
- done
- done
-
- BUNDLES+=("${MD_FIND_RESULT[@]}")
- done
-
- if [[ ${#BUNDLES[@]} == 0 && ${#ARCHS[@]} == 0 ]]; then
- xcwarning "No executable or bundle found for ${UUIDS[*]}."
- xcnote "Try passing in the executable itself instead of a UUID."
- continue
- fi
-
- xcdebug "BUNDLES = (${BUNDLES[*]})"
-
- if [[ ${#BUNDLES[@]} == 0 ]]; then
- xcdebug "No dSYM bundle found."
-
- # The dSYM has to be on a normal volume (not temporary). It
- # can, however, be shared among multiple executables.
- if [[ ! "${SCRATCH_BUNDLE}" ]]; then
- SCRATCH_BUNDLE="${HOME}/com.google.BatchUploadScratchFile.dSYM"
- FCR_TEMPORARY_FILES+=("${SCRATCH_BUNDLE}")
- fi
-
- xcdebug "Creating one in ${SCRATCH_BUNDLE}"
-
- BUNDLES=("${SCRATCH_BUNDLE}")
-
- # Create the dSYM bundle. This may produce an empty dSYM
- # bundle if the executable has no debugging information.
- xcrun dsymutil -o "${BUNDLES[0]}" "${EXE}"; STATUS=$?
-
- if ((STATUS)); then
- xcwarning "Command dsymutil failed with exit code ${STATUS}."
- continue
- fi
-
- # Import the dSYM bundle. There is a momentary delay between
- # creating the bundle and having it indexed; explicitly
- # importing guarantees the mds database is up-to-date when we
- # ask it for information about UUIDs and paths.
- mdimport "${SCRATCH_BUNDLE}"; STATUS=$?
-
- if ((STATUS)); then
- xcwarning "Command mdimport failed with exit code ${STATUS}."
- continue
- fi
- fi
-
- SEEN_ARCH=() SEEN_PATH=()
-
- for BUNDLE in "${BUNDLES[@]}"; do
- typeset -a BNDL_UUIDS BNDL_PATHS # keeps ShellLint happy
-
- eval "BNDL_UUIDS=$(mdls -raw -name com_apple_xcode_dsym_uuids "${BUNDLE}" | mdls_to_bash)"
- eval "BNDL_PATHS=$(mdls -raw -name com_apple_xcode_dsym_paths "${BUNDLE}" | mdls_to_bash)"
-
- # Neither of these SHOULD occur, but curious things happen out
- # in the field.
- if ((${#BNDL_UUIDS[@]} != ${#BNDL_PATHS[@]})); then
- xcwarning "${BUNDLE}: Malformed dSYM bundle."
- continue
- elif ((${#BNDL_UUIDS[@]} == 0)); then
- xcwarning "${BUNDLE}: No DWARF information."
- continue
- fi
-
- # If no executable was specified, then the UUIDS and ARCHS
- # arrays are empty. Populate them with information from the
- # bundle.
- if [[ ! "${EXE}" ]]; then
- # The final UUIDS setting will be the intersection of the
- # discovered set and the originally specified UUIDS. This
- # is to prevent uploading potentially private information.
- SOUGHT_UUIDS=("${UUIDS[@]}")
-
- UUIDS=() ARCHS=()
- for BNDL_PATH in "${BNDL_PATHS[@]}"; do
- set_uuids_archs "${BUNDLE}/${BNDL_PATH}"
- done
-
- if ((${#SOUGHT_UUIDS[@]})); then
- for I in "${!UUIDS[@]}"; do
- for UUID in "${SOUGHT_UUIDS[@]}"; do
- if [[ "${UUIDS[$I]}" == "${UUID}" ]]; then
- continue 2
- fi
- done
-
- # This is not the DWARF you are looking for...
- xcdebug "Rejecting ${UUIDS[$I]} (${ARCHS[$I]}) as candidate DWARF file."
- unset "UUIDS[$I]" "ARCHS[$I]"
- done
- fi
-
- unset SOUGHT_UUIDS
- fi
-
- for I in "${!BNDL_UUIDS[@]}"; do
- # See comment on extract_symbols_and_upload for why the
- # full path to the companion file is required.
-
- BNDL_UUID="${BNDL_UUIDS[$I]}" DWARF_COMPANION="${BUNDLE}/${BNDL_PATHS[$I]}"
-
- for J in "${!ARCHS[@]}"; do
- # A dSYM bundle can contain multiple architectures for
- # multiple applications. Make sure we get the right
- # one.
- if [[ "${BNDL_UUID}" == "${UUIDS[$J]}" ]]; then
- ARCH="${ARCHS[$J]}"
- break
- fi
- done
-
- if [[ ! "${ARCH}" ]]; then
- # This is not an error: it is legal for a dSYM bundle
- # to contain debugging information for multiple
- # executables (such as a framework with multiple
- # subframeworks). Just ignore it.
- xcdebug "No matching information found in ${DWARF_COMPANION} with UUID ${BNDL_UUID}."
- continue
- fi
-
- xcdebug "Found ${UUID} for ${ARCH} in ${DWARF_COMPANION}"
-
- # Have we already uploaded this file?
- for J in "${!SEEN_ARCH[@]}"; do
- if [[ "${ARCH}" == "${SEEN_ARCH[$J]}" ]] && cmp -s "${DWARF_COMPANION}" "${SEEN_PATH[$J]}"; then
- xcdebug "${DWARF_COMPANION}: copy of ${SEEN_PATH[$J]}; no need to upload."
- continue 2
- fi
- done
-
- if [[ -f "${DWARF_COMPANION}" ]]; then
- extract_symbols_and_upload "${DWARF_COMPANION}" "${ARCH}" "${EXE}" || exit $?
- SEEN_ARCH+=("${ARCH}") SEEN_PATH+=("${DWARF_COMPANION}")
- fi
- done
- done
-done
-
-# For debugging odd cases.
-if "${KEEP_TEMPORARIES}"; then
- FCR_TEMPORARY_FILES=()
-fi
-
-echo "Done."
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/dump_syms b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/dump_syms
deleted file mode 100755
index 8d0ef781..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/dump_syms
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/extract-keys b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/extract-keys
deleted file mode 100755
index 0da57003..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/extract-keys
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-PLIST="${HOME}/Library/Preferences/com.google.SymbolUpload.plist"
-
-[[ -f $PLIST ]] || exit
-
-defaults read com.google.SymbolUpload |
-perl -nle '/"(app_\d+_\d+_ios_.*)"/ and print $1' |
-while read KEY; do
- APP_ID="${KEY#app_}"; APP_ID="${APP_ID//_/:}"
- plutil -extract "${KEY}" json -o "${APP_ID}.json" "${PLIST}"
-done
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym
deleted file mode 100755
index 1f8327dc..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/bin/bash
-
-usage () {
- echo >&2 "usage: $0 [-h] [-v] [-w|-e] service-account-file"
-}
-
-help () {
- usage
-
- cat >&2 <<EOF
-
- -h This message.
- -v Increase verbosity. Multiple -v options will provide
- increasing details. Use at least '-vv' when reporting bugs.
- -w Treat errors as warnings. Does not change the exit status.
- -e Treat warnings as errors. Does not change the exit status.
-
-The service account private key file is downloaded from the Firebase
-console. See
-
- https://firebase.google.com/docs/crash/ios#upload_symbol_files
-
-for details on retrieving this file. Older keys may still be in the
-registry. Consider using extract-keys.pl to retrieve them.
-
-Execute this script in the final phase of your build. It will not
-work outside of Xcode, and should warn you if you try. See the
-batch-upload script included in this distribution to upload symbols
-outside of an Xcode build.
-
-Here is an example Run Script Phase you can add to your project
-to invoke this script:
-
- "\${PODS_ROOT}/FirebaseCrashReporting/upload-sym" \\
- "\${HOME}/Library/Developer/My Project-1fad0d0767b42e.json"
-
-To avoid stopping the build should the upload fail,
-
- "\${PODS_ROOT}/FirebaseCrashReporting/upload-sym" -w \\
- "\${HOME}/Library/Developer/My Project-1fad0d0767b42e.json"
- exit 0 # claim success no matter what
-
-EOF
-}
-
-# Parse optional command-line flags.
-
-VERBOSE=0 WARNINGS_ONLY=0 ERRORS_ONLY=0
-
-while getopts ehvw OPT; do
- case "${OPT}" in
- h) help; exit 0;;
- v) VERBOSE=$((VERBOSE + 1));;
- w) WARNINGS_ONLY=1;;
- e) ERRORS_ONLY=1;;
- ?) usage; exit 2;;
- esac
-done
-
-shift $((OPTIND - 1))
-
-if ((WARNINGS_ONLY && ERRORS_ONLY)); then
- echo >&2 "Either -w or -e may be specified, but not both."
- echo >&2
- usage
- exit 2
-fi
-
-SERVICE_ACCOUNT_FILE="$1"; shift
-
-if (($#)); then
- echo >&2 "Unexpected argument '$1'"
- echo >&2
- usage
- exit 2
-fi
-
-export PATH=/bin:/usr/bin # play it safe
-
-# Load common utility routines.
-
-. "$(dirname "$0")/upload-sym-util.bash"
-
-# Make the error output Xcode-friendly.
-
-# This is a bit of Bash voodoo that cries for an explanation and is
-# horribly underdocumented on-line. The construct '>(...)' starts a
-# subprocess with its stdin connected to a pipe. After starting the
-# subprocess, the parser replaces the construct with the NAME of the
-# writable end of the pipe as a named file descriptor '/dev/fd/XX',
-# then reevaluates the line. So, after the subprocess is started
-# (which filters stdin and outputs to stderr [not stdout]), the line
-# "exec 2> /dev/fd/XX" is evaluated. This redirects the main
-# process's stderr to the given file descriptor.
-#
-# The end result is that anything sent to stderr of the form:
-# file.in: line 47: blah blah
-# is replaced with
-# file.in:47: error: blah blah
-# which Xcode will detect and emphasize in the formatted output.
-
-exec 2> >(sed -e 's/: line \([0-9]*\):/:\1: error:/' >&2)
-
-# Be long-winded about problems. The user may not understand how this
-# script works or what prerequisites it has. If the user sees this,
-# it is likely that they are executing the script outside of an Xcode
-# build.
-
-ERRMSG=$'Value missing\n\nThis script must be executed as part of an Xcode build stage to have the\nproper environment variables set.'
-
-# Locate Xcode-generated files.
-
-: "${TARGET_BUILD_DIR:?"${ERRMSG}"}"
-: "${FULL_PRODUCT_NAME:?"${ERRMSG}"}"
-
-DSYM_BUNDLE="${DWARF_DSYM_FOLDER_PATH?"${ERRMSG}"}/${DWARF_DSYM_FILE_NAME?"${ERRMSG}"}"
-[[ -e "${DSYM_BUNDLE}" ]] || unset DSYM_BUNDLE
-
-EXECUTABLE="${TARGET_BUILD_DIR?"${ERRMSG}"}/${EXECUTABLE_PATH?"${ERRMSG}"}"
-
-# Locate dump_syms utility.
-
-if ! [[ -f "${FCR_DUMP_SYMS:=$(script_dir)/dump_syms}" && -x "${FCR_DUMP_SYMS}" ]]; then
- xcerror "Cannot find dump_syms."
- xcnote "It should have been installed with the Cocoapod. The location of dump_syms can be explicitly set using the environment variable FCR_DUMP_SYMS if you are using a non-standard install."
-
- exit 2
-fi
-
-if [[ ! "${FIREBASE_API_KEY}" || ! "${FIREBASE_APP_ID}" ]]; then
- : "${SERVICE_PLIST:="$(find "${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME}" -name GoogleService-Info.plist | head -n1)"}"
- : "${SERVICE_PLIST:?"GoogleService-Info.plist could not be located"}"
- : "${FIREBASE_API_KEY:="$(property API_KEY "${SERVICE_PLIST}")"}"
- : "${FIREBASE_APP_ID:="$(property GOOGLE_APP_ID "${SERVICE_PLIST}")"}"
-fi
-
-if ! [[ "${FIREBASE_API_KEY}" ]]; then
- xcerror "Unable to get API_KEY from ${SERVICE_PLIST}."
- xcnote "Specify FIREBASE_API_KEY in environment."
- exit 2
-fi
-
-if ! [[ "${FIREBASE_APP_ID}" ]]; then
- xcerror "Unable to get GOOGLE_APP_ID from ${SERVICE_PLIST}."
- xcnote "Specify FIREBASE_APP_ID in environment."
- exit 2
-fi
-
-# Load Info.plist values (Bundle ID & version)
-
-INFOPLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
-
-if [[ -f "${INFOPLIST}" ]]; then
- : "${FCR_PROD_VERS:="$(property CFBundleShortVersionString "${INFOPLIST}")"}"
- : "${FCR_BUNDLE_ID:="$(property CFBundleIdentifier "${INFOPLIST}")"}"
-fi
-
-if ! [[ "${FCR_PROD_VERS}" ]]; then
- xcerror "Unable to get CFBundleShortVersionString from Info.plist."
- xcnote "Specify FCR_PROD_VERS in environment."
- exit 2
-fi
-
-if ! [[ "${FCR_BUNDLE_ID}" ]]; then
- xcerror "Unable to get CFBundleIdentifier from Info.plist."
- xcnote "Specify FCR_BUNDLE_ID in environment."
- exit 2
-fi
-
-# Support legacy account file cache before giving up
-
-if [[ ! -f "${SERVICE_ACCOUNT_FILE}" ]]; then
- xcwarning "Unable to find service account JSON file: ${SERVICE_ACCOUNT_FILE}"
- "Please ensure you've followed the steps at:"
- "https://firebase.google.com/docs/crash/ios#upload_symbol_files"
-
- xcdebug "Trying to extract JSON file from cache."
-
- CACHE_PLIST="${HOME}/Library/Preferences/com.google.SymbolUpload.plist"
-
- if [[ -f "${CACHE_PLIST}" ]]; then
- fcr_mktemp SERVICE_ACCOUNT_FILE
- /usr/bin/plutil -extract "app_${FIREBASE_APP_ID//:/_}" \
- json -o "${SERVICE_ACCOUNT_FILE}" "${CACHE_PLIST}" >/dev/null 2>&1
- if [[ ! -s "${SERVICE_ACCOUNT_FILE}" ]]; then
- xcwarning "${FIREBASE_APP_ID} not found in cache."
- /bin/rm -f "${SERVICE_ACCOUNT_FILE}"
- else
- xcnote "${FIREBASE_APP_ID} found in cache. Consider using extract-keys.pl to reduce reliance on cache."
- fi
- else
- xcnote "No cache file found."
- fi
-fi
-
-if [[ ! -f "${SERVICE_ACCOUNT_FILE}" ]]; then
- xcerror "All attempts to find the service account JSON file have failed."
- xcnote "You must supply it on the command line."
- echo >&2 -n "$0:1: note: "; usage
- exit 2
-fi
-
-# Dump collected information if requested
-
-if ((VERBOSE >= 2)); then
- xcnote "FIREBASE_API_KEY = ${FIREBASE_API_KEY}"
- xcnote "FIREBASE_APP_ID = ${FIREBASE_APP_ID}"
- xcnote "DSYM_BUNDLE = ${DSYM_BUNDLE:-(unset, will use symbols in executable)}"
- xcnote "EXECUTABLE = ${EXECUTABLE}"
- xcnote "INFOPLIST = ${INFOPLIST}"
- xcnote "FCR_PROD_VERS = ${FCR_PROD_VERS}"
- xcnote "FCR_BUNDLE_ID = ${FCR_BUNDLE_ID}"
-fi
-
-# Create and upload symbol files for each architecture
-if [[ -x "${SWIFT_DEMANGLE:=$(xcrun --find swift-demangle 2>/dev/null)}" ]]; then
- SWIFT_DEMANGLE_COMMAND="${SWIFT_DEMANGLE} -simplified"
-else
- SWIFT_DEMANGLE_COMMAND=/bin/cat
-fi
-
-for ARCH in ${ARCHS?:}; do
- SYMBOL_FILE="SYMBOL_FILE_${ARCH}"
- fcr_mktemp "${SYMBOL_FILE}" SCRATCH
-
- # Just because there is a dSYM bundle at that path does not mean
- # it is the RIGHT dSYM bundle...
-
- if [[ -d "${DSYM_BUNDLE}" ]]; then
- DSYM_UUID="$(dwarfdump --arch "${ARCH}" --uuid "${DSYM_BUNDLE}" | awk '{print $2}')"
- EXE_UUID="$(dwarfdump --arch "${ARCH}" --uuid "${EXECUTABLE}" | awk '{print $2}')"
- if ((VERBOSE > 1)); then
- xcnote "dSYM bundle UUID: ${DSYM_UUID}"
- xcnote "Executable UUID: ${EXE_UUID}"
- fi
- if [[ "${DSYM_UUID}" != "${EXE_UUID}" ]]; then
- xcdebug "Current dSYM bundle is not valid."
- unset DSYM_BUNDLE
- fi
- fi
-
- if [[ ! -d "${DSYM_BUNDLE}" ]]; then
- xcdebug "Extracting dSYM from executable."
- fcr_mktempdir TMP_DSYM
- DSYM_BUNDLE="${TMP_DSYM}/${EXECUTABLE##*/}.dSYM"
- xcrun dsymutil -o "${DSYM_BUNDLE}" "${EXECUTABLE}"
- STATUS=$?
- if ((STATUS)); then
- xcerror "Command dsymutil failed with exit code ${STATUS}."
- exit ${STATUS}
- fi
- fi
-
- "${FCR_DUMP_SYMS}" -a "${ARCH}" -g "${DSYM_BUNDLE}" "${EXECUTABLE}" >"${SCRATCH}" 2> >(sed -e 's/^/warning: dump_syms: /' | grep -v 'failed to demangle' >&2)
-
- STATUS=$?
- if ((STATUS)); then
- xcerror "Command dump_syms failed with exit code ${STATUS}."
- exit ${STATUS}
- fi
-
- ${SWIFT_DEMANGLE_COMMAND} <"${SCRATCH}" >|"${!SYMBOL_FILE}" || exit 1
-
- if ((VERBOSE >= 2)); then
- xcnote "${EXECUTABLE##*/} (architecture ${ARCH}) symbol dump follows (first 20 lines):"
- head >&2 -n20 "${!SYMBOL_FILE}"
- elif ((VERBOSE >= 1)); then
- xcnote "${EXECUTABLE##*/} (architecture ${ARCH}) symbol dump follows (first line only):"
- head >&2 -n1 "${!SYMBOL_FILE}"
- fi
-
- fcr_upload_files "${!SYMBOL_FILE}" || exit 1
-done
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym-util.bash b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym-util.bash
deleted file mode 100644
index a8f8c655..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym-util.bash
+++ /dev/null
@@ -1,382 +0,0 @@
-# Output a clickable message. This will not count as a warning or
-# error.
-
-xcnote () {
- echo >&2 "${BASH_SOURCE[1]}:${BASH_LINENO[0]}: note: $*"
-}
-
-# Output a clickable message prefixed with a warning symbol (U+26A0)
-# and highlighted yellow. This will increase the overall warning
-# count. A non-zero value for the variable ERRORS_ONLY will force
-# warnings to be treated as errors.
-
-if ((ERRORS_ONLY)); then
- xcwarning () {
- echo >&2 "${BASH_SOURCE[1]}:${BASH_LINENO[0]}: error: $*"
- }
-else
- xcwarning () {
- echo >&2 "${BASH_SOURCE[1]}:${BASH_LINENO[0]}: warning: $*"
- }
-fi
-
-# Output a clickable message prefixed with a halt symbol (U+1F6D1) and
-# highlighted red. This will increase the overall error count. Xcode
-# will flag the build as failed if the error count is non-zero at the
-# end of the build, even if this script returns a successful exit
-# code. Set WARNINGS_ONLY to non-zero to prevent this.
-
-if ((WARNINGS_ONLY)); then
- xcerror () {
- echo >&2 "${BASH_SOURCE[1]}:${BASH_LINENO[0]}: warning: $*"
- }
-else
- xcerror () {
- echo >&2 "${BASH_SOURCE[1]}:${BASH_LINENO[0]}: error: $*"
- }
-fi
-
-xcdebug () {
- if ((VERBOSE)); then
- echo >&2 "${BASH_SOURCE[1]}:${BASH_LINENO[0]}: note: $*"
- fi
-}
-
-# Locate the script directory.
-
-script_dir () {
- local SCRIPT="$0" SCRIPT_DIR="$(dirname "$0")"
-
- while SCRIPT="$(readlink "${SCRIPT}")"; do
- [[ "${SCRIPT}" != /* ]] && SCRIPT="${SCRIPT_DIR}/${SCRIPT}"
- SCRIPT_DIR="$(dirname "${SCRIPT}")"
- done
-
- ( cd "${SCRIPT_DIR}"; pwd -P )
-}
-
-# Timestamp needed for various operations. Does not need to be exact,
-# but does need to be consistent across web service calls.
-
-readonly NOW="$(/bin/date +%s)"
-
-# All files created by fcr_mktemp will be listed in FCR_TEMPORARY_FILES.
-# Delete these when the enclosing script exits. (You may manually
-# add files to this array as well to have them cleaned up on exit.)
-
-typeset -a FCR_TEMPORARY_FILES
-trap 'STATUS=$?; rm -rf "${FCR_TEMPORARY_FILES[@]}"; exit ${STATUS}' 0 1 2 15
-
-# Create a temporary file and add it to the list of files to delete when the
-# script finishes.
-#
-# usage: fcr_mktemp VARNAME...
-
-fcr_mktemp () {
- for VAR; do
- eval "${VAR}=\$(mktemp -t com.google.FIRCrash) || return 1"
- FCR_TEMPORARY_FILES+=("${!VAR}")
- done
-}
-
-# Create a temporary directory and add it to the list of files to
-# delete when the script finishes.
-#
-# usage: fcr_mktempdir VARNAME...
-
-fcr_mktempdir () {
- for VAR; do
- eval "${VAR}=\$(mktemp -d -t com.google.FIRCrash) || return 1"
- FCR_TEMPORARY_FILES+=("${!VAR}")
- done
-}
-
-# The keys we care about in the JSON objects. There are others that
-# we do not use. Note that 'expires_at' and 'app_id' are not part of
-# the original payload, but are computed from the environment used to
-# make the call.
-
-FCR_SVC_KEYS=(client_email private_key private_key_id token_uri type)
-FCR_TOK_KEYS=(access_token expires_at token_type app_id)
-
-# Extract a value from the property list.
-#
-# usage: property *name* *file*
-
-property () {
- [[ -f "$2" ]] || echo '{}' >|"$2" # keeps PlistBuddy quiet
- /usr/libexec/PlistBuddy "$2" -c "Print :$1" 2>/dev/null
-}
-
-# Retrieve the property from the service account property list.
-#
-# usage: svc_property *name*
-
-svc_property () {
- property "$1" "${SVC_PLIST}"
-}
-
-# Does the same as svc_property above but for the token cache
-# property list.
-#
-# usage: tok_property *name*
-
-tok_property () {
- property "$1" "${TOK_PLIST}"
-}
-
-# Verify that the service account property list has values for the
-# required keys. Does not check the values themselves.
-
-fcr_verify_svc_plist () {
- for key in "${FCR_SVC_KEYS[@]}"; do
- if ! svc_property "${key}" >/dev/null; then
- xcdebug "${key} not found in ${SVC_PLIST}. Service account invalid."
- return 1
- fi
- done
-}
-
-# Verify that the token cache property list has values for the
-# required keys. If the token_type is incorrect, the expiration date
-# has been passed, or the application id does not match, return
-# failure.
-
-fcr_verify_tok_plist () {
- for key in "${FCR_TOK_KEYS[@]}"; do
- if ! tok_property "${key}" >/dev/null; then
- xcdebug "${key} not found in ${TOK_PLIST}. Token invalid."
- return 1
- fi
- done
-
- if [[ "$(tok_property token_type)" != "Bearer" ]]; then
- xcwarning "Invalid token type '$(tok_property token_type)'."
- return 1
- fi
-
- if (($(tok_property expires_at) <= NOW)); then
- xcdebug "Token well-formed but expired at $(date -jf %s "$(tok_property expires_at)")."
- echo '{}' >|"${TOK_PLIST}"
- return 1
- fi
-
- if [[ "$(tok_property app_id)" != "${FIREBASE_APP_ID}" ]]; then
- xcdebug "Cached token is for a different application."
- echo '{}' >|"${TOK_PLIST}"
- return 1
- fi
-}
-
-# Convert a JSON certificate file to a PList certificate file.
-#
-# usage: fcr_load_certificate VARNAME
-
-fcr_load_certificate () {
- : "${SERVICE_ACCOUNT_FILE:?must be the path to the service account JSON file.}"
- fcr_mktemp "$1"
-
- if ! /usr/bin/plutil -convert binary1 "${SERVICE_ACCOUNT_FILE}" -o "${!1}"; then
- xcerror "Unable to read service account file ${SERVICE_ACCOUNT_FILE}."
- return 2
- fi
-}
-
-# BASE64URL uses a sligtly different character set than BASE64, and
-# uses no padding characters.
-
-function base64url () {
- /usr/bin/base64 | sed -e 's/=//g; s/+/-/g; s/\//_/g'
-}
-
-# Assemble the JSON Web Token (RFC 1795)
-#
-# usage: fcr_create_jwt *client-email* *token-uri*
-
-fcr_create_jwt () {
- local JWT_HEADER="$(base64url <<<'{"alg":"RS256","typ":"JWT"}')"
- local JWT_CLAIM="$(base64url <<<'{'"\"iss\":\"${1:?}\",\"aud\":\"${2:?}\",\"exp\":\"$((NOW + 3600))\",\"iat\":\"${NOW}\",\"scope\":\"https://www.googleapis.com/auth/mobilecrashreporting\""'}')"
- local JWT_BODY="${JWT_HEADER}.${JWT_CLAIM}"
- local JWT_SIG="$(echo -n "${JWT_BODY}" | openssl dgst -sha256 -sign <(svc_property private_key) -binary | base64url)"
-
- echo "${JWT_BODY}.${JWT_SIG}"
-}
-
-# Set the BEARER_TOKEN variable for authentication.
-#
-# usage: fcr_authenticate
-
-fcr_authenticate () {
- : "${FIREBASE_APP_ID:?required to select authentication credentials}"
-
- local SVC_PLIST
-
- fcr_load_certificate SVC_PLIST || return 2
-
- local TOK_PLIST="${HOME}/Library/Preferences/com.google.SymbolUploadToken.plist"
-
- if ((VERBOSE > 2)); then
- CURLOPT='--trace-ascii /dev/fd/2'
- elif ((VERBOSE > 1)); then
- CURLOPT='--verbose'
- else
- CURLOPT=''
- fi
-
- # If the token will expire in the next sixty seconds (or already
- # has), reload it.
- if ! fcr_verify_tok_plist; then
- xcdebug "Token cannot be used. Requesting OAuth2 token using installed credentials."
-
- if ! fcr_verify_svc_plist; then
- xcerror "Incorrect/incomplete service account file."
- return 2
- else
- xcdebug "Certificate information appears valid."
- fi
-
- TOKEN_URI="$(svc_property token_uri)"
- CLIENT_EMAIL="$(svc_property client_email)"
-
- # Assemble the JSON Web Token (RFC 1795)
- local JWT="$(fcr_create_jwt "${CLIENT_EMAIL}" "${TOKEN_URI}")"
-
- fcr_mktemp TOKEN_JSON
-
- HTTP_STATUS="$(curl ${CURLOPT} -o "${TOKEN_JSON}" -s -d grant_type='urn:ietf:params:oauth:grant-type:jwt-bearer' -d assertion="${JWT}" -w '%{http_code}' "${TOKEN_URI}")"
-
- if [[ "${HTTP_STATUS}" == 403 ]]; then
- xcerror "Invalid certificate. Unable to retrieve OAuth2 token."
- return 2
- elif [[ "${HTTP_STATUS}" != 200 ]]; then
- cat >&2 "${TOKEN_JSON}"
- return 2
- fi
-
- # Store the token in the preferences directory for future use.
- /usr/bin/plutil -convert binary1 "${TOKEN_JSON}" -o "${TOK_PLIST}"
-
- EXPIRES_IN="$(tok_property expires_in)"
- EXPIRES_AT="$((EXPIRES_IN + NOW))"
-
- /usr/libexec/PlistBuddy \
- -c "Add :app_id string \"${FIREBASE_APP_ID}\"" \
- -c "Add :expires_at integer ${EXPIRES_AT}" \
- -c "Add :expiration_date date $(TZ=GMT date -jf %s ${EXPIRES_AT})" \
- "${TOK_PLIST}"
-
- if ! fcr_verify_tok_plist; then
- ((VERBOSE)) && /usr/libexec/PlistBuddy -c 'Print' "${TOK_PLIST}"
-
- echo '{}' >|"${TOK_PLIST}"
- xcwarning "Token returned is not valid."
- xcnote "If this error persists, download a fresh certificate."
-
- return 2
- fi
- else
- xcdebug "Token still valid."
- EXPIRES_AT="$(tok_property expires_at)"
- fi
-
- xcdebug "Token will expire on $(date -jf %s "${EXPIRES_AT}")."
- xcdebug "Using service account with key $(svc_property private_key_id)."
-
- BEARER_TOKEN="$(tok_property access_token)"
-
- if [[ ! "${BEARER_TOKEN}" ]]; then
- if ((VERBOSE)); then
- xcwarning "Current malformed token cache:"
- tok_property | while read; do xcnote "${REPLY}"; done
- fi
- xcerror "Unable to retrieve authentication token from server."
- return 2
- fi
-
- return 0
-}
-
-# Upload the files to the server.
-#
-# Arguments: Names of files to upload.
-
-fcr_upload_files() {
- fcr_authenticate || return $?
-
- : "${FCR_PROD_VERS:?}"
- : "${FCR_BUNDLE_ID:?}"
- : "${FIREBASE_APP_ID:?}"
- : "${FIREBASE_API_KEY:?}"
- : "${FCR_BASE_URL:=https://mobilecrashreporting.googleapis.com}"
-
- fcr_mktemp FILE_UPLOAD_LOCATION_PLIST META_UPLOAD_RESULT_PLIST
-
- if ((VERBOSE > 2)); then
- CURLOPT='--trace-ascii /dev/fd/2'
- elif ((VERBOSE > 1)); then
- CURLOPT='--verbose'
- else
- CURLOPT=''
- fi
-
- for FILE; do
- xcdebug "Get signed URL for uploading."
-
- URL="${FCR_BASE_URL}/v1/apps/${FIREBASE_APP_ID}"
-
- HTTP_STATUS="$(curl ${CURLOPT} -o "${FILE_UPLOAD_LOCATION_PLIST}" -sL -H "X-Ios-Bundle-Identifier: ${FCR_BUNDLE_ID}" -H "Authorization: Bearer ${BEARER_TOKEN}" -X POST -d '' -w '%{http_code}' "${URL}/symbolFileUploadLocation?key=${FIREBASE_API_KEY}")"
- STATUS=$?
-
- if [[ "${STATUS}" == 22 && "${HTTP_STATUS}" == 403 ]]; then
- xcerror "Unable to access resource. Token invalid."
- xcnote "Please verify the service account file."
- return 2
- elif [[ "${STATUS}" != 0 ]]; then
- xcerror "curl exited with non-zero status ${STATUS}."
- ((STATUS == 22)) && xcerror "HTTP response code is ${HTTP_STATUS}."
- return 2
- fi
-
- /usr/bin/plutil -convert binary1 "${FILE_UPLOAD_LOCATION_PLIST}" || return 1
-
- UPLOAD_KEY="$(property uploadKey "${FILE_UPLOAD_LOCATION_PLIST}")"
- UPLOAD_URL="$(property uploadUrl "${FILE_UPLOAD_LOCATION_PLIST}")"
- ERRMSG="$(property error:message "${FILE_UPLOAD_LOCATION_PLIST}")"
-
- if [[ "${ERRMSG}" ]]; then
- if ((VERBOSE)); then
- xcnote "Server response:"
- /usr/bin/plutil -p "${FILE_UPLOAD_LOCATION_PLIST}" >&2
- fi
- xcerror "symbolFileUploadLocation: ${ERRMSG}"
- xcnote "symbolFileUploadLocation: Failed to get upload location."
- return 1
- fi
-
- xcdebug "Upload symbol file."
-
- HTTP_STATUS=$(curl ${CURLOPT} -sfL -H 'Content-Type: text/plain' -H "Authorization: Bearer ${BEARER_TOKEN}" -w '%{http_code}' -T "${FILE}" "${UPLOAD_URL}")
- STATUS=$?
-
- if ((STATUS == 22)); then # exit code 22 is a non-successful HTTP response
- xcerror "upload: Unable to upload symbol file (HTTP Status ${HTTP_STATUS})."
- return 1
- elif ((STATUS != 0)); then
- xcerror "upload: Unable to upload symbol file (reason unknown)."
- return 1
- fi
-
- xcdebug "Upload metadata information."
-
- curl ${CURLOPT} -sL -H 'Content-Type: application/json' -H "X-Ios-Bundle-Identifier: ${FCR_BUNDLE_ID}" -H "Authorization: Bearer ${BEARER_TOKEN}" -X POST -d '{"upload_key":"'"${UPLOAD_KEY}"'","symbol_file_mapping":{"symbol_type":2,"app_version":"'"${FCR_PROD_VERS}"'"}}' "${URL}/symbolFileMappings:upsert?key=${FIREBASE_API_KEY}" >|"${META_UPLOAD_RESULT_PLIST}" || return 1
- /usr/bin/plutil -convert binary1 "${META_UPLOAD_RESULT_PLIST}" || return 1
-
- ERRMSG="$(property error:message "${META_UPLOAD_RESULT_PLIST}")"
-
- if [[ "${ERRMSG}" ]]; then
- xcerror "symbolFileMappings:upsert: ${ERRMSG}"
- xcnote "symbolFileMappings:upsert: The metadata for the symbol file failed to update."
- return 1
- fi
- done
-}
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym.sh b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym.sh
deleted file mode 100755
index c0a34e38..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Crash/upload-sym.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-echo "$0:0: error: $0 has been removed. Please use upload-sym instead."
-exit 1
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Firebase.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Firebase.h
deleted file mode 100644
index 90798a6a..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Firebase.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#import <FirebaseAnalytics/FirebaseAnalytics.h>
-#import <FirebaseCore/FirebaseCore.h>
-
-#if !defined(__has_include)
- #error "Firebase.h won't import anything if your compiler doesn't support __has_include. Please \
- import the headers individually."
-#else
- #if __has_include(<FirebaseAppIndexing/FirebaseAppIndexing.h>)
- #import <FirebaseAppIndexing/FirebaseAppIndexing.h>
- #endif
-
- #if __has_include(<FirebaseAuth/FirebaseAuth.h>)
- #import <FirebaseAuth/FirebaseAuth.h>
- #endif
-
- #if __has_include(<FirebaseCrash/FirebaseCrash.h>)
- #import <FirebaseCrash/FirebaseCrash.h>
- #endif
-
- #if __has_include(<FirebaseDatabase/FirebaseDatabase.h>)
- #import <FirebaseDatabase/FirebaseDatabase.h>
- #endif
-
- #if __has_include(<FirebaseDynamicLinks/FirebaseDynamicLinks.h>)
- #import <FirebaseDynamicLinks/FirebaseDynamicLinks.h>
- #endif
-
- #if __has_include(<FirebaseInstanceID/FirebaseInstanceID.h>)
- #import <FirebaseInstanceID/FirebaseInstanceID.h>
- #endif
-
- #if __has_include(<FirebaseInvites/FirebaseInvites.h>)
- #import <FirebaseInvites/FirebaseInvites.h>
- #endif
-
- #if __has_include(<FirebaseMessaging/FirebaseMessaging.h>)
- #import <FirebaseMessaging/FirebaseMessaging.h>
- #endif
-
- #if __has_include(<FirebaseRemoteConfig/FirebaseRemoteConfig.h>)
- #import <FirebaseRemoteConfig/FirebaseRemoteConfig.h>
- #endif
-
- #if __has_include(<FirebaseStorage/FirebaseStorage.h>)
- #import <FirebaseStorage/FirebaseStorage.h>
- #endif
-
- #if __has_include(<GoogleMobileAds/GoogleMobileAds.h>)
- #import <GoogleMobileAds/GoogleMobileAds.h>
- #endif
-
-#endif // defined(__has_include)
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessaging b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessaging
deleted file mode 100755
index a0573d06..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessaging
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h
deleted file mode 100755
index a0ae2e90..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h
+++ /dev/null
@@ -1,227 +0,0 @@
-#import <Foundation/Foundation.h>
-
-/**
- * The completion handler invoked once the data connection with FIRMessaging is
- * established. The data connection is used to send a continous stream of
- * data and all the FIRMessaging data notifications arrive through this connection.
- * Once the connection is established we invoke the callback with `nil` error.
- * Correspondingly if we get an error while trying to establish a connection
- * we invoke the handler with an appropriate error object and do an
- * exponential backoff to try and connect again unless successful.
- *
- * @param error The error object if any describing why the data connection
- * to FIRMessaging failed.
- */
-typedef void(^FIRMessagingConnectCompletion)(NSError * __nullable error);
-
-/**
- * Notification sent when the upstream message has been delivered
- * successfully to the server. The notification object will be the messageID
- * of the successfully delivered message.
- */
-FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendSuccessNotification;
-
-/**
- * Notification sent when the upstream message was failed to be sent to the
- * server. The notification object will be the messageID of the failed
- * message. The userInfo dictionary will contain the relevant error
- * information for the failure.
- */
-FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendErrorNotification;
-
-/**
- * Notification sent when the Firebase messaging server deletes pending
- * messages due to exceeded storage limits. This may occur, for example, when
- * the device cannot be reached for an extended period of time.
- *
- * It is recommended to retrieve any missing messages directly from the
- * server.
- */
-FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingMessagesDeletedNotification;
-
-/**
- * @enum FIRMessagingError
- */
-typedef NS_ENUM(NSUInteger, FIRMessagingError) {
- /// Unknown error.
- FIRMessagingErrorUnknown = 0,
-
- /// FIRMessaging couldn't validate request from this client.
- FIRMessagingErrorAuthentication = 1,
-
- /// InstanceID service cannot be accessed.
- FIRMessagingErrorNoAccess = 2,
-
- /// Request to InstanceID backend timed out.
- FIRMessagingErrorTimeout = 3,
-
- /// No network available to reach the servers.
- FIRMessagingErrorNetwork = 4,
-
- /// Another similar operation in progress, bailing this one.
- FIRMessagingErrorOperationInProgress = 5,
-
- /// Some parameters of the request were invalid.
- FIRMessagingErrorInvalidRequest = 7,
-};
-
-/// Status for the downstream message received by the app.
-typedef NS_ENUM(NSInteger, FIRMessagingMessageStatus) {
- /// Unknown status.
- FIRMessagingMessageStatusUnknown,
- /// New downstream message received by the app.
- FIRMessagingMessageStatusNew,
-};
-
-/// Information about a downstream message received by the app.
-@interface FIRMessagingMessageInfo : NSObject
-
-/// The status of the downstream message
-@property(nonatomic, readonly, assign) FIRMessagingMessageStatus status;
-
-@end
-
-/**
- * A remote data message received by the app via FCM (not just the APNs interface).
- *
- * This is only for devices running iOS 10 or above. To support devices running iOS 9 or below, use
- * the local and remote notifications handlers defined in UIApplicationDelegate protocol.
- */
-@interface FIRMessagingRemoteMessage : NSObject
-
-/// The downstream message received by the application.
-@property(nonatomic, readonly, strong, nonnull) NSDictionary *appData;
-
-@end
-
-/**
- * A protocol to receive data message via FCM for devices running iOS 10 or above.
- *
- * To support devices running iOS 9 or below, use the local and remote notifications handlers
- * defined in UIApplicationDelegate protocol.
- */
-@protocol FIRMessagingDelegate <NSObject>
-
-/// The callback to handle data message received via FCM for devices running iOS 10 or above.
-- (void)applicationReceivedRemoteMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage;
-
-@end
-
-/**
- * Firebase Messaging lets you reliably deliver messages at no cost.
- *
- * To send or receive messages, the app must get a
- * registration token from FIRInstanceID. This token authorizes an
- * app server to send messages to an app instance.
- *
- * In order to receive FIRMessaging messages, declare `application:didReceiveRemoteNotification:`.
- *
- *
- */
-@interface FIRMessaging : NSObject
-
-/**
- * Delegate to handle remote data messages received via FCM for devices running iOS 10 or above.
- */
-@property(nonatomic, weak, nullable) id<FIRMessagingDelegate> remoteMessageDelegate;
-
-/**
- * FIRMessaging
- *
- * @return An instance of FIRMessaging.
- */
-+ (nonnull instancetype)messaging NS_SWIFT_NAME(messaging());
-
-/**
- * Unavailable. Use +messaging instead.
- */
-- (nonnull instancetype)init __attribute__((unavailable("Use +messaging instead.")));
-
-#pragma mark - Connect
-
-/**
- * Create a FIRMessaging data connection which will be used to send the data notifications
- * sent by your server. It will also be used to send ACKS and other messages based
- * on the FIRMessaging ACKS and other messages based on the FIRMessaging protocol.
- *
- *
- * @param handler The handler to be invoked once the connection is established.
- * If the connection fails we invoke the handler with an
- * appropriate error code letting you know why it failed. At
- * the same time, FIRMessaging performs exponential backoff to retry
- * establishing a connection and invoke the handler when successful.
- */
-- (void)connectWithCompletion:(nonnull FIRMessagingConnectCompletion)handler;
-
-/**
- * Disconnect the current FIRMessaging data connection. This stops any attempts to
- * connect to FIRMessaging. Calling this on an already disconnected client is a no-op.
- *
- * Call this before `teardown` when your app is going to the background.
- * Since the FIRMessaging connection won't be allowed to live when in background it is
- * prudent to close the connection.
- */
-- (void)disconnect;
-
-#pragma mark - Topics
-
-/**
- * Asynchronously subscribes to a topic.
- *
- * @param topic The name of the topic, for example, @"sports".
- */
-- (void)subscribeToTopic:(nonnull NSString *)topic;
-
-/**
- * Asynchronously unsubscribe from a topic.
- *
- * @param topic The name of the topic, for example @"sports".
- */
-- (void)unsubscribeFromTopic:(nonnull NSString *)topic;
-
-#pragma mark - Upstream
-
-/**
- * Sends an upstream ("device to cloud") message.
- *
- * The message is queued if we don't have an active connection.
- * You can only use the upstream feature if your FCM implementation
- * uses the XMPP server protocol.
- *
- * @param message Key/Value pairs to be sent. Values must be String, any
- * other type will be ignored.
- * @param to A string identifying the receiver of the message. For FCM
- * project IDs the value is `SENDER_ID@gcm.googleapis.com`.
- * @param messageID The ID of the message. This is generated by the application. It
- * must be unique for each message generated by this application.
- * It allows error callbacks and debugging, to uniquely identify
- * each message.
- * @param ttl The time to live for the message. In case we aren't able to
- * send the message before the TTL expires we will send you a
- * callback. If 0, we'll attempt to send immediately and return
- * an error if we're not connected. Otherwise, the message will
- * be queued. As for server-side messages, we don't return an error
- * if the message has been dropped because of TTL; this can happen
- * on the server side, and it would require extra communication.
- */
-- (void)sendMessage:(nonnull NSDictionary *)message
- to:(nonnull NSString *)receiver
- withMessageID:(nonnull NSString *)messageID
- timeToLive:(int64_t)ttl;
-
-#pragma mark - Analytics
-
-/**
- * Use this to track message delivery and analytics for messages, typically
- * when you receive a notification in `application:didReceiveRemoteNotification:`.
- * However, you only need to call this if you set the `FirebaseAppDelegateProxyEnabled`
- * flag to NO in your Info.plist. If `FirebaseAppDelegateProxyEnabled` is either missing
- * or set to YES in your Info.plist, the library will call this automatically.
- *
- * @param message The downstream message received by the application.
- *
- * @return Information about the downstream message.
- */
-- (nonnull FIRMessagingMessageInfo *)appDidReceiveMessage:(nonnull NSDictionary *)message;
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h
deleted file mode 100755
index ef49e7ff..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h
+++ /dev/null
@@ -1 +0,0 @@
-#import "FIRMessaging.h"
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap
deleted file mode 100755
index 80bc59c1..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,11 +0,0 @@
-framework module FirebaseMessaging {
- umbrella header "FirebaseMessaging.h"
- export *
- module * { export *}
- link "sqlite3"
- link "z"
- link framework "CoreGraphics"
- link framework "Foundation"
- link framework "SystemConfiguration"
- link framework "UIKit"
-} \ No newline at end of file
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/Protobuf.framework/Protobuf b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/Protobuf.framework/Protobuf
deleted file mode 100644
index 546e02ec..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/Messaging/Protobuf.framework/Protobuf
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/FirebaseRemoteConfig b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/FirebaseRemoteConfig
deleted file mode 100755
index 45637862..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/FirebaseRemoteConfig
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FIRRemoteConfig.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FIRRemoteConfig.h
deleted file mode 100755
index 395020ca..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FIRRemoteConfig.h
+++ /dev/null
@@ -1,224 +0,0 @@
-//
-// FIRRemoteConfig.h
-// Firebase Remote Config service SDK
-// Copyright 2016 Google Inc. All rights reserved.
-//
-#import <Foundation/Foundation.h>
-
-/// The Firebase Remote Config service default namespace, to be used if the API method does not
-/// specify a different namespace. Use the default namespace if configuring from the Google Firebase
-/// service.
-extern NSString *const __nonnull FIRNamespaceGoogleMobilePlatform;
-
-/// Key used to manage throttling in NSError user info when the refreshing of Remote Config
-/// parameter values (data) is throttled. The value of this key is the elapsed time since 1970,
-/// measured in seconds.
-extern NSString *const __nonnull FIRRemoteConfigThrottledEndTimeInSecondsKey;
-
-/// Indicates whether updated data was successfully fetched.
-typedef NS_ENUM(NSInteger, FIRRemoteConfigFetchStatus) {
- /// Config has never been fetched.
- FIRRemoteConfigFetchStatusNoFetchYet,
- /// Config fetch succeeded.
- FIRRemoteConfigFetchStatusSuccess,
- /// Config fetch failed.
- FIRRemoteConfigFetchStatusFailure,
- /// Config fetch was throttled.
- FIRRemoteConfigFetchStatusThrottled,
-};
-
-/// Remote Config error domain that handles errors when fetching data from the service.
-extern NSString *const __nonnull FIRRemoteConfigErrorDomain;
-/// Firebase Remote Config service fetch error.
-typedef NS_ENUM(NSInteger, FIRRemoteConfigError) {
- /// Unknown or no error.
- FIRRemoteConfigErrorUnknown = 8001,
- /// Frequency of fetch requests exceeds throttled limit.
- FIRRemoteConfigErrorThrottled = 8002,
- /// Internal error that covers all internal HTTP errors.
- FIRRemoteConfigErrorInternalError = 8003,
-};
-
-/// Enumerated value that indicates the source of Remote Config data. Data can come from
-/// the Remote Config service, the DefaultConfig that is available when the app is first installed,
-/// or a static initialized value if data is not available from the service or DefaultConfig.
-typedef NS_ENUM(NSInteger, FIRRemoteConfigSource) {
- FIRRemoteConfigSourceRemote, ///< The data source is the Remote Config service.
- FIRRemoteConfigSourceDefault, ///< The data source is the DefaultConfig defined for this app.
- FIRRemoteConfigSourceStatic, ///< The data doesn't exist, return a static initialized value.
-};
-
-/// Completion handler invoked by fetch methods when they get a response from the server.
-///
-/// @param status Config fetching status.
-/// @param error Error message on failure.
-typedef void (^FIRRemoteConfigFetchCompletion)(FIRRemoteConfigFetchStatus status,
- NSError *__nullable error);
-
-#pragma mark - FIRRemoteConfigValue
-/// This class provides a wrapper for Remote Config parameter values, with methods to get parameter
-/// values as different data types.
-@interface FIRRemoteConfigValue : NSObject<NSCopying>
-/// Gets the value as a string.
-@property(nonatomic, readonly, nullable) NSString *stringValue;
-/// Gets the value as a number value.
-@property(nonatomic, readonly, nullable) NSNumber *numberValue;
-/// Gets the value as a NSData object.
-@property(nonatomic, readonly, nonnull) NSData *dataValue;
-/// Gets the value as a boolean.
-@property(nonatomic, readonly) BOOL boolValue;
-/// Identifies the source of the fetched value.
-@property(nonatomic, readonly) FIRRemoteConfigSource source;
-@end
-
-#pragma mark - FIRRemoteConfigSettings
-/// Firebase Remote Config settings.
-@interface FIRRemoteConfigSettings : NSObject
-/// Indicates whether Developer Mode is enabled.
-@property(nonatomic, readonly) BOOL isDeveloperModeEnabled;
-/// Initializes FIRRemoteConfigSettings, which is used to set properties for custom settings. To
-/// make custom settings take effect, pass the FIRRemoteConfigSettings instance to the
-/// configSettings property of FIRRemoteConfig.
-- (nullable FIRRemoteConfigSettings *)initWithDeveloperModeEnabled:(BOOL)developerModeEnabled
- NS_DESIGNATED_INITIALIZER;
-@end
-
-#pragma mark - FIRRemoteConfig
-/// Firebase Remote Config class. The shared instance method +remoteConfig can be created and used
-/// to fetch, activate and read config results and set default config results.
-@interface FIRRemoteConfig : NSObject<NSFastEnumeration>
-/// Last successful fetch completion time.
-@property(nonatomic, readonly, strong, nullable) NSDate *lastFetchTime;
-/// Last fetch status. The status can be any enumerated value from FIRRemoteConfigFetchStatus.
-@property(nonatomic, readonly, assign) FIRRemoteConfigFetchStatus lastFetchStatus;
-/// Config settings are custom settings.
-@property(nonatomic, readwrite, strong, nonnull) FIRRemoteConfigSettings *configSettings;
-
-/// Returns the FIRRemoteConfig instance shared throughout your app. This singleton object contains
-/// the complete set of Remote Config parameter values available to the app, including the Active
-/// Config and Default Config. This object also caches values fetched from the Remote Config Server
-/// until they are copied to the Active Config by calling activateFetched.
-/// When you fetch values from the Remote Config Server using the default Firebase namespace
-/// service, you should use this class method to create a shared instance of the FIRRemoteConfig
-/// object to ensure that your app will function properly with the Remote Config Server and the
-/// Firebase service.
-+ (nonnull FIRRemoteConfig *)remoteConfig NS_SWIFT_NAME(remoteConfig());
-
-/// Unavailable. Use +remoteConfig instead.
-- (nonnull instancetype)init __attribute__((unavailable("Use +remoteConfig instead.")));
-
-#pragma mark - Fetch
-/// Fetches Remote Config data with a callback. Call activateFetched to make fetched data available
-/// to your app.
-/// @param completionHandler Fetch operation callback.
-- (void)fetchWithCompletionHandler:(nullable FIRRemoteConfigFetchCompletion)completionHandler;
-
-/// Fetches Remote Config data and sets a duration that specifies how long config data lasts.
-/// Call activateFetched to make fetched data available to your app.
-/// @param expirationDuration Duration that defines how long fetched config data is available, in
-/// seconds. When the config data expires, a new fetch is required.
-/// @param completionHandler Fetch operation callback.
-- (void)fetchWithExpirationDuration:(NSTimeInterval)expirationDuration
- completionHandler:(nullable FIRRemoteConfigFetchCompletion)completionHandler;
-
-#pragma mark - Apply
-/// Applies Fetched Config data to the Active Config, causing updates to the behavior and appearance
-/// of the app to take effect (depending on how config data is used in the app).
-/// Returns true if there was a Fetched Config, and it was activated.
-/// Returns false if no Fetched Config was found, or the Fetched Config was already activated.
-- (BOOL)activateFetched;
-
-#pragma mark - Get Config
-/// Enables access to configuration values by using object subscripting syntax.
-/// This is used to get the config value of the default namespace.
-/// <pre>
-/// // Example:
-/// FIRRemoteConfig *config = [FIRRemoteConfig remoteConfig];
-/// FIRRemoteConfigValue *value = config[@"yourKey"];
-/// BOOL b = value.boolValue;
-/// NSNumber *number = config[@"yourKey"].numberValue;
-/// </pre>
-- (nonnull FIRRemoteConfigValue *)objectForKeyedSubscript:(nonnull NSString *)key;
-
-/// Gets the config value of the default namespace.
-/// @param key Config key.
-- (nonnull FIRRemoteConfigValue *)configValueForKey:(nullable NSString *)key;
-
-/// Gets the config value of a given namespace.
-/// @param key Config key.
-/// @param aNamespace Config results under a given namespace.
-- (nonnull FIRRemoteConfigValue *)configValueForKey:(nullable NSString *)key
- namespace:(nullable NSString *)aNamespace;
-
-/// Gets the config value of a given namespace and a given source.
-/// @param key Config key.
-/// @param aNamespace Config results under a given namespace.
-/// @param source Config value source.
-- (nonnull FIRRemoteConfigValue *)configValueForKey:(nullable NSString *)key
- namespace:(nullable NSString *)aNamespace
- source:(FIRRemoteConfigSource)source;
-
-/// Gets all the parameter keys from a given source and a given namespace.
-///
-/// @param source The config data source.
-/// @param aNamespace The config data namespace.
-/// @return An array of keys under the given source and namespace.
-- (nonnull NSArray<NSString *> *)allKeysFromSource:(FIRRemoteConfigSource)source
- namespace:(nullable NSString *)aNamespace;
-
-/// Returns the set of parameter keys that start with the given prefix, from the default namespace
-/// in the active config.
-///
-/// @param prefix The key prefix to look for. If prefix is nil or empty, returns all the
-/// keys.
-/// @return The set of parameter keys that start with the specified prefix.
-- (nonnull NSSet<NSString *> *)keysWithPrefix:(nullable NSString *)prefix;
-
-/// Returns the set of parameter keys that start with the given prefix, from the given namespace in
-/// the active config.
-///
-/// @param prefix The key prefix to look for. If prefix is nil or empty, returns all the
-/// keys in the given namespace.
-/// @param aNamespace The namespace in which to look up the keys. If the namespace is invalid,
-/// returns an empty set.
-/// @return The set of parameter keys that start with the specified prefix.
-- (nonnull NSSet<NSString *> *)keysWithPrefix:(nullable NSString *)prefix
- namespace:(nullable NSString *)aNamespace;
-
-#pragma mark - Defaults
-/// Sets config defaults for parameter keys and values in the default namespace config.
-///
-/// @param defaultConfig A dictionary mapping a NSString * key to a NSObject * value.
-- (void)setDefaults:(nullable NSDictionary<NSString *, NSObject *> *)defaults;
-
-/// Sets config defaults for parameter keys and values in the default namespace config.
-///
-/// @param defaultConfig A dictionary mapping a NSString * key to a NSObject * value.
-/// @param aNamespace Config under a given namespace.
-- (void)setDefaults:(nullable NSDictionary<NSString *, NSObject *> *)defaultConfig
- namespace:(nullable NSString *)aNamespace;
-
-/// Sets default configs from plist for default namespace;
-/// @param fileName The plist file name, with no file name extension. For example, if the plist file
-/// is defaultSamples.plist, call:
-/// [[FIRRemoteConfig remoteConfig] setDefaultsFromPlistFileName:@"defaultSamples"];
-- (void)setDefaultsFromPlistFileName:(nullable NSString *)fileName;
-
-/// Sets default configs from plist for a given namespace;
-/// @param fileName The plist file name, with no file name extension. For example, if the plist file
-/// is defaultSamples.plist, call:
-/// [[FIRRemoteConfig remoteConfig] setDefaultsFromPlistFileName:@"defaultSamples"];
-/// @param aNamespace The namespace where the default config is set.
-- (void)setDefaultsFromPlistFileName:(nullable NSString *)fileName
- namespace:(nullable NSString *)aNamespace;
-
-/// Returns the default value of a given key and a given namespace from the default config.
-///
-/// @param key The parameter key of default config.
-/// @param aNamespace The namespace of default config.
-/// @return Returns the default value of the specified key and namespace. Returns
-/// nil if the key or namespace doesn't exist in the default config.
-- (nullable FIRRemoteConfigValue *)defaultValueForKey:(nullable NSString *)key
- namespace:(nullable NSString *)aNamespace;
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FirebaseRemoteConfig.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FirebaseRemoteConfig.h
deleted file mode 100755
index eedc4fce..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FirebaseRemoteConfig.h
+++ /dev/null
@@ -1 +0,0 @@
-#import "FIRRemoteConfig.h"
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Modules/module.modulemap b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Modules/module.modulemap
deleted file mode 100755
index a6627f5e..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,11 +0,0 @@
-framework module FirebaseRemoteConfig {
- umbrella header "FirebaseRemoteConfig.h"
- export *
- module * { export *}
- link "c++"
- link "sqlite3"
- link "z"
- link framework "CoreGraphics"
- link framework "Foundation"
- link framework "UIKit"
-} \ No newline at end of file
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/Protobuf.framework/Protobuf b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/Protobuf.framework/Protobuf
deleted file mode 100644
index 546e02ec..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/Firebase/RemoteConfig/Protobuf.framework/Protobuf
+++ /dev/null
Binary files differ
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/FirebasePlugin.h b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/FirebasePlugin.h
deleted file mode 100755
index 93542737..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/FirebasePlugin.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#import <Cordova/CDV.h>
-#import "AppDelegate.h"
-
-@interface FirebasePlugin : CDVPlugin
-+ (FirebasePlugin *) firebasePlugin;
-- (void)getInstanceId:(CDVInvokedUrlCommand*)command;
-- (void)getToken:(CDVInvokedUrlCommand*)command;
-- (void)grantPermission:(CDVInvokedUrlCommand*)command;
-- (void)hasPermission:(CDVInvokedUrlCommand*)command;
-- (void)setBadgeNumber:(CDVInvokedUrlCommand*)command;
-- (void)getBadgeNumber:(CDVInvokedUrlCommand*)command;
-- (void)subscribe:(CDVInvokedUrlCommand*)command;
-- (void)unsubscribe:(CDVInvokedUrlCommand*)command;
-- (void)unregister:(CDVInvokedUrlCommand*)command;
-- (void)onNotificationOpen:(CDVInvokedUrlCommand*)command;
-- (void)onTokenRefresh:(CDVInvokedUrlCommand*)command;
-- (void)sendNotification:(NSDictionary*)userInfo;
-- (void)sendToken:(NSString*)token;
-- (void)logEvent:(CDVInvokedUrlCommand*)command;
-- (void)setScreenName:(CDVInvokedUrlCommand*)command;
-- (void)setUserId:(CDVInvokedUrlCommand*)command;
-- (void)setUserProperty:(CDVInvokedUrlCommand*)command;
-- (void)fetch:(CDVInvokedUrlCommand*)command;
-- (void)activateFetched:(CDVInvokedUrlCommand*)command;
-- (void)getValue:(CDVInvokedUrlCommand*)command;
-@property (nonatomic, copy) NSString *notificationCallbackId;
-@property (nonatomic, copy) NSString *tokenRefreshCallbackId;
-@property (nonatomic, retain) NSMutableArray *notificationStack;
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/FirebasePlugin.m b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/FirebasePlugin.m
deleted file mode 100644
index 580fb760..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/FirebasePlugin.m
+++ /dev/null
@@ -1,331 +0,0 @@
-#import "FirebasePlugin.h"
-#import <Cordova/CDV.h>
-#import "AppDelegate.h"
-#import "Firebase.h"
-@import FirebaseInstanceID;
-@import FirebaseMessaging;
-@import FirebaseAnalytics;
-@import FirebaseRemoteConfig;
-
-#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
-@import UserNotifications;
-#endif
-
-#ifndef NSFoundationVersionNumber_iOS_9_x_Max
-#define NSFoundationVersionNumber_iOS_9_x_Max 1299
-#endif
-
-@implementation FirebasePlugin
-
-@synthesize notificationCallbackId;
-@synthesize tokenRefreshCallbackId;
-@synthesize notificationStack;
-
-static NSInteger const kNotificationStackSize = 10;
-static FirebasePlugin *firebasePlugin;
-
-+ (FirebasePlugin *) firebasePlugin {
- return firebasePlugin;
-}
-
-- (void)pluginInitialize {
- NSLog(@"Starting Firebase plugin");
- firebasePlugin = self;
-}
-
-// DEPRECATED - alias of getToken
-- (void)getInstanceId:(CDVInvokedUrlCommand *)command {
- CDVPluginResult *pluginResult;
-
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:
- [[FIRInstanceID instanceID] token]];
-
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-- (void)getToken:(CDVInvokedUrlCommand *)command {
- CDVPluginResult *pluginResult;
-
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:
- [[FIRInstanceID instanceID] token]];
-
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-- (void)hasPermission:(CDVInvokedUrlCommand *)command
-{
- BOOL enabled = NO;
- UIApplication *application = [UIApplication sharedApplication];
- if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) {
- enabled = application.currentUserNotificationSettings.types != UIUserNotificationTypeNone;
- } else {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- enabled = application.enabledRemoteNotificationTypes != UIRemoteNotificationTypeNone;
-#pragma GCC diagnostic pop
- }
-
- NSMutableDictionary* message = [NSMutableDictionary dictionaryWithCapacity:1];
- [message setObject:[NSNumber numberWithBool:enabled] forKey:@"isEnabled"];
- CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:message];
- [self.commandDelegate sendPluginResult:commandResult callbackId:command.callbackId];
-}
-- (void)grantPermission:(CDVInvokedUrlCommand *)command {
- if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max) {
- if ([[UIApplication sharedApplication]respondsToSelector:@selector(registerUserNotificationSettings:)]) {
- UIUserNotificationType notificationTypes =
- (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
- UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil];
- [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
- [[UIApplication sharedApplication] registerForRemoteNotifications];
- } else {
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
- #pragma GCC diagnostic pop
- }
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- return;
- }
-
-
-
- #if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
- BOOL isIOS10 = TRUE;
- #else
- BOOL isIOS10 = FALSE;
- #endif
-
-
- if ( !isIOS10 ) {
- [[UIApplication sharedApplication] registerForRemoteNotifications];
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- return;
- }
-
-
-
- // IOS 10
- UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert|UNAuthorizationOptionSound|UNAuthorizationOptionBadge;
- [[UNUserNotificationCenter currentNotificationCenter]
- requestAuthorizationWithOptions:authOptions
- completionHandler:^(BOOL granted, NSError * _Nullable error) {
-
- if ( ![NSThread isMainThread] ) {
- dispatch_sync(dispatch_get_main_queue(), ^{
- [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
- [[FIRMessaging messaging] setRemoteMessageDelegate:self];
- [[UIApplication sharedApplication] registerForRemoteNotifications];
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus: granted ? CDVCommandStatus_OK : CDVCommandStatus_ERROR];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- });
- }
- else {
- [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
- [[FIRMessaging messaging] setRemoteMessageDelegate:self];
- [[UIApplication sharedApplication] registerForRemoteNotifications];
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }
- }
- ];
-
- return;
-}
-
-- (void)setBadgeNumber:(CDVInvokedUrlCommand *)command {
- int number = [[command.arguments objectAtIndex:0] intValue];
-
- [self.commandDelegate runInBackground:^{
- [[UIApplication sharedApplication] setApplicationIconBadgeNumber:number];
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }];
-}
-
-- (void)getBadgeNumber:(CDVInvokedUrlCommand *)command {
- [self.commandDelegate runInBackground:^{
- long badge = [[UIApplication sharedApplication] applicationIconBadgeNumber];
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDouble:badge];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }];
-}
-
-- (void)subscribe:(CDVInvokedUrlCommand *)command {
- NSString* topic = [NSString stringWithFormat:@"/topics/%@", [command.arguments objectAtIndex:0]];
-
- [[FIRMessaging messaging] subscribeToTopic: topic];
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-- (void)unsubscribe:(CDVInvokedUrlCommand *)command {
- NSString* topic = [NSString stringWithFormat:@"/topics/%@", [command.arguments objectAtIndex:0]];
-
- [[FIRMessaging messaging] unsubscribeFromTopic: topic];
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-- (void)unregister:(CDVInvokedUrlCommand *)command {
- [[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error){
- if (error) {
- NSLog(@"Unable to delete instance");
- } else {
- NSString* currentToken = [[FIRInstanceID instanceID] token];
- if (currentToken != nil) {
- [self sendToken:currentToken];
- }
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }
- }];
-}
-
-- (void)onNotificationOpen:(CDVInvokedUrlCommand *)command {
- self.notificationCallbackId = command.callbackId;
-
- if (self.notificationStack != nil && [self.notificationStack count]) {
- for (NSDictionary *userInfo in self.notificationStack) {
- [self sendNotification:userInfo];
- }
- [self.notificationStack removeAllObjects];
- }
-}
-
-- (void)onTokenRefresh:(CDVInvokedUrlCommand *)command {
- self.tokenRefreshCallbackId = command.callbackId;
- NSString* currentToken = [[FIRInstanceID instanceID] token];
- if (currentToken != nil) {
- [self sendToken:currentToken];
- }
-}
-
-- (void)sendNotification:(NSDictionary *)userInfo {
- if (self.notificationCallbackId != nil) {
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:userInfo];
- [pluginResult setKeepCallbackAsBool:YES];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:self.notificationCallbackId];
- } else {
- if (!self.notificationStack) {
- self.notificationStack = [[NSMutableArray alloc] init];
- }
-
- // stack notifications until a callback has been registered
- [self.notificationStack addObject:userInfo];
-
- if ([self.notificationStack count] >= kNotificationStackSize) {
- [self.notificationStack removeLastObject];
- }
- }
-}
-
-- (void)sendToken:(NSString *)token {
- if (self.tokenRefreshCallbackId != nil) {
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:token];
- [pluginResult setKeepCallbackAsBool:YES];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:self.tokenRefreshCallbackId];
- }
-}
-
-- (void)logEvent:(CDVInvokedUrlCommand *)command {
- [self.commandDelegate runInBackground:^{
- NSString* name = [command.arguments objectAtIndex:0];
- NSDictionary* parameters = [command.arguments objectAtIndex:1];
-
- [FIRAnalytics logEventWithName:name parameters:parameters];
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }];
-}
-
-- (void)setScreenName:(CDVInvokedUrlCommand *)command {
- NSString* name = [command.arguments objectAtIndex:0];
-
- [FIRAnalytics setScreenName:name screenClass:NULL];
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-- (void)setUserId:(CDVInvokedUrlCommand *)command {
- [self.commandDelegate runInBackground:^{
- NSString* id = [command.arguments objectAtIndex:0];
-
- [FIRAnalytics setUserID:id];
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }];
-}
-
-- (void)setUserProperty:(CDVInvokedUrlCommand *)command {
- [self.commandDelegate runInBackground:^{
- NSString* name = [command.arguments objectAtIndex:0];
- NSString* value = [command.arguments objectAtIndex:1];
-
- [FIRAnalytics setUserPropertyString:value forName:name];
-
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }];
-}
-
-- (void)fetch:(CDVInvokedUrlCommand *)command {
- [self.commandDelegate runInBackground:^{
- FIRRemoteConfig* remoteConfig = [FIRRemoteConfig remoteConfig];
-
- if ([command.arguments count] > 0){
- int expirationDuration = [[command.arguments objectAtIndex:0] intValue];
-
- [remoteConfig fetchWithExpirationDuration:expirationDuration completionHandler:^(FIRRemoteConfigFetchStatus status, NSError * _Nullable error) {
- if (status == FIRRemoteConfigFetchStatusSuccess) {
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }
- }];
- } else {
- [remoteConfig fetchWithCompletionHandler:^(FIRRemoteConfigFetchStatus status, NSError * _Nullable error) {
- if (status == FIRRemoteConfigFetchStatusSuccess) {
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }
- }];
- }
- }];
-}
-
-- (void)activateFetched:(CDVInvokedUrlCommand *)command {
- [self.commandDelegate runInBackground:^{
- FIRRemoteConfig* remoteConfig = [FIRRemoteConfig remoteConfig];
- BOOL activated = [remoteConfig activateFetched];
- CDVPluginResult *pluginResult;
- if (activated) {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
- } else {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
- }
-
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }];
-}
-
-- (void)getValue:(CDVInvokedUrlCommand *)command {
- [self.commandDelegate runInBackground:^{
- NSString* key = [command.arguments objectAtIndex:0];
- FIRRemoteConfig* remoteConfig = [FIRRemoteConfig remoteConfig];
- NSString* value = remoteConfig[key].stringValue;
- CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:value];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
- }];
-}
-
-@end
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/GoogleService-Info.plist b/StoneIsland/plugins/cordova-plugin-firebase/src/ios/GoogleService-Info.plist
deleted file mode 100644
index 5516ebf3..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/src/ios/GoogleService-Info.plist
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-</dict>
-</plist> \ No newline at end of file
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/www/firebase-browser.js b/StoneIsland/plugins/cordova-plugin-firebase/www/firebase-browser.js
deleted file mode 100755
index 93e3936f..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/www/firebase-browser.js
+++ /dev/null
@@ -1,119 +0,0 @@
-exports.getInstanceId = function(success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.getToken = function(success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.onNotificationOpen = function(success, error) {
-};
-
-exports.onTokenRefresh = function(success, error) {
-};
-
-exports.grantPermission = function(success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.setBadgeNumber = function(number, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.getBadgeNumber = function(success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.subscribe = function(topic, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.unsubscribe = function(topic, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.logEvent = function(name, params, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.logError = function(message, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.setScreenName = function(name, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.setUserId = function(id, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.setUserProperty = function(name, value, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.activateFetched = function (success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.fetch = function (cacheExpirationSeconds, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.getByteArray = function (key, namespace, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.getValue = function (key, namespace, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.getInfo = function (success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.setConfigSettings = function (settings, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
-
-exports.setDefaults = function (defaults, namespace, success, error) {
- if (typeof success === 'function') {
- success();
- }
-};
diff --git a/StoneIsland/plugins/cordova-plugin-firebase/www/firebase.js b/StoneIsland/plugins/cordova-plugin-firebase/www/firebase.js
deleted file mode 100644
index cf67c884..00000000
--- a/StoneIsland/plugins/cordova-plugin-firebase/www/firebase.js
+++ /dev/null
@@ -1,121 +0,0 @@
-var exec = require('cordova/exec');
-
-exports.getInstanceId = function(success, error) {
- exec(success, error, "FirebasePlugin", "getInstanceId", []);
-};
-
-exports.getToken = function(success, error) {
- exec(success, error, "FirebasePlugin", "getToken", []);
-};
-
-exports.onNotificationOpen = function(success, error) {
- exec(success, error, "FirebasePlugin", "onNotificationOpen", []);
-};
-
-exports.onTokenRefresh = function(success, error) {
- exec(success, error, "FirebasePlugin", "onTokenRefresh", []);
-};
-
-exports.grantPermission = function(success, error) {
- exec(success, error, "FirebasePlugin", "grantPermission", []);
-};
-
-exports.hasPermission = function(success, error) {
- exec(success, error, "FirebasePlugin", "hasPermission", []);
-};
-
-exports.setBadgeNumber = function(number, success, error) {
- exec(success, error, "FirebasePlugin", "setBadgeNumber", [number]);
-};
-
-exports.getBadgeNumber = function(success, error) {
- exec(success, error, "FirebasePlugin", "getBadgeNumber", []);
-};
-
-exports.subscribe = function(topic, success, error) {
- exec(success, error, "FirebasePlugin", "subscribe", [topic]);
-};
-
-exports.unsubscribe = function(topic, success, error) {
- exec(success, error, "FirebasePlugin", "unsubscribe", [topic]);
-};
-
-exports.unregister = function(success, error) {
- exec(success, error, "FirebasePlugin", "unregister", []);
-};
-
-exports.logEvent = function(name, params, success, error) {
- exec(success, error, "FirebasePlugin", "logEvent", [name, params]);
-};
-
-exports.logError = function(message, success, error) {
- exec(success, error, "FirebasePlugin", "logError", [message]);
-};
-
-exports.setScreenName = function(name, success, error) {
- exec(success, error, "FirebasePlugin", "setScreenName", [name]);
-};
-
-exports.setUserId = function(id, success, error) {
- exec(success, error, "FirebasePlugin", "setUserId", [id]);
-};
-
-exports.setUserProperty = function(name, value, success, error) {
- exec(success, error, "FirebasePlugin", "setUserProperty", [name, value]);
-};
-
-exports.activateFetched = function (success, error) {
- exec(success, error, "FirebasePlugin", "activateFetched", []);
-};
-
-exports.fetch = function (cacheExpirationSeconds, success, error) {
- var args = [];
- if (typeof cacheExpirationSeconds === 'number') {
- args.push(cacheExpirationSeconds);
- } else {
- error = success;
- success = cacheExpirationSeconds;
- }
- exec(success, error, "FirebasePlugin", "fetch", args);
-};
-
-exports.getByteArray = function (key, namespace, success, error) {
- var args = [key];
- if (typeof namespace === 'string') {
- args.push(namespace);
- } else {
- error = success;
- success = namespace;
- }
- exec(success, error, "FirebasePlugin", "getByteArray", args);
-};
-
-exports.getValue = function (key, namespace, success, error) {
- var args = [key];
- if (typeof namespace === 'string') {
- args.push(namespace);
- } else {
- error = success;
- success = namespace;
- }
- exec(success, error, "FirebasePlugin", "getValue", args);
-};
-
-exports.getInfo = function (success, error) {
- exec(success, error, "FirebasePlugin", "getInfo", []);
-};
-
-exports.setConfigSettings = function (settings, success, error) {
- exec(success, error, "FirebasePlugin", "setConfigSettings", [settings]);
-};
-
-exports.setDefaults = function (defaults, namespace, success, error) {
- var args = [defaults];
- if (typeof namespace === 'string') {
- args.push(namespace);
- } else {
- error = success;
- success = namespace;
- }
- exec(success, error, "FirebasePlugin", "setDefaults", args);
-};
diff --git a/StoneIsland/plugins/fetch.json b/StoneIsland/plugins/fetch.json
index 4d0eafbb..13e90dc5 100755
--- a/StoneIsland/plugins/fetch.json
+++ b/StoneIsland/plugins/fetch.json
@@ -97,16 +97,6 @@
"is_top_level": true,
"variables": {}
},
- "phonegap-plugin-push": {
- "source": {
- "type": "registry",
- "id": "phonegap-plugin-push@1.9.2"
- },
- "is_top_level": true,
- "variables": {
- "SENDER_ID": "XXXXXXX"
- }
- },
"cordova-plugin-statusbar": {
"source": {
"type": "registry",
@@ -115,14 +105,6 @@
"is_top_level": true,
"variables": {}
},
- "cordova-plugin-firebase": {
- "source": {
- "type": "registry",
- "id": "cordova-plugin-firebase@0.1.24"
- },
- "is_top_level": true,
- "variables": {}
- },
"cordova-plugin-app-name": {
"source": {
"type": "registry",
@@ -132,5 +114,13 @@
"variables": {
"APP_NAME": "Stone Island"
}
+ },
+ "phonegap-plugin-push": {
+ "source": {
+ "type": "registry",
+ "id": "phonegap-plugin-push@2.0.0"
+ },
+ "is_top_level": true,
+ "variables": {}
}
} \ No newline at end of file
diff --git a/StoneIsland/plugins/ios.json b/StoneIsland/plugins/ios.json
index 7ac7caec..c354d0dc 100644
--- a/StoneIsland/plugins/ios.json
+++ b/StoneIsland/plugins/ios.json
@@ -7,6 +7,10 @@
"files": {}
},
"installed_plugins": {
+ "cordova-plugin-app-name": {
+ "APP_NAME": "Stone Island",
+ "PACKAGE_NAME": "us.okfoc.stoneisland"
+ },
"cordova-plugin-console": {
"PACKAGE_NAME": "us.okfoc.stoneisland"
},
@@ -32,6 +36,9 @@
"cordova-plugin-splashscreen": {
"PACKAGE_NAME": "us.okfoc.stoneisland"
},
+ "cordova-plugin-statusbar": {
+ "PACKAGE_NAME": "us.okfoc.stoneisland"
+ },
"cordova-plugin-whitelist": {
"PACKAGE_NAME": "us.okfoc.stoneisland"
},
@@ -42,17 +49,6 @@
"PACKAGE_NAME": "us.okfoc.stoneisland"
},
"phonegap-plugin-push": {
- "SENDER_ID": "XXXXXXX",
- "PACKAGE_NAME": "us.okfoc.stoneisland"
- },
- "cordova-plugin-statusbar": {
- "PACKAGE_NAME": "us.okfoc.stoneisland"
- },
- "cordova-plugin-firebase": {
- "PACKAGE_NAME": "us.okfoc.stoneisland"
- },
- "cordova-plugin-app-name": {
- "APP_NAME": "Stone Island",
"PACKAGE_NAME": "us.okfoc.stoneisland"
}
},
diff --git a/StoneIsland/plugins/phonegap-plugin-push/CHANGELOG.md b/StoneIsland/plugins/phonegap-plugin-push/CHANGELOG.md
index e46cdae8..1d66c3ac 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/CHANGELOG.md
+++ b/StoneIsland/plugins/phonegap-plugin-push/CHANGELOG.md
@@ -1,5 +1,587 @@
# Change Log
+## [v2.0.0-rc5](https://github.com/phonegap/phonegap-plugin-push/tree/v2.0.0-rc5) (2017-06-20)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v2.0.0-rc4...v2.0.0-rc5)
+
+- 2.0.0-rc5 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a5dfcb4e364a1b31d98d4b9683d9e4fe2e0e5d2d)
+- :bookmark: Bumping plugin version to 2.0.0-rc5 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4bb16bea611e9c472f34c3ede9a1a6d00a8e4c4d)
+- :arrow_up: Bump FCM to 11.0.1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/576135bf576be6e2cd183101d3d7219b4d297030)
+- :penguin: Issue #1796: Remove hook from 2.0.0 version [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/464636b9ae257afc712cfebcc1ed11425590c509)
+- :memo: Issue #1552: library not found for -lPods-Appname [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/95b23cdf5ae68faf714d63ac69cfe71ce7034dba)
+- :checkered_flag: Issue #1670: Subscribe and Unsubscribe for windows [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/228cdb4062f6019f878c456b89ef0685955ac7ed)
+- :memo: Issue #1760: fcmSandbox vs gcmSandbox [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/64562177a6d32f34b29f2a97fcc8846db9926a1c)
+- :bug: Issue #1785: plugin fails to install on windows using plugman [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/156adfc70e85a21cb9f3134de72781db405c5e07)
+- :memo: Issue #1767: Ionic 2 Android build fails with error (Can't find google-services.json file) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fa9625e7530f4c2280804fc0fcd52a7b7476e5eb)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6f98be137f997c2bbd32e5c192c1e928e4e1f2c9)
+
+## [v2.0.0-rc4](https://github.com/phonegap/phonegap-plugin-push/tree/v2.0.0-rc4) (2017-06-01)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v2.0.0-rc3...v2.0.0-rc4)
+
+- 2.0.0-rc4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/65f2e4c56b0ed440b8668986114c2c84b49e9c68)
+- :bookmark: Bumping plugin version to 2.0.0-rc4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4e887023484cb5d6dd92524e05a6490d22eb3974)
+- Update push.js [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a7cc5bdb8d149a3f6e7e9d918ecd9bb27c34009f)
+- :memo: Issue #1679: Please clarify the use of content-available in the payload doc [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/23f7965e26d48b43c09921138b1290a658a41528)
+- Update INSTALLATION.md (#1745) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f3e94bbc1dd79bf830a2342ce3d6ca0d0e1cf9a2)
+- Fixing 404 link to definition file [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9df6b4de82047a30b8322eb635c581de6c7252aa)
+- :bug::wrench: Issue #1744: The plugin installs npm in my local node_modules [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/06bb2b207848e2dc993c28052f3ad29bf84d88c4)
+- :bug: Issue #1725: Provide default for applicationServerKey [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d63bbe949edd21e86d886baf9aa00aab30f0ca95)
+- :wrench: use Node 4 on Travis [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2da999beffe2ef043767c8c979ca4e7ae7a069c6)
+- Fix INSTALLATION.md docs for v2.0.0 and Firebase Cloud Messaging (#1741) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/32ff975ea1318f6194ac01477ca563cfe4a0218a)
+- update FirebaseMessaging podspec (#1742) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1842f7ade4643ad733c18f80b0daa211147ab72c)
+- :art: Fix merge conflicts [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3efba512317119ea2d54473c7e164a6c24db3ca3)
+- Merge v2.0.x into master (#1736) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d07fdf031e052f9c457319e6aaa9d7bfb72d1224)
+- Fixes #1716 - Incomplete CocoaPods installation steps (#1738) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/525816cb0fd591b49f51b2844ac04e55397b6b8b)
+- docs updated (#1727) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4234bfe9dab6e9f72b2ff52c3a94287154d39229)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e7cbe6ea8c863b0096425836473f2fa05a0da048)
+- 1.10.4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ec7c3ea1fafbf3fafe502d278af218715aebb909)
+- :bookmark: Bumping plugin version to 1.10.4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b1efe1fa069c034aaf465e040300fd2884d46075)
+- :penguin::bug: Issue #1710: Notification message key overwritten [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/911a1d4fe5d3a05e0012ee8121464cfb8974ce23)
+- :penguin::bug: Issue #1710: Notification message key overwritten [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4eadccd93d6daa81a05396a93fdc2033a4c90b12)
+- :penguin: Fix issue #1663 by allowing message as the data payload key (#1666) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f8ac07399905fb9c6b0ab48139fa76066c5e190f)
+- [typo] Small fix to payload doc [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5a4a04b1be5a7dd30a9c577441b241767ec20500)
+- 2.0.0-rc3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b393a9d932aee66da277b404c2475cb77195d8d8)
+- :bookmark: Bumping plugin version to 2.0.0-rc3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8003110d0757107ad211cd0e0b9c175e60dcd7ed)
+- :package: update www/push.js [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c0a3a4c6d578b2ee14a82f167934ecc8a7672557)
+- :wrench: Update cordovaDependencies [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/969d546c3dc96efb59a226ee5df38de6e66e4de4)
+- :memo: update readme [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0cbb7a92946ac9febb5ac5960291928d539c0fe6)
+- :memo: Fix PAYLOAD.md regarding "drawable" directory name (#1711) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a27a62d6e346b1e61ffe2ffaae482461cf970c03)
+- Bump requirements [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/85e6419cbad124eaa3eac1c1c515aa684ccf4393)
+- Add resource-file way of copying google services files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/46ba2745f0ebc08cc3b12f9c51177247130b592c)
+- Merge branch 'v2.0.x' of https://github.com/phonegap/phonegap-plugin-push into v2.0.x [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a5c9e456ce333b3387b2e4412248cdf45d26334c)
+- Fixing package.json from failed merge/rebase. [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/974d2e218bcc8ab8ebf779ef18df74622702eb0e)
+- Remove hook and use resource-file tag to copy google services file [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/86763c7f2cc15eae39972e4137813edb5cd8b838)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9850b1b180c3b66f64edc1680d358a7b1df58b95)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/15a68ed070d611f0569c90adaa062099120a7817)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/784b7355a62490a5ce6229292213e22e671873c8)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9b9df30cf65a275c0d4727a2854b12792ec905a2)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/620af90cdda85f64aa65cc0fc0de051cb13980ba)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ee9ecc957d8961e2a0ae884f55ee5abc71652885)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c7545607bb23ea801f7a167d3408b112e4a6e812)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2ac7442de047ecedf4a6d2c66591889e14bdafc4)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5c2fc51055343467e51f6facbd690e71273cbac2)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d1b4f51fb2cd6e9ee8447fee0ce4a5e9eba0a52d)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0169587f198d0b44a06f408d803bbdac0fb1d079)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/38bd3581663ccd85b2daed7b9833571a4adbc99e)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9d5dbb196763e399d5177c0d4802ecc043cfc270)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/24f0a77bac10e0d8e4ff837a165a3d69c3447601)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2535a189caddba2a41f9e002930541c55360047d)
+- 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8aa6f717db7dd534c97ad559307d391788e13e47)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/740cfe2bda63548a0e9cbf62b1833a4945eb432f)
+- :apple::bug: Issue #1497: App crashes after refreshing when using FCM (v2) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/704b3635764700d5fc06f2e9c8c6a657ea4b7f29)
+- :pencil2: fixing error in CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/68b045e6e40cdf1d5b9ed84136bebdf5f7874b8a)
+- :memo: Using a newer version on the examples [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d8c4d002e4b6c6b399e5c5e5456012a121ee7b20)
+- :penguin::memo::bug: Issue #1470: Cannot install phonegap-plugin-push on master [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/632a4f1d87ff306bbc8920133e96b84125e44468)
+- :bug::apple::wrench: Fixing a merge issue where aps-environment was accidentally removed [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4fb78566b5ebbbf2f04268b91f9c8cbc7193601e)
+- :bug::penguin::memo::arrow_up: #1460: Build Issue Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e93f04a87763a762d581a18439b2de808fc81a2c)
+- :bug::apple: Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8f827a9678dac02887872bd7374fde1c40caeb90)
+- Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/64044115de796c52132e60719d5e93fc16594002)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d1f8f8e55af40a16129cdc362e179f0c7ef60bd0)
+- 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/05c52e22945c0405b76a6d10d837ae6b015e661b)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/600f6050a2c3899559148579c5bc32c1e56449fa)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2660a8620874d520e2f3f3217cf20ea369affada)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3f043c21a608fdea4436409b68fbcf2c822d6c0a)
+- :wrench: Add browser platform back for FCM branch [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/97a1615a79ab0317a5dae27b7124dbaec7bc71c7)
+- Pin FCM to 9.8.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e04b175c72d0680b3b618fdbcce80f9f9d470055)
+- Add empty google services plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d21632fd2acf90847c67b0c70f0b740ed3d367a7)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b41580f7476a34014ceb03976f25989f98cbde6a)
+- :memo: Update to using fcm-node [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f84574aeffc958b6ec152ca36c2ea595418e901c)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/326943dadc29fe662ce4925b8141960e31d78dd3)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b5c0156bb13a22e11cf6f174a7307e404ed6d154)
+- Refactor GCMIntentService to FCMService [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/006ca17a7482490fbbfc67faa88a4c60d81a49f4)
+- Fix topic subscription and unsubscription on FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/102934b167c4e69c9a6a5c7b41d0ca3fba0cfd25)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/bccc1ba887603b8577c01ee5b885bffa0d406028)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7fe0379c6be007817c21355044bcecdd05bcc301)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6c1a5572c420c88772bd3fc89d81fac21027a5be)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/98c100b12613a2885ed1afd417b1e678883d37ee)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7861fd27cd052c7e80736b8da9cba8cfae442e73)
+- Added .framework files as custom frameworks [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b3dc189600842c6a8e318b032bdf215ea1c9b81f)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ff2dbe0cc5a2dce0a92b6c16f35b1a67ce6a6f18)
+- Fixed empty token on android first run (#1008) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/50285f9193f5e6b33e63c2540b8f3c7a257a5221)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f67e30d41f5ea94a60a53b00ed51b995960f89c9)
+- Merge branch 'v2.0.x' of https://github.com/phonegap/phonegap-plugin-push into v2.0.x [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/96af63840f28a57d29e21a48cc52533fa0830bea)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7371f3b31ea7a672ec6d43da7ef9475916b6c5c5)
+- 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5099c8fe435bda7d8bc7b2648d078a3b63cf19ea)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/72d29bd4372e6043d38835d07839346ea204390a)
+- :apple::bug: Issue #1497: App crashes after refreshing when using FCM (v2) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c44be0628bb42ba7ee07456524e9b1fffae64aea)
+- :memo: Using a newer version on the examples [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/95cdee193d2977a17e778bf91ca1bcfc240dc266)
+- :penguin::memo::bug: Issue #1470: Cannot install phonegap-plugin-push on master [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a1fa7cce1168145c77fef2632ad64f8926e71d27)
+- :bug::apple::wrench: Fixing a merge issue where aps-environment was accidentally removed [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ef4c7e187f2c5f386d9c844ee7211c8ff1cc214c)
+- :bug::penguin::memo::arrow_up: #1460: Build Issue Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5d52fdaf28f0535ef6dab315abd67141b0fcd0f7)
+- :bug::apple: Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5d9dfdf179b39312a6382a48dd99d675e642a533)
+- Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/057cbd16f10581cd601079a9a10b9338df3c23eb)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/83238fce85413cdd192b5ff33139ba9a0bcd080f)
+- 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9ff3929bed6bff911027bef21168e527ff61fd2c)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/94d8cc7ec8ba3a4d466758ffb2c27104c2cc1ca3)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a837c875d8a30fc4175693dff43139569974ec22)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/49da4ea30af1a2fb479110074ddf5f67e2ba370c)
+- :wrench: Add browser platform back for FCM branch [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ebc5d9353bab3917f91c775cf13aec47c5ca1e04)
+- Pin FCM to 9.8.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/505c8da8253cb8562ed16659b5ec2a8e73ec1c23)
+- Add empty google services plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/46eafb1e5688ade278086a1644d06de4e36849b5)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f3b01f155f6300dc05c625116e0c374af61d6388)
+- :memo: Update to using fcm-node [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/453561c8f2dfc4ed09b6a182f6998c90408a3d44)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ba0020349337160f83271b683195693ef0b4f440)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/aee7b93a4d0b0bb0b9c987704c1cde82612e4445)
+- Refactor GCMIntentService to FCMService [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5e0e7d107b2c9f4aeeda3a7757213e41ac573798)
+- Fix topic subscription and unsubscription on FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/172528ea548174fd7be62d0ab2f9816566447a61)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2727d274ef650fb0b4d25786d42f0ee5f72e9730)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/697e592d8225f4e0853a0ea72a598d10a18c832d)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c2987cbee54f04e7d44eec421b2417be5e7d716e)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f358dba691fb39757003326209a232cefce53adf)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7b7de65c2718eccc1ff0eeb2800973cd440c85a7)
+- Added .framework files as custom frameworks [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8bf4343369e6b12f6ec28a104512cb3ab392e834)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3de63bdf9e5a365e3b3e295f2a305ad66b512917)
+- Fixed empty token on android first run (#1008) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b9ad4ebdeee6700d9edf95bf051dabda5923e01a)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c119bf08869d51d5fe23f9a0fb78fd8325b35248)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3a1806aaec5d3c76f7fcd30ddfd85d576fb6d197)
+- 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/471b2aa829cb0ecc93a9a788891602ad17319a47)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7ad471ff45724828fb21630fdfbc244ba037d9d8)
+- :apple::bug: Issue #1497: App crashes after refreshing when using FCM (v2) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b80dfb12b5053184936a4c6c881f1af55459348f)
+- :pencil2: fixing error in CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9796292910f2d600b22d4846c128196cfb54ba7c)
+- :memo: Using a newer version on the examples [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/297b8d28f2d7bf04420744c445e59a527c52d502)
+- :penguin::memo::bug: Issue #1470: Cannot install phonegap-plugin-push on master [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/41c8e66483fc0c5f21da7477d2522a2212a8017a)
+- :bug::apple::wrench: Fixing a merge issue where aps-environment was accidentally removed [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/08e496fffc7fa082410f7b16e73e6afe12da194c)
+- :bug::penguin::memo::arrow_up: #1460: Build Issue Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/156718a5800dfe4b87593e0732f4258c7c148bea)
+- :bug::apple: Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0add758d08657e22501612ed258033e31c394e6a)
+- Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1f2fd671ae734201b1260bc3d7878ae9ef28673c)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/70c6e04a3ba072b91b3752173ca2287d4e448b8f)
+- 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7e07d81dbb47babe161f3204cdd06222a1e2ab3c)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f3dffdcf63c3d19b4717eed89eb911b8aecdd25a)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f5182503b241f519c03c872ae12f3489383f2b83)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/27a101f1d35217e0a1b7f0be9ad0607d31ea6c57)
+- :wrench: Add browser platform back for FCM branch [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c25a47bd3b5c2437ce3108656449658568f2c053)
+- Pin FCM to 9.8.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/000bc36a8ce2a00e96212b66d69f1597dac68554)
+- Add empty google services plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/aa1cc247fcf8b94c4d60d26b18c9229c112e8185)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7f4bcafafe56be18f6dc64f3e634a6de594bc034)
+- :memo: Update to using fcm-node [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a3f0eee774c7f9791f55f85816b0aeadc5c4fb4c)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6c796a49c3a44b47f58237d7e7760f5ebc34c371)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/10c5153672dc478dd072274c220200526c313604)
+- Refactor GCMIntentService to FCMService [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/aa6e3ce5449accd5397b4eda8a950fd5cebc4f0e)
+- Fix topic subscription and unsubscription on FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b65fe745b5eabbb7437a46b46e747be4aaf5116a)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3b5f3c71657d8af3e4407ac9ea6c36e00988b1cf)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/89040874c530c7f86c2acbcce5c3b88b351e80fb)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a1e90013f8ca8497acc2513f4ce3df1358293d51)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0bc1ca736546242772516334f47fd4ea4f8f5e5f)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f7acf338d5bff2bc25b5c1e2fa681b7e20254cc9)
+- Added .framework files as custom frameworks [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a65be290d4176c1c0b51b700d673550ae22cf777)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ed630d481b9035eb9df48738c0e77029937fafe9)
+- Fixed empty token on android first run (#1008) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c9c53761fa3d6fc99acaa96601e9abc673a62c23)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6c46880b57aa1dee2bbcfeb5a86b497035f46ebe)
+
+## [v1.10.4](https://github.com/phonegap/phonegap-plugin-push/tree/v1.10.4) (2017-05-17)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.10.3...v1.10.4)
+
+- 1.10.4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ec7c3ea1fafbf3fafe502d278af218715aebb909)
+- :bookmark: Bumping plugin version to 1.10.4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b1efe1fa069c034aaf465e040300fd2884d46075)
+- :penguin::bug: Issue #1710: Notification message key overwritten [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/911a1d4fe5d3a05e0012ee8121464cfb8974ce23)
+- :penguin::bug: Issue #1710: Notification message key overwritten [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4eadccd93d6daa81a05396a93fdc2033a4c90b12)
+- :penguin: Fix issue #1663 by allowing message as the data payload key (#1666) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f8ac07399905fb9c6b0ab48139fa76066c5e190f)
+- [typo] Small fix to payload doc [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5a4a04b1be5a7dd30a9c577441b241767ec20500)
+- :memo: update readme [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0cbb7a92946ac9febb5ac5960291928d539c0fe6)
+- :memo: Fix PAYLOAD.md regarding "drawable" directory name (#1711) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a27a62d6e346b1e61ffe2ffaae482461cf970c03)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/cfad83fa420df5ba4ac12f2f3f7fa68fdb22cc03)
+
+## [v2.0.0-rc3](https://github.com/phonegap/phonegap-plugin-push/tree/v2.0.0-rc3) (2017-05-09)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v2.0.0-rc2...v2.0.0-rc3)
+
+- 2.0.0-rc3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b393a9d932aee66da277b404c2475cb77195d8d8)
+- :bookmark: Bumping plugin version to 2.0.0-rc3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8003110d0757107ad211cd0e0b9c175e60dcd7ed)
+- :package: update www/push.js [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c0a3a4c6d578b2ee14a82f167934ecc8a7672557)
+- :wrench: Update cordovaDependencies [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/969d546c3dc96efb59a226ee5df38de6e66e4de4)
+- Bump requirements [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/85e6419cbad124eaa3eac1c1c515aa684ccf4393)
+- Add resource-file way of copying google services files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/46ba2745f0ebc08cc3b12f9c51177247130b592c)
+- Merge branch 'v2.0.x' of https://github.com/phonegap/phonegap-plugin-push into v2.0.x [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a5c9e456ce333b3387b2e4412248cdf45d26334c)
+- Fixing package.json from failed merge/rebase. [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/974d2e218bcc8ab8ebf779ef18df74622702eb0e)
+- Remove hook and use resource-file tag to copy google services file [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/86763c7f2cc15eae39972e4137813edb5cd8b838)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9850b1b180c3b66f64edc1680d358a7b1df58b95)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/15a68ed070d611f0569c90adaa062099120a7817)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/784b7355a62490a5ce6229292213e22e671873c8)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9b9df30cf65a275c0d4727a2854b12792ec905a2)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/620af90cdda85f64aa65cc0fc0de051cb13980ba)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ee9ecc957d8961e2a0ae884f55ee5abc71652885)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c7545607bb23ea801f7a167d3408b112e4a6e812)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2ac7442de047ecedf4a6d2c66591889e14bdafc4)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5c2fc51055343467e51f6facbd690e71273cbac2)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d1b4f51fb2cd6e9ee8447fee0ce4a5e9eba0a52d)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0169587f198d0b44a06f408d803bbdac0fb1d079)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/38bd3581663ccd85b2daed7b9833571a4adbc99e)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9d5dbb196763e399d5177c0d4802ecc043cfc270)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/24f0a77bac10e0d8e4ff837a165a3d69c3447601)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2535a189caddba2a41f9e002930541c55360047d)
+- 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8aa6f717db7dd534c97ad559307d391788e13e47)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/740cfe2bda63548a0e9cbf62b1833a4945eb432f)
+- :apple::bug: Issue #1497: App crashes after refreshing when using FCM (v2) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/704b3635764700d5fc06f2e9c8c6a657ea4b7f29)
+- :pencil2: fixing error in CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/68b045e6e40cdf1d5b9ed84136bebdf5f7874b8a)
+- :memo: Using a newer version on the examples [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d8c4d002e4b6c6b399e5c5e5456012a121ee7b20)
+- :penguin::memo::bug: Issue #1470: Cannot install phonegap-plugin-push on master [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/632a4f1d87ff306bbc8920133e96b84125e44468)
+- :bug::apple::wrench: Fixing a merge issue where aps-environment was accidentally removed [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4fb78566b5ebbbf2f04268b91f9c8cbc7193601e)
+- :bug::penguin::memo::arrow_up: #1460: Build Issue Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e93f04a87763a762d581a18439b2de808fc81a2c)
+- :bug::apple: Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8f827a9678dac02887872bd7374fde1c40caeb90)
+- Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/64044115de796c52132e60719d5e93fc16594002)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d1f8f8e55af40a16129cdc362e179f0c7ef60bd0)
+- 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/05c52e22945c0405b76a6d10d837ae6b015e661b)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/600f6050a2c3899559148579c5bc32c1e56449fa)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2660a8620874d520e2f3f3217cf20ea369affada)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3f043c21a608fdea4436409b68fbcf2c822d6c0a)
+- :wrench: Add browser platform back for FCM branch [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/97a1615a79ab0317a5dae27b7124dbaec7bc71c7)
+- Pin FCM to 9.8.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e04b175c72d0680b3b618fdbcce80f9f9d470055)
+- Add empty google services plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d21632fd2acf90847c67b0c70f0b740ed3d367a7)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b41580f7476a34014ceb03976f25989f98cbde6a)
+- :memo: Update to using fcm-node [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f84574aeffc958b6ec152ca36c2ea595418e901c)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/326943dadc29fe662ce4925b8141960e31d78dd3)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b5c0156bb13a22e11cf6f174a7307e404ed6d154)
+- Refactor GCMIntentService to FCMService [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/006ca17a7482490fbbfc67faa88a4c60d81a49f4)
+- Fix topic subscription and unsubscription on FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/102934b167c4e69c9a6a5c7b41d0ca3fba0cfd25)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/bccc1ba887603b8577c01ee5b885bffa0d406028)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7fe0379c6be007817c21355044bcecdd05bcc301)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6c1a5572c420c88772bd3fc89d81fac21027a5be)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/98c100b12613a2885ed1afd417b1e678883d37ee)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7861fd27cd052c7e80736b8da9cba8cfae442e73)
+- Added .framework files as custom frameworks [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b3dc189600842c6a8e318b032bdf215ea1c9b81f)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ff2dbe0cc5a2dce0a92b6c16f35b1a67ce6a6f18)
+- Fixed empty token on android first run (#1008) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/50285f9193f5e6b33e63c2540b8f3c7a257a5221)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f67e30d41f5ea94a60a53b00ed51b995960f89c9)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/cfad83fa420df5ba4ac12f2f3f7fa68fdb22cc03)
+- 1.10.3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1e072b351056d453fd1c1d40d5fcac310f3e107c)
+- :bookmark: Bumping plugin version to 1.10.3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/29df66eae54e773925e25bd92299957e4d654723)
+- :bug: Handle null in getCircleBitmap (#1705) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3acdfa338d7a8b56ec4dc73c50aa9917ecb3be7c)
+- :shirt: Issue #1702: The logging tag can be at most 23 characters, was 40 (PushPlugin_BackgroundActionButtonHandler) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2045873acda2e81d54b2da87cd2d10f056bd90f9)
+- Shortened log tag PushPlugin_BackgroundActionButtonHandler to bring u… (#1703) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/dd707122b7aa78649fa6f5f73ba9b05436799926)
+- Merge branch 'v2.0.x' of https://github.com/phonegap/phonegap-plugin-push into v2.0.x [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/96af63840f28a57d29e21a48cc52533fa0830bea)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7371f3b31ea7a672ec6d43da7ef9475916b6c5c5)
+- 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5099c8fe435bda7d8bc7b2648d078a3b63cf19ea)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/72d29bd4372e6043d38835d07839346ea204390a)
+- :apple::bug: Issue #1497: App crashes after refreshing when using FCM (v2) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c44be0628bb42ba7ee07456524e9b1fffae64aea)
+- :memo: Using a newer version on the examples [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/95cdee193d2977a17e778bf91ca1bcfc240dc266)
+- :penguin::memo::bug: Issue #1470: Cannot install phonegap-plugin-push on master [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a1fa7cce1168145c77fef2632ad64f8926e71d27)
+- :bug::apple::wrench: Fixing a merge issue where aps-environment was accidentally removed [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ef4c7e187f2c5f386d9c844ee7211c8ff1cc214c)
+- :bug::penguin::memo::arrow_up: #1460: Build Issue Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5d52fdaf28f0535ef6dab315abd67141b0fcd0f7)
+- :bug::apple: Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5d9dfdf179b39312a6382a48dd99d675e642a533)
+- Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/057cbd16f10581cd601079a9a10b9338df3c23eb)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/83238fce85413cdd192b5ff33139ba9a0bcd080f)
+- 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9ff3929bed6bff911027bef21168e527ff61fd2c)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/94d8cc7ec8ba3a4d466758ffb2c27104c2cc1ca3)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a837c875d8a30fc4175693dff43139569974ec22)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/49da4ea30af1a2fb479110074ddf5f67e2ba370c)
+- :wrench: Add browser platform back for FCM branch [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ebc5d9353bab3917f91c775cf13aec47c5ca1e04)
+- Pin FCM to 9.8.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/505c8da8253cb8562ed16659b5ec2a8e73ec1c23)
+- Add empty google services plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/46eafb1e5688ade278086a1644d06de4e36849b5)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f3b01f155f6300dc05c625116e0c374af61d6388)
+- :memo: Update to using fcm-node [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/453561c8f2dfc4ed09b6a182f6998c90408a3d44)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ba0020349337160f83271b683195693ef0b4f440)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/aee7b93a4d0b0bb0b9c987704c1cde82612e4445)
+- Refactor GCMIntentService to FCMService [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5e0e7d107b2c9f4aeeda3a7757213e41ac573798)
+- Fix topic subscription and unsubscription on FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/172528ea548174fd7be62d0ab2f9816566447a61)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2727d274ef650fb0b4d25786d42f0ee5f72e9730)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/697e592d8225f4e0853a0ea72a598d10a18c832d)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c2987cbee54f04e7d44eec421b2417be5e7d716e)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f358dba691fb39757003326209a232cefce53adf)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7b7de65c2718eccc1ff0eeb2800973cd440c85a7)
+- Added .framework files as custom frameworks [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8bf4343369e6b12f6ec28a104512cb3ab392e834)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3de63bdf9e5a365e3b3e295f2a305ad66b512917)
+- Fixed empty token on android first run (#1008) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b9ad4ebdeee6700d9edf95bf051dabda5923e01a)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c119bf08869d51d5fe23f9a0fb78fd8325b35248)
+- :memo: Docs for interoperability with Firebase (#1693) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/cebb6403143047192462f30c22b9510a8c6dbe21)
+- fix headline (#1685) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e2e7993544eed544eb7286868b60e2e3efb6275d)
+- Fix changelog date [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3140b2b00388785f8056632376b50a1d1ef67b96)
+- :arrow_up: update pluginpub to 0.0.8 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/cfab7d91556a38ee81550fe47e13f2662ae810db)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/027ea2c17e4b96b848ab29046efea243e6e2da27)
+- 1.10.2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b5a7d4ec6e64abaed65de00be3e9bac9ab25791e)
+- :bookmark: Bumping plugin version to 1.10.2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5b700ad9927c401081a5de49f2a6a27ba0dfaa9a)
+- :arrow_up: update pluginpub to 0.0.7 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/38564ce55e53e018c91f4063d680eedd2631b825)
+- Fix the dates on the CHANGELOG (the last 2 version) (#1676) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c0f26192c906bfc1a60390333c96d5dc07433978)
+- Vapid Support (#1675) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/384b60bade628035b21d23f07e284eb6e1557a10)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/97d618fb53084cfae78f397def48df791131358f)
+- 1.10.1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6211e8c3df8881a90d19b111a0e63f890d435df6)
+- :bookmark: Bumping plugin version to 1.10.1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6d710a06681ad84c13273fe5d20feb3033ac67b6)
+- :bug: Issue #1655: App opens on clearing notification (Android) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ff417925f6d6678f0fcd8315d5f4b4b08fbb9085)
+- :memo: Issue #1118: Problem with notifications stacking [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d669c44a863d86d0bb73b5ae086bc2fe6f8113a9)
+- :memo: Issue #1220: [Question] the hook setting seem not work [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4ef137eea370da7c225ab2a5cf63b1e97a68f4a4)
+- Set get badge count android (#1644) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/630907cf3d8802bcd5d91b6bd768c989f6ef897a)
+- Add plugin typings from DefinitelyTyped (#1654) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6ea70d9984e176a75602e72e1d26f5404c519e29)
+- :arrow_up: Issue #1560: setApplicationIconBadgeNumber not working on Android but firing success function [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/700701fd2151667905d860228cf954301186721a)
+- :memo: Issue #1618: No notification when app is closed on Android, not at all on iOS [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7f64bf0ffbddf3ef20de2fe540ec2718be5d0c23)
+- :arrow_down: Issue #1560: setApplicationIconBadgeNumber not working on Android but firing success function [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e450fd7b623f27f27858a7537ec7950aa0f618b5)
+- :arrow_up: Issue #1560: setApplicationIconBadgeNumber not working on Android but firing success function [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4af3472263a5125cab6f08bbb59b83bf957144ec)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ed25a3e3ad9fb6f2af63fd07957944f974eafaa1)
+- 1.10.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6b9b862da8566c7717dfc79dd6b32d8a7e6774d8)
+- :bookmark: Bumping plugin version to 1.10.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/626e9615fbff6ea225569ab58353ac7f58aef495)
+- :heavy_plus_sign: update pluginpub version [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c3c8058ffee888447017eb5d8c0f4f30cbcd090f)
+- Issue #1464: Create round bitmap icon for large icon image passed in from local resource or url (#1635) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0dd0d468868f0b13c8d840c78dd89fca5920cd32)
+- Receive notification only from SENDER_ID (#1484) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a0d51e54aac39b8c58e4c67080f174c0228947c9)
+- Add no-cache flag to payload (#1620) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/42f8cefbd187c36534e6ab59b6611fb7f15b91f0)
+- Add dismiss key to on notification data (#1621) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4259bb3cacfe2561ed44e9f16bd74f8d5ae45ae2)
+- return true for old android versions, since AppOpsManager is available starting at 19 (#1634) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/945aa2ad6d266e82683e0bee86f53d258f2b31b6)
+- :art: remove reference to unused String [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/75f2191632a7a51eda7510a172ae6cc9d477acb9)
+- Ability to use custom keys to find message title and text on Android (#1604) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fd366296773906c91d5f8dfa3e8ba813c7c71b85)
+- :memo: Fixed URL of apples custom sound documentation (#1600) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8c93f8622eb1c453cb0c681158a07deca32bf200)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/409020c90edf04e0a37232cff8aadb070d4ccaa9)
+- 1.9.4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2241c7431cd60a68d2f35e7b4a5bfd797d5161b6)
+- Bumping plugin version to 1.9.4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ec47932bf8fdf9cd96db076fe56306ab230048d9)
+- Issue #1591: App crashes with the latest updates of Android SDK with plugin v-1.9.2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/514c21366ab37001ca323bec58261e023edaefd7)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3a218e4c68ebc1088461c2cfec966e57eaa24089)
+- 1.9.3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/42723d6609862aa950abce67b2a637736bdd9e99)
+- :bookmark: Bumping plugin version to 1.9.3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8f7b7dc003a2bc5bab7a316b0e2b0cf475c5a449)
+- :wrench: Add valid SPDX license expression [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4274d0759acd7110ed2592ed1d2ce3bf692711d3)
+- :memo: Issue #1587: v2.0.0-rc2: .on('notification') event not fired when background notification in Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7e90853a09a2c49f29e12eed03977b08b1295387)
+- :arrow_up: Issue #1560: setApplicationIconBadgeNumber not working on Android but firing success function [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3188a3907f50dcf625b7663ecf74ea9a9209d437)
+- :memo: Issue #1557: push.on('notification') not triggered - Ionic [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b91e9420fb68c4efc943cc5f8ecbd81274ffcbec)
+- :memo: Issue #1407: Uncaught (in promise): Error: Push plugin not found! [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/adf3eabb8871980d2dead7ecb8185ad0da1d6b46)
+- Corrected merges usage to prevent possible conflicts with other plugins (#1538) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/00c67cb2c85e97dfe4f7020f28ad4d954458599f)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3a1806aaec5d3c76f7fcd30ddfd85d576fb6d197)
+- 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/471b2aa829cb0ecc93a9a788891602ad17319a47)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7ad471ff45724828fb21630fdfbc244ba037d9d8)
+- :apple::bug: Issue #1497: App crashes after refreshing when using FCM (v2) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b80dfb12b5053184936a4c6c881f1af55459348f)
+- :pencil2: fixing error in CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/9796292910f2d600b22d4846c128196cfb54ba7c)
+- :memo: Using a newer version on the examples [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/297b8d28f2d7bf04420744c445e59a527c52d502)
+- :penguin::memo::bug: Issue #1470: Cannot install phonegap-plugin-push on master [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/41c8e66483fc0c5f21da7477d2522a2212a8017a)
+- :bug::apple::wrench: Fixing a merge issue where aps-environment was accidentally removed [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/08e496fffc7fa082410f7b16e73e6afe12da194c)
+- :bug::penguin::memo::arrow_up: #1460: Build Issue Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/156718a5800dfe4b87593e0732f4258c7c148bea)
+- :bug::apple: Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0add758d08657e22501612ed258033e31c394e6a)
+- Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1f2fd671ae734201b1260bc3d7878ae9ef28673c)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/70c6e04a3ba072b91b3752173ca2287d4e448b8f)
+- 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7e07d81dbb47babe161f3204cdd06222a1e2ab3c)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f3dffdcf63c3d19b4717eed89eb911b8aecdd25a)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f5182503b241f519c03c872ae12f3489383f2b83)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/27a101f1d35217e0a1b7f0be9ad0607d31ea6c57)
+- :wrench: Add browser platform back for FCM branch [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c25a47bd3b5c2437ce3108656449658568f2c053)
+- Pin FCM to 9.8.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/000bc36a8ce2a00e96212b66d69f1597dac68554)
+- Add empty google services plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/aa1cc247fcf8b94c4d60d26b18c9229c112e8185)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7f4bcafafe56be18f6dc64f3e634a6de594bc034)
+- :memo: Update to using fcm-node [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a3f0eee774c7f9791f55f85816b0aeadc5c4fb4c)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6c796a49c3a44b47f58237d7e7760f5ebc34c371)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/10c5153672dc478dd072274c220200526c313604)
+- Refactor GCMIntentService to FCMService [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/aa6e3ce5449accd5397b4eda8a950fd5cebc4f0e)
+- Fix topic subscription and unsubscription on FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b65fe745b5eabbb7437a46b46e747be4aaf5116a)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3b5f3c71657d8af3e4407ac9ea6c36e00988b1cf)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/89040874c530c7f86c2acbcce5c3b88b351e80fb)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a1e90013f8ca8497acc2513f4ce3df1358293d51)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0bc1ca736546242772516334f47fd4ea4f8f5e5f)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f7acf338d5bff2bc25b5c1e2fa681b7e20254cc9)
+- Added .framework files as custom frameworks [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a65be290d4176c1c0b51b700d673550ae22cf777)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ed630d481b9035eb9df48738c0e77029937fafe9)
+- Fixed empty token on android first run (#1008) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c9c53761fa3d6fc99acaa96601e9abc673a62c23)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6c46880b57aa1dee2bbcfeb5a86b497035f46ebe)
+- :penguin: android mixpanel pushnotification suport added (#1523) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/951cb6921a717d847c279ad6896c28772c70103f)
+- :memo: Making string replacement clearer [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/abdb656315bd4457c7ae43aaa52e2357df85d139)
+- :bug::penguin::memo: Issue #1433: Cordova Push V5 register () crashes App when initialized with topicList [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1d5723c81ad7a1e9d76fdce22161e8e8aa8da262)
+- :bug::penguin: Issue #1421: Notification delay caused by icon bitmap timeout [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fb4b533f2b31daebc7ed57c16228458def3d2af9)
+- :memo: Issue #1442: CocoaPods support vs requirement [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5912b1ea911fbe3b45a3a47ed005b7048a487ba6)
+- 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/67041a994d70fd3a04149003607b88947e8cc994)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7dea689ba17ebb901ee12da62801f051a99cc368)
+- :apple::bug: Issue #1497: App crashes after refreshing when using FCM (v2) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ea92e039b1d7640b70ca94e5f8748e7d2abbf13a)
+- :pencil2: fixing error in CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/498bb038799bd687d8c492154bd3b34d72edd322)
+- :memo: Using a newer version on the examples [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/74aba315b4cbb1e06c902e76891bce5582cbe690)
+- :penguin::memo::bug: Issue #1470: Cannot install phonegap-plugin-push on master [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e2f8a62c431af26c4d2fa487daa704067a088643)
+- :bug::apple::wrench: Fixing a merge issue where aps-environment was accidentally removed [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/cb9839740c4cbff5711224eed4b91b55aba77612)
+- :bug::penguin::memo::arrow_up: #1460: Build Issue Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1bef8b37ef7bc017571924edc9e05fe09cd25e29)
+- :bug::apple: Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ca5c281897c664b0bd98097ec2fc8c19c33b2c63)
+- Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/170d7dd43fe047c6caf84ec0f59da6c2c0cdeb6f)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fa4e36606c965504dba609940a2acf24f74ed978)
+- 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/af6c31933e3daedf6e5a7f046e971efcf65cc1ea)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/99742021c8c6c2cd860c40b01db6a3dc18095dbb)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ff14a71b5e365f5c93159e759f989a6bbe89b40a)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/92dca439e1b0a0750a7e466bace2c4cb3acd19d8)
+- :wrench: Add browser platform back for FCM branch [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4cbc1cb69203c5a0fab250bd49b99a398ce86558)
+- Pin FCM to 9.8.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7075bc8206641aa6459cf6acc4fe447fb1d57f77)
+- Add empty google services plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d043c5f9d7872dc4340151c0645a24716391f58f)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f7a7c5c172190acab17fdfd54ad726a7a2fad701)
+- :memo: Update to using fcm-node [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/15e68b03956a1dd292fda87e0da4f1ad9700d9c0)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/54aa482fb8af6ac15a60fb06090077e1d68dee6c)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1276d538b80106dd2f3d67996a531e64e7aa4937)
+- Refactor GCMIntentService to FCMService [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/504f2dcb5b158e0b2e151b255aad28a659bc2c4d)
+- Fix topic subscription and unsubscription on FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/97f0aeaa1099b89076b28282b2d2daac7ec62b33)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e11d89f46572d1e4430f1f6a63945d74b56e574c)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fa66ac99685f1f2b580597a45b16315ab7748028)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c539b041cbe2a2b6e9a360a91ee2a9bfdfd16b03)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/dce5e9fb70e4df45a10fd8348a7def64864fdd24)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6f0182aff86b04c22630d1586d6ac6ca617c7e61)
+- Added .framework files as custom frameworks [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/562a22f45bdafa4e2887996e9c0fa295b8bac886)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f1d14b2615d7c8330afbdbf0faa1d2438473a45d)
+- Fixed empty token on android first run (#1008) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7e4c47b5c5647866f24e6c2f47e4c98a1f8e2442)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a02580e19d470919ec61ec489cdf4ee6ca2f0d8c)
+
+## [v1.10.3](https://github.com/phonegap/phonegap-plugin-push/tree/v1.10.3) (2017-20-04)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.10.2...v1.10.3)
+
+- 1.10.3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1e072b351056d453fd1c1d40d5fcac310f3e107c)
+- :bookmark: Bumping plugin version to 1.10.3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/29df66eae54e773925e25bd92299957e4d654723)
+- :bug: Handle null in getCircleBitmap (#1705) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3acdfa338d7a8b56ec4dc73c50aa9917ecb3be7c)
+- :shirt: Issue #1702: The logging tag can be at most 23 characters, was 40 (PushPlugin_BackgroundActionButtonHandler) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2045873acda2e81d54b2da87cd2d10f056bd90f9)
+- Shortened log tag PushPlugin_BackgroundActionButtonHandler to bring u… (#1703) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/dd707122b7aa78649fa6f5f73ba9b05436799926)
+- :memo: Docs for interoperability with Firebase (#1693) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/cebb6403143047192462f30c22b9510a8c6dbe21)
+- fix headline (#1685) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e2e7993544eed544eb7286868b60e2e3efb6275d)
+- Fix changelog date [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3140b2b00388785f8056632376b50a1d1ef67b96)
+- :arrow_up: update pluginpub to 0.0.8 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/cfab7d91556a38ee81550fe47e13f2662ae810db)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/027ea2c17e4b96b848ab29046efea243e6e2da27)
+
+## [v1.10.2](https://github.com/phonegap/phonegap-plugin-push/tree/v1.10.2) (2017-04-12)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.10.1...v1.10.2)
+
+- 1.10.2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b5a7d4ec6e64abaed65de00be3e9bac9ab25791e)
+- :bookmark: Bumping plugin version to 1.10.2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5b700ad9927c401081a5de49f2a6a27ba0dfaa9a)
+- :arrow_up: update pluginpub to 0.0.7 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/38564ce55e53e018c91f4063d680eedd2631b825)
+- Fix the dates on the CHANGELOG (the last 2 version) (#1676) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c0f26192c906bfc1a60390333c96d5dc07433978)
+- Vapid Support (#1675) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/384b60bade628035b21d23f07e284eb6e1557a10)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/97d618fb53084cfae78f397def48df791131358f)
+
+## [v1.10.1](https://github.com/phonegap/phonegap-plugin-push/tree/v1.10.1) (2017-04-07)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.10.0...v1.10.1)
+
+- 1.10.1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6211e8c3df8881a90d19b111a0e63f890d435df6)
+- :bookmark: Bumping plugin version to 1.10.1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6d710a06681ad84c13273fe5d20feb3033ac67b6)
+- :bug: Issue #1655: App opens on clearing notification (Android) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ff417925f6d6678f0fcd8315d5f4b4b08fbb9085)
+- :memo: Issue #1118: Problem with notifications stacking [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d669c44a863d86d0bb73b5ae086bc2fe6f8113a9)
+- :memo: Issue #1220: [Question] the hook setting seem not work [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4ef137eea370da7c225ab2a5cf63b1e97a68f4a4)
+- Set get badge count android (#1644) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/630907cf3d8802bcd5d91b6bd768c989f6ef897a)
+- Add plugin typings from DefinitelyTyped (#1654) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6ea70d9984e176a75602e72e1d26f5404c519e29)
+- :arrow_up: Issue #1560: setApplicationIconBadgeNumber not working on Android but firing success function [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/700701fd2151667905d860228cf954301186721a)
+- :memo: Issue #1618: No notification when app is closed on Android, not at all on iOS [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7f64bf0ffbddf3ef20de2fe540ec2718be5d0c23)
+- :arrow_down: Issue #1560: setApplicationIconBadgeNumber not working on Android but firing success function [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e450fd7b623f27f27858a7537ec7950aa0f618b5)
+- :arrow_up: Issue #1560: setApplicationIconBadgeNumber not working on Android but firing success function [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4af3472263a5125cab6f08bbb59b83bf957144ec)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ed25a3e3ad9fb6f2af63fd07957944f974eafaa1)
+
+## [v1.10.0](https://github.com/phonegap/phonegap-plugin-push/tree/v1.10.0) (2017-03-10)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.9.4...v1.10.0)
+
+- 1.10.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6b9b862da8566c7717dfc79dd6b32d8a7e6774d8)
+- :bookmark: Bumping plugin version to 1.10.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/626e9615fbff6ea225569ab58353ac7f58aef495)
+- :heavy_plus_sign: update pluginpub version [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c3c8058ffee888447017eb5d8c0f4f30cbcd090f)
+- Issue #1464: Create round bitmap icon for large icon image passed in from local resource or url (#1635) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/0dd0d468868f0b13c8d840c78dd89fca5920cd32)
+- Receive notification only from SENDER_ID (#1484) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a0d51e54aac39b8c58e4c67080f174c0228947c9)
+- Add no-cache flag to payload (#1620) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/42f8cefbd187c36534e6ab59b6611fb7f15b91f0)
+- Add dismiss key to on notification data (#1621) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4259bb3cacfe2561ed44e9f16bd74f8d5ae45ae2)
+- return true for old android versions, since AppOpsManager is available starting at 19 (#1634) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/945aa2ad6d266e82683e0bee86f53d258f2b31b6)
+- :art: remove reference to unused String [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/75f2191632a7a51eda7510a172ae6cc9d477acb9)
+- Ability to use custom keys to find message title and text on Android (#1604) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fd366296773906c91d5f8dfa3e8ba813c7c71b85)
+- :memo: Fixed URL of apples custom sound documentation (#1600) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8c93f8622eb1c453cb0c681158a07deca32bf200)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/409020c90edf04e0a37232cff8aadb070d4ccaa9)
+
+## [v1.9.4](https://github.com/phonegap/phonegap-plugin-push/tree/v1.9.4) (2016-07-09)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.9.3...v1.9.4)
+
+- 1.9.4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2241c7431cd60a68d2f35e7b4a5bfd797d5161b6)
+- Bumping plugin version to 1.9.4 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ec47932bf8fdf9cd96db076fe56306ab230048d9)
+- Issue #1591: App crashes with the latest updates of Android SDK with plugin v-1.9.2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/514c21366ab37001ca323bec58261e023edaefd7)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3a218e4c68ebc1088461c2cfec966e57eaa24089)
+
+## [v1.9.3](https://github.com/phonegap/phonegap-plugin-push/tree/v1.9.3) (2016-07-09)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.9.2...v1.9.3)
+
+- 1.9.3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/42723d6609862aa950abce67b2a637736bdd9e99)
+- :bookmark: Bumping plugin version to 1.9.3 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8f7b7dc003a2bc5bab7a316b0e2b0cf475c5a449)
+- :wrench: Add valid SPDX license expression [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/4274d0759acd7110ed2592ed1d2ce3bf692711d3)
+- :memo: Issue #1587: v2.0.0-rc2: .on('notification') event not fired when background notification in Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7e90853a09a2c49f29e12eed03977b08b1295387)
+- :arrow_up: Issue #1560: setApplicationIconBadgeNumber not working on Android but firing success function [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/3188a3907f50dcf625b7663ecf74ea9a9209d437)
+- :memo: Issue #1557: push.on('notification') not triggered - Ionic [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b91e9420fb68c4efc943cc5f8ecbd81274ffcbec)
+- :memo: Issue #1407: Uncaught (in promise): Error: Push plugin not found! [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/adf3eabb8871980d2dead7ecb8185ad0da1d6b46)
+- Corrected merges usage to prevent possible conflicts with other plugins (#1538) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/00c67cb2c85e97dfe4f7020f28ad4d954458599f)
+- :penguin: android mixpanel pushnotification suport added (#1523) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/951cb6921a717d847c279ad6896c28772c70103f)
+- :memo: Making string replacement clearer [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/abdb656315bd4457c7ae43aaa52e2357df85d139)
+- :bug::penguin::memo: Issue #1433: Cordova Push V5 register () crashes App when initialized with topicList [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1d5723c81ad7a1e9d76fdce22161e8e8aa8da262)
+- :bug::penguin: Issue #1421: Notification delay caused by icon bitmap timeout [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fb4b533f2b31daebc7ed57c16228458def3d2af9)
+- :memo: Issue #1442: CocoaPods support vs requirement [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5912b1ea911fbe3b45a3a47ed005b7048a487ba6)
+- make google_app_id non translatable string (#1485) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d9890fa52ecdb41b344f06f1dd081d05ea784bea)
+- :penguin::bug: Issue #1474: Android: force-start starts the app in Foreground instead of Background [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2bb5f53a8478353ed1f5f97756adff336fb9a710)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e02ff6703a53cb18e53060e2d7f6f64ebc8588b6)
+
+## [v2.0.0-rc2](https://github.com/phonegap/phonegap-plugin-push/tree/v2.0.0-rc2) (2016-07-09)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v2.0.0-rc1...v2.0.0-rc2)
+
+- 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/67041a994d70fd3a04149003607b88947e8cc994)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7dea689ba17ebb901ee12da62801f051a99cc368)
+- :apple::bug: Issue #1497: App crashes after refreshing when using FCM (v2) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ea92e039b1d7640b70ca94e5f8748e7d2abbf13a)
+- :pencil2: fixing error in CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/498bb038799bd687d8c492154bd3b34d72edd322)
+- :memo: Using a newer version on the examples [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/74aba315b4cbb1e06c902e76891bce5582cbe690)
+- :penguin::memo::bug: Issue #1470: Cannot install phonegap-plugin-push on master [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e2f8a62c431af26c4d2fa487daa704067a088643)
+- :bug::apple::wrench: Fixing a merge issue where aps-environment was accidentally removed [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/cb9839740c4cbff5711224eed4b91b55aba77612)
+- :bug::penguin::memo::arrow_up: #1460: Build Issue Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1bef8b37ef7bc017571924edc9e05fe09cd25e29)
+- :bug::apple: Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ca5c281897c664b0bd98097ec2fc8c19c33b2c63)
+- Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/170d7dd43fe047c6caf84ec0f59da6c2c0cdeb6f)
+
+## [v2.0.0-rc1](https://github.com/phonegap/phonegap-plugin-push/tree/v2.0.0-rc1) (2016-07-09)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.9.1...v2.0.0-rc1)
+
+- 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/46a44f92ca8f94c991a564a5a8ff1e424c4b7f7f)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b952330124ab76d6a8ec88ebdb7eac0a614f8c38)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6ec1beb2ab13d6333122b76122ae4eb2e60dfb55)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fab033596c66ee1c9594d404fec8473a4dd41e77)
+- :wrench: Add browser platform back for FCM branch [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/07f28d8dbc477faeb2a8dd8997fde0d088dd191a)
+- Pin FCM to 9.8.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ba16ce363a198edd0d190e9603a5e1363289a893)
+- Add empty google services plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a47af30d32c6921b484c1c129cd60582e1b3047b)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c9f4a5d6d6f18082ae9e5a533a700cf3662c2739)
+- :memo: Update to using fcm-node [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/368f6cbb8095fd742bb39308e02fac7f89379f18)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a3e0eefe09359612d6757d4598eba69e3d68a96b)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d6d527628f8811ab6781591b3c186ce2732c9f37)
+- Refactor GCMIntentService to FCMService [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/26b0369f148976e4227f73f5883658a726f825dd)
+- Fix topic subscription and unsubscription on FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b4d850028b088c38bbd11c1899e28ea69b1c391e)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/417be691c8131f006a7f1bd49bc171faa36ee872)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e34ddc03b01e676382a6d70e1e750a4e64ca6d62)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/732a2bd8efbfbea696db6951439e2472d6dc8e6f)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8d44ccfdfe91831140e4e972d6879b6330a1c613)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a18d50324ab96945db382539ce2ed7a287bed840)
+- Added .framework files as custom frameworks [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/72875ac0aef0f9d00de6413e0dea4d7533c5eaef)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2bd37d1b31ca0b2c76c89a04a803b22186d1f8ad)
+- Fixed empty token on android first run (#1008) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fda1f905c4364a3ac100486dc639fdd5c3bae9ca)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b6acbfeacf851bab256962616ba2bd93150982ba)
+- :memo: Issue #1235: SecurityError: Only secure origins are allowed (see: https://goo.gl/Y0ZkNV) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5241a6f3868b4b15f79c6d5c0b5b5ea45e6301f9)
+- :memo: Issue #1415: What is the id in push.finish? [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2660b51da66e791ff342d027ea6afa4313281e28)
+- :memo: Issue #1420: Update PLATFORM_SUPPORT.md [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/60ad23affaf2dc4c9c2bf48b6cbb702b0217aeb7)
+- :memo: Adding more emoji for commit messages [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/eb6b7b7d52770769719392b9b5226ee9a7caef75)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f38fd3d4d9f5f4f8de602b6aa07089b706884ca5)
+
+## [v2.0.0-rc2](https://github.com/phonegap/phonegap-plugin-push/tree/v2.0.0-rc2) (2016-07-09)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v2.0.0-rc1...v2.0.0-rc2)
+
+- 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/67041a994d70fd3a04149003607b88947e8cc994)
+- Bumping plugin version to 2.0.0-rc2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/7dea689ba17ebb901ee12da62801f051a99cc368)
+- :apple::bug: Issue #1497: App crashes after refreshing when using FCM (v2) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ea92e039b1d7640b70ca94e5f8748e7d2abbf13a)
+- :pencil2: fixing error in CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/498bb038799bd687d8c492154bd3b34d72edd322)
+- :memo: Using a newer version on the examples [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/74aba315b4cbb1e06c902e76891bce5582cbe690)
+- :penguin::memo::bug: Issue #1470: Cannot install phonegap-plugin-push on master [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e2f8a62c431af26c4d2fa487daa704067a088643)
+- :bug::apple::wrench: Fixing a merge issue where aps-environment was accidentally removed [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/cb9839740c4cbff5711224eed4b91b55aba77612)
+- :bug::penguin::memo::arrow_up: #1460: Build Issue Android [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/1bef8b37ef7bc017571924edc9e05fe09cd25e29)
+- :bug::apple: Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ca5c281897c664b0bd98097ec2fc8c19c33b2c63)
+- Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/170d7dd43fe047c6caf84ec0f59da6c2c0cdeb6f)
+
+## [v2.0.0-rc1](https://github.com/phonegap/phonegap-plugin-push/tree/v2.0.0-rc1) (2016-07-09)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.9.1...v2.0.0-rc1)
+
+- 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/46a44f92ca8f94c991a564a5a8ff1e424c4b7f7f)
+- :bookmark: Bumping plugin version to 2.0.0-rc1 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b952330124ab76d6a8ec88ebdb7eac0a614f8c38)
+- :wrench: add tern to gitignore [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/6ec1beb2ab13d6333122b76122ae4eb2e60dfb55)
+- :hammer::wrench::arrow_up: Use Babel to transpile ES2015 code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fab033596c66ee1c9594d404fec8473a4dd41e77)
+- :wrench: Add browser platform back for FCM branch [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/07f28d8dbc477faeb2a8dd8997fde0d088dd191a)
+- Pin FCM to 9.8.0 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ba16ce363a198edd0d190e9603a5e1363289a893)
+- Add empty google services plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a47af30d32c6921b484c1c129cd60582e1b3047b)
+- :bug: Issue #1188: Strings.xml google_app_id conflict with google-services.json [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/c9f4a5d6d6f18082ae9e5a533a700cf3662c2739)
+- :memo: Update to using fcm-node [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/368f6cbb8095fd742bb39308e02fac7f89379f18)
+- Issue #689: Remove sender id from PushNotification init iOS options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a3e0eefe09359612d6757d4598eba69e3d68a96b)
+- Issue #689: Remove sender id from PushNotification init Android options [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/d6d527628f8811ab6781591b3c186ce2732c9f37)
+- Refactor GCMIntentService to FCMService [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/26b0369f148976e4227f73f5883658a726f825dd)
+- Fix topic subscription and unsubscription on FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b4d850028b088c38bbd11c1899e28ea69b1c391e)
+- Fix rebase errors [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/417be691c8131f006a7f1bd49bc171faa36ee872)
+- Use CocoaPods [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e34ddc03b01e676382a6d70e1e750a4e64ca6d62)
+- fixed registration and removed unused code [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/732a2bd8efbfbea696db6951439e2472d6dc8e6f)
+- Added hook and resource file to copy GoogleService-Info.plist [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/8d44ccfdfe91831140e4e972d6879b6330a1c613)
+- Changed code to work with FCM [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/a18d50324ab96945db382539ce2ed7a287bed840)
+- Added .framework files as custom frameworks [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/72875ac0aef0f9d00de6413e0dea4d7533c5eaef)
+- Removed GCM files and added FCM files [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2bd37d1b31ca0b2c76c89a04a803b22186d1f8ad)
+- Fixed empty token on android first run (#1008) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/fda1f905c4364a3ac100486dc639fdd5c3bae9ca)
+- Added partial Android FCM support (#975) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/b6acbfeacf851bab256962616ba2bd93150982ba)
+- :memo: Issue #1235: SecurityError: Only secure origins are allowed (see: https://goo.gl/Y0ZkNV) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/5241a6f3868b4b15f79c6d5c0b5b5ea45e6301f9)
+- :memo: Issue #1415: What is the id in push.finish? [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/2660b51da66e791ff342d027ea6afa4313281e28)
+- :memo: Issue #1420: Update PLATFORM_SUPPORT.md [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/60ad23affaf2dc4c9c2bf48b6cbb702b0217aeb7)
+- :memo: Adding more emoji for commit messages [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/eb6b7b7d52770769719392b9b5226ee9a7caef75)
+- Updating CHANGELOG [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/f38fd3d4d9f5f4f8de602b6aa07089b706884ca5)
+
+## [v1.9.2](https://github.com/phonegap/phonegap-plugin-push/tree/v1.9.2) (2016-07-09)
+[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.9.1...v1.9.2)
+
+- 1.9.2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/ef3de3281205b1fd56c57c71db31dc06a95da7a9)
+- :bookmark: Bumping plugin version to 1.9.2 [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/24650bad4db49525505e9a2624ff1b5500e6b3ef)
+- Optional event emit instead of function call for action buttons (#1378) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/e92e951e759fe64d17d01e152575b6262973380a)
+- Ensures foreground is true when inline is set to true and Android version is earlier than N (#1459) [view commit](http://github.com/phonegap/phonegap-plugin-push/commit/dd61ec34c0ca5c3fadf6797a8e192b9343324f68)
+
## [v1.9.1](https://github.com/phonegap/phonegap-plugin-push/tree/v1.9.1) (2016-07-09)
[Full Changelog](https://github.com/phonegap/phonegap-plugin-push/compare/v1.9.0...v1.9.1)
diff --git a/StoneIsland/plugins/phonegap-plugin-push/MIT-LICENSE b/StoneIsland/plugins/phonegap-plugin-push/MIT-LICENSE
index a017eb00..abf9a980 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/MIT-LICENSE
+++ b/StoneIsland/plugins/phonegap-plugin-push/MIT-LICENSE
@@ -1,4 +1,4 @@
-Copyright 2012-2016 Adobe Systems
+Copyright 2012-2017 Adobe Systems
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/StoneIsland/plugins/phonegap-plugin-push/README.md b/StoneIsland/plugins/phonegap-plugin-push/README.md
index 8f9ff5e9..93c2b1eb 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/README.md
+++ b/StoneIsland/plugins/phonegap-plugin-push/README.md
@@ -1,12 +1,16 @@
-#phonegap-plugin-push [![Build Status](https://travis-ci.org/phonegap/phonegap-plugin-push.svg)](https://travis-ci.org/phonegap/phonegap-plugin-push)
+# phonegap-plugin-push [![Build Status](https://travis-ci.org/phonegap/phonegap-plugin-push.svg)](https://travis-ci.org/phonegap/phonegap-plugin-push)
> Register and receive push notifications
+# Warning
+
+The links below take you to the version 2.x documentation which includes a number of breaking API changes from version 1.x, mostly the move from GCM to FCM. If you are using version 1.x please reference the docs in the [v1.x branch](https://github.com/phonegap/phonegap-plugin-push/tree/v1.x).
+
# What is this?
-This plugin offers support to receive and handle native push notifications with a **single unified API**.
+This plugin offers support to receive and handle native push notifications with a **single unified API**.
-Starting with version `1.9.0`, this plugin will support `CocoaPods` installation of the `Google Cloud Messaging` library. More details are available in the [Installation](docs/INSTALLATION.md#cocoapods) documentation.
+Starting with version `2.0.0`, this plugin will support `CocoaPods` installation of the `Firebase Cloud Messaging` library. More details are available in the [Installation](docs/INSTALLATION.md#cocoapods) documentation.
- [Reporting Issues](docs/ISSUES.md)
- [Installation](docs/INSTALLATION.md)
diff --git a/StoneIsland/plugins/phonegap-plugin-push/docs/API.md b/StoneIsland/plugins/phonegap-plugin-push/docs/API.md
index e0481af8..866fd28c 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/docs/API.md
+++ b/StoneIsland/plugins/phonegap-plugin-push/docs/API.md
@@ -11,7 +11,7 @@
- [push.subscribe()](#pushsubscribetopic-successhandler-errorhandler)
- [push.unsubscribe()](#pushunsubscribetopic-successhandler-errorhandler)
- [push.setApplicationIconBadgeNumber() - iOS & Android only](#pushsetapplicationiconbadgenumbersuccesshandler-errorhandler-count---ios--android-only)
-- [push.getApplicationIconBadgeNumber() - iOS only](#pushgetapplicationiconbadgenumbersuccesshandler-errorhandler---ios-only)
+- [push.getApplicationIconBadgeNumber() - iOS & Android only](#pushgetapplicationiconbadgenumbersuccesshandler-errorhandler---ios--android-only)
- [push.finish() - iOS only](#pushfinishsuccesshandler-errorhandler-id---ios-only)
- [push.clearAllNotifications() - iOS & Android only](#pushclearallnotificationssuccesshandler-errorhandler---ios--android-only)
@@ -39,7 +39,6 @@ All available option attributes are described bellow. Currently, there are no Wi
Attribute | Type | Default | Description
--------- | ---- | ------- | -----------
-`android.senderID` | `string` | | Maps to the project number in the Google Developer Console.
`android.icon` | `string` | | Optional. The name of a drawable resource to use as the small-icon. The name should not include the extension.
`android.iconColor` | `string` | | Optional. Sets the background color of the small icon on Android 5.0 and greater. [Supported Formats](http://developer.android.com/reference/android/graphics/Color.html#parseColor(java.lang.String))
`android.sound` | `boolean` | `true` | Optional. If `true` it plays the sound specified in the push data or the default system sound.
@@ -47,13 +46,16 @@ Attribute | Type | Default | Description
`android.clearBadge` | `boolean` | `false` | Optional. If `true` the icon badge will be cleared on init and before push messages are processed.
`android.clearNotifications` | `boolean` | `true` | Optional. If `true` the app clears all pending notifications when it is closed.
`android.forceShow` | `boolean` | `false` | Optional. Controls the behavior of the notification when app is in foreground. If `true` and app is in foreground, it will show a notification in the notification drawer, the same way as when the app is in background (and `on('notification')` callback will be called *only when the user clicks the notification*). When `false` and app is in foreground, the `on('notification')` callback will be called immediately.
-`android.topics` | `array` | `[]` | Optional. If the array contains one or more strings each string will be used to subscribe to a GcmPubSub topic.
+`android.topics` | `array` | `[]` | Optional. If the array contains one or more strings each string will be used to subscribe to a FcmPubSub topic.
+`android.messageKey` | `string` | `message` | Optional. The key to search for text of notification.
+`android.titleKey` | `string` | `'title'` | Optional. The key to search for title of notification.
#### Browser
Attribute | Type | Default | Description
--------- | ---- | ------- | -----------
`browser.pushServiceURL` | `string` | `http://push.api.phonegap.com/v1/push` | Optional. URL for the push server you want to use.
+`browser.applicationServerKey` | `string` | `` | Optional. Your GCM API key if you are using VAPID keys.
#### iOS
@@ -73,9 +75,9 @@ The following properties are used if you want use GCM on iOS.
Attribute | Type | Default | Description
--------- | ---- | ------- | -----------
-`ios.senderID` | `string` | `undefined` (Native) | Maps to the project number in the Google Developer Console. Setting this uses GCM for notifications instead of native
-`ios.gcmSandbox` | `boolean` | `false` | Whether to use prod or sandbox GCM setting. Defaults to false.
-`ios.topics` | `array` | `[]` | Optional. If the array contains one or more strings each string will be used to subscribe to a GcmPubSub topic. Note: only usable in conjunction with `senderID`.
+`ios.fcmSandbox` | `boolean` | `false` | Whether to use prod or sandbox GCM setting. Defaults to false.
+options
+`ios.topics` | `array` | `[]` | Optional. If the array contains one or more strings each string will be used to subscribe to a FcmPubSub topic.
##### How GCM on iOS works.
@@ -85,12 +87,12 @@ What happens is on the device side is that it registers with APNS, then that reg
When you send a message to GCM using that ID, what it does is look up the APNS registration ID on it's side and forward the message you sent to GCM on to APSN to deliver to your iOS device.
-Make sure that the certificate you build with matches your `gcmSandbox` value.
+Make sure that the certificate you build with matches your `fcmSandbox` value.
-- If you build your app as development and set `gcmSandbox: false` it will fail.
-- If you build your app as production and set `gcmSandbox: true` it will fail.
-- If you build your app as development and set `gcmSandbox: true` but haven't uploaded the development certs to Google it will fail.
-- If you build your app as production and set `gcmSandbox: false` but haven't uploaded the production certs to Google it will fail.
+- If you build your app as development and set `fcmSandbox: false` it will fail.
+- If you build your app as production and set `fcmSandbox: true` it will fail.
+- If you build your app as development and set `fcmSandbox: true` but haven't uploaded the development certs to Google it will fail.
+- If you build your app as production and set `fcmSandbox: false` but haven't uploaded the production certs to Google it will fail.
> Note: The integration between GCM and APNS is a bit finicky. Personally, I feel it is much better to send pushes to Android using GCM and pushes to iOS using APNS which this plugin does support.
@@ -99,7 +101,6 @@ Make sure that the certificate you build with matches your `gcmSandbox` value.
```javascript
var push = PushNotification.init({
android: {
- senderID: "12345679"
},
browser: {
pushServiceURL: 'http://push.api.phonegap.com/v1/push'
@@ -159,12 +160,14 @@ The event `registration` will be triggered on each successful registration with
Parameter | Type | Description
--------- | ---- | -----------
`data.registrationId` | `string` | The registration ID provided by the 3rd party remote push service.
+`data.registrationType` | `string` | The registration type of the 3rd party remote push service. Either FCM or APNS.
### Example
```javascript
push.on('registration', function(data) {
- console.log(data.registrationId);
+ console.log(data.registrationId);
+ console.log(data.registrationType);
});
```
@@ -203,6 +206,7 @@ Parameter | Type | Description
`data.additionalData` | `Object` | An optional collection of data sent by the 3rd party push service that does not fit in the above properties.
`data.additionalData.foreground` | `boolean` | Whether the notification was received while the app was in the foreground
`data.additionalData.coldstart` | `boolean` | Will be `true` if the application is started by clicking on the push notification, `false` if the app is already started.
+`data.additionalData.dismissed` | `boolean` | Is set to `true` if the notification was dismissed by the user
### Example
@@ -352,7 +356,7 @@ push.setApplicationIconBadgeNumber(function() {
}, 2);
```
-## push.getApplicationIconBadgeNumber(successHandler, errorHandler) - iOS only
+## push.getApplicationIconBadgeNumber(successHandler, errorHandler) - iOS & Android only
Get the current badge count visible when the app is not running
diff --git a/StoneIsland/plugins/phonegap-plugin-push/docs/EXAMPLES.md b/StoneIsland/plugins/phonegap-plugin-push/docs/EXAMPLES.md
index 8481e7bc..32bc2e5f 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/docs/EXAMPLES.md
+++ b/StoneIsland/plugins/phonegap-plugin-push/docs/EXAMPLES.md
@@ -11,7 +11,6 @@ phonegap create my-app --template phonegap-template-push
```javascript
var push = PushNotification.init({
android: {
- senderID: "12345679"
},
browser: {
pushServiceURL: 'http://push.api.phonegap.com/v1/push'
diff --git a/StoneIsland/plugins/phonegap-plugin-push/docs/INSTALLATION.md b/StoneIsland/plugins/phonegap-plugin-push/docs/INSTALLATION.md
index 830bbdd7..ea8f6918 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/docs/INSTALLATION.md
+++ b/StoneIsland/plugins/phonegap-plugin-push/docs/INSTALLATION.md
@@ -4,6 +4,7 @@
- [Android details](#android-details)
- [Compilation](#compilation)
- [Co-existing with Facebook Plugin](#co-existing-with-facebook-plugin)
+ - [Co-existing with plugins that use Firebase](#co-existing-with-plugins-that-use-firebase)
- [Common errors](#common-errors)
- [minSdkVersion === 14](#minsdkversion--14)
- [Multidex](#multidex)
@@ -16,52 +17,65 @@
- [Bitcode](#bitcode)
- [CocoaPods](#cocoapods)
- [Common CocoaPod Installation issues](#common-cocoapod-installation-issues)
+ - [CocoaPod Disk Space](#cocoapod-disk-space)
+ - [Library not found for -lPods-Appname](#library-not-found-for--lPods-Appname)
+ - [Library not found for -lGoogleToolboxForMac](#library-not-found-for--lPods-Appname)
- [Additional Resources](#additional-resources)
## Installation Requirements
Plugin version | Cordova CLI | Cordova Android | Cordova iOS | CocoaPods
---- | ---- | ---- | ---- | ----
+2.0.0 | 7.0.0 | 6.2.1 | 4.4.0 | 1.1.1
1.9.0 | 6.4.0 | 6.0.0 | 4.3.0 | 1.1.1
1.8.0 | 3.6.3 | 4.0.0 | 4.1.0 | N/A
To install from the command line:
```
-phonegap plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
+phonegap plugin add phonegap-plugin-push
```
or
```
-cordova plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
+cordova plugin add phonegap-plugin-push
```
It is also possible to install via repo url directly ( unstable )
```
-phonegap plugin add https://github.com/phonegap/phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
+phonegap plugin add https://github.com/phonegap/phonegap-plugin-push
```
or
```
-cordova plugin add https://github.com/phonegap/phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
+cordova plugin add https://github.com/phonegap/phonegap-plugin-push
```
-Where the `XXXXXXX` in `SENDER_ID="XXXXXXX"` maps to the project number in the [Google Developer Console](https://www.google.ca/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwikqt3nyPjMAhXJ5iYKHR0qDcsQFggbMAA&url=https%3A%2F%2Fconsole.developers.google.com%2F&usg=AFQjCNF0eH059mv86nMIlRmfsf42kde-wA&sig2=BQ2BJpchw1CpGt87sk5p6w&bvm=bv.122852650,d.eWE). To find the project number login to the Google Developer Console, select your project and click the menu item in the screen shot below to display your project number.
+As of version 2.0.0 the SENDER_ID parameter has been removed at install time. Instead you put your google-services.json (Android) and/or GoogleService-Info.plist in the root folder of your project and then add the following lines into your config.xml.
-![zzns8](https://cloud.githubusercontent.com/assets/353180/15588897/2fc14db2-235e-11e6-9326-f97fe0ec15ab.png)
+In the platform tag for Android add the resource-file tag:
-If you are not creating an Android application you can put in anything for this value.
+```
+<platform name="android">
+ <resource-file src="google-services.json" target="google-services.json" />
+</platform>
+```
+
+In the platform tag for iOS add the resource-file tag:
+
+```
+<platform name="ios">
+ <resource-file src="GoogleService-Info.plist" />
+</platform>
+```
> Note: if you are using Ionic you may need to specify the SENDER_ID variable in your package.json.
```
"cordovaPlugins": [
{
- "variables": {
- "SENDER_ID": "XXXXXXX"
- },
"locator": "phonegap-plugin-push"
}
]
@@ -70,23 +84,17 @@ If you are not creating an Android application you can put in anything for this
> Note: You need to specify the SENDER_ID variable in your config.xml if you plan on installing/restoring plugins using the prepare method. The prepare method will skip installing the plugin otherwise.
```
-<plugin name="phonegap-plugin-push" spec="1.6.0">
- <param name="SENDER_ID" value="XXXXXXX" />
-</plugin>
+<plugin name="phonegap-plugin-push" spec="2.0.0" />
```
## Android details
### Compilation
-As of version 1.3.0 the plugin has been switched to using Gradle/Maven for building.
-
-You will need to ensure that you have installed the following items through the Android SDK Manager:
+As of version 2.0.0 the plugin has been switched to using pinned version of Gradle libraries. You will need to ensure that you have installed the following items through the Android SDK Manager:
-- Android Support Library version 23 or greater
-- Local Maven repository for Support Libraries (formerly Android Support Repository) version 20 or greater
-- Google Play Services version 27 or greater
-- Google Repository version 22 or greater
+- Android Support Library version 25.1.0
+- FirebaseMessaging Library version 9.8.0
![android support library](https://cloud.githubusercontent.com/assets/353180/10230226/0627931e-684a-11e5-9a6b-72d72997f655.png)
@@ -113,6 +121,30 @@ or
cordova plugin add --save cordova-plugin-facebook4 --variable APP_ID="App ID" --variable APP_NAME="App Name"
```
+### Co-existing with plugins that use Firebase
+
+Problems may arise when push plugin is used along plugins that implement Firebase functionality (cordova-plugin-firebase-analytics, for example). Firebase uses `@string/google_app_id`, as does the push plugin, though the value format differs, causing problems like this: `Invalid google_app_id. Firebase Analytics disabled`.
+
+To make the two work together, you need to migrate your GCM project from Google console to Firebase console:
+
+1) In Firebase console - [import your existing GCM project](https://firebase.google.com/support/guides/google-android#migrate_your_console_project), don't create a new one.
+2) Set your `SENDER_ID` variable to match the id of your imported Firebase project. In case of cordova, your `config.xml` would look something like this:
+```xml
+<plugin name="phonegap-plugin-push" spec="~1.10.0">
+ <variable name="SENDER_ID" value="1:956432534015:android:df201d13e7261425" />
+</plugin>
+```
+3) In your JavaScript, when you init the PushPlugin, senderID remains the same format as before:
+```javascript
+PushNotification.init({
+ android: {
+ senderID: 956432534015
+ }
+});
+```
+
+*Note:* No changes on the back-end side are needed: [even though recommended](https://developers.google.com/cloud-messaging/android/android-migrate-fcm#update_server_endpoints), it isn't yet required and sending messages through GCM gateway should work just fine.
+
### Common errors
#### minSdkVersion === 14
@@ -223,11 +255,21 @@ cordova platform update ios@4.0.0
### CocoaPods
-Required `cordova-cli` version: `6.4.0`
+Required `cordova-cli` minimum version: `6.4.0`
+
+Required `cordova-ios` minimum version: `4.3.0`
+
+Required `CocoaPods` minimum version: `1.0.1`
-Required `cordova-ios` version: `4.3.0`
-Version `1.9.0` (and above) of this plugin supports [CocoaPods](https://cocoapods.org) installation of the [Google Cloud Messaging](https://cocoapods.org/pods/GoogleCloudMessaging) library.
+To install CocoaPods, please follow the installation instructions [here](https://guides.cocoapods.org/using/getting-started). After installing CocoaPods, please run:
+
+ pod setup
+
+This will clone the required CocoaPods specs-repo into your home folder at `~/.cocoapods/repos`, so it might take a while. See the [CocoaPod Disk Space](#cocoapod-disk-space) section below for more information.
+
+
+Version `2.0.0` (and above) of this plugin supports [CocoaPods](https://cocoapods.org) installation of the [Firebase Cloud Messaging](https://cocoapods.org/pods/FirebaseMessaging) library.
If you are installing this plugin using `npm`, and you are using version `6.1.0` or greater of the `cordova-cli`, it will automatically download the right version of this plugin for both your platform and cli.
@@ -255,59 +297,55 @@ Failed to install 'phonegap-plugin-push':Error: pod: Command failed with exit co
Error: pod: Command failed with exit code 1
```
-Please run the command `pod repo update` and re-install the plugin.
+Please run the command `pod repo update` and re-install the plugin. You would only run `pod repo update` if you have the specs-repo already cloned on your machine through `pod setup`.
-## Additional Resources
+##### CocoaPod Disk Space
+
+Running `pod setup` can take over 1 GB of disk space and that can take quite some time to download over a slow internet connection. If you are having issues with disk space/network try this neat hack from @VinceOPS.
-The push plugin enables you to play sounds and display different icons during push (Android only). These additional resources need to be added to your projects `platforms` directory in order for them to be included into your final application binary. One way of doing it is to create a hook to do the copying for you on each build.
+```
+git clone --verbose --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
+pod setup --verbose
+```
-First create a `scripts` directory in the root of your project. Next add a file to the scripts directory called `copy_resource_files.js`. The contents of the file will look something like this:
+##### Library not found for -lPods-Appname
-```javascript
-#!/usr/bin/env node
+If you open the app in Xcode and you get an error like:
-// each object in the array consists of a key which refers to the source and
-// the value which is the destination.
-var filestocopy = [{
- "resources/android/images/logo.png":
- "platforms/android/res/drawable/logo.png"
-}, {
- "resources/android/sounds/ring.mp3":
- "platforms/android/res/raw/ring.mp3"
-}, {
- "resources/ios/sounds/ring.caf":
- "platforms/ios/YourAppName/ring.caf"
-}, ];
+```
+ld: library not found for -lPods-Appname
+clang: error: linker command failed with exit code 1
+```
-var fs = require('fs');
-var path = require('path');
+Then you are opening the .xcodeproj file when you should be opening the .xcworkspace file.
-// no need to configure below
-var rootdir = process.argv[2];
+##### Library not found for -lGoogleToolboxForMac
-filestocopy.forEach(function(obj) {
- Object.keys(obj).forEach(function(key) {
- var val = obj[key];
- var srcfile = path.join(rootdir, key);
- var destfile = path.join(rootdir, val);
- //console.log("copying "+srcfile+" to "+destfile);
- var destdir = path.dirname(destfile);
- if (fs.existsSync(srcfile) && fs.existsSync(destdir)) {
- fs.createReadStream(srcfile).pipe(
- fs.createWriteStream(destfile));
- }
- });
-});
+Trying to build for iOS using the latest cocoapods (1.2.1) but failed with the following error (from terminal running cordova build ios):
+
+```
+ld: library not found for -lGoogleToolboxForMac
```
-Obviously, you'll need to modify the `filestocopy` variable to suit your needs. Pay attention to the destination path on iOS where you will need to replace `YourAppName`.
+Workarounds are to add the platform first and install the plugins later, or to manually run pod install on projectName/platforms/ios.
+
+## Additional Resources
-Next open up your `config.xml` file and add the following line:
+The push plugin enables you to play sounds and display different icons during push (Android only). These additional resources need to be added to your projects `platforms` directory in order for them to be included into your final application binary.
+
+You can now use the `resource-file` tag to deliver the image and sound files to your application. For example if you wanted to include an extra image file for only your Android build you would add the `resource-file` tag to your android `platform` tag:
-```xml
-<hook type="before_build" src="scripts/copy_resource_files.js" />
```
+<platform name="android">
+ <resource-file src="myImage.png" target="res/drawable/myImage.png" />
+</platform>
+```
+
+or if you wanted to include a sound file for iOS:
-Now, when you build your app the files will get copied into your platforms directory for you.
-If you are using PhoneGap Build check out these instructions on [Additional Resources](PHONEGAP_BUILD.md#additional-resources)
+```
+<platform name="ios">
+ <resource-file src="mySound.caf" />
+</platform>
+```
diff --git a/StoneIsland/plugins/phonegap-plugin-push/docs/PAYLOAD.md b/StoneIsland/plugins/phonegap-plugin-push/docs/PAYLOAD.md
index b446612e..431b5a4e 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/docs/PAYLOAD.md
+++ b/StoneIsland/plugins/phonegap-plugin-push/docs/PAYLOAD.md
@@ -3,6 +3,7 @@
- [Background Events](#push-message-arrives-with-app-in-background)
- [Tap Events](#user-clicks-on-notification-in-notification-center)
- [Android Behaviour](#android-behaviour)
+ - [Notification vs Data Payloads](#notification-vs-data-payloads)
- [Localization](#localization)
- [Images](#images)
- [Sound](#sound)
@@ -15,12 +16,14 @@
- [Priority in Notifications](#priority-in-notifications)
- [Picture Messages](#picture-messages)
- [Background Notifications](#background-notifications)
- - [Use of content-available: true](#use-of-content-available-true)
+ - [Use of content_available: true](#use-of-content-available-true)
+ - [Caching](#caching)
- [Huawei and Xiaomi Phones](#huawei-and-xiaomi-phones)
- [Application force closed](#application-force-closed)
- [Visibility](#visibility-of-notifications)
- [Badges](#badges)
- [Support for Twilio Notify](#support-for-twilio-notify)
+ - [Notification ID](#notification-id)
- [iOS Behaviour](#ios-behaviour)
- [Sound](#sound-1)
- [Background Notifications](#background-notifications-1)
@@ -67,6 +70,66 @@ Some ways to handle this *double* event are:
# Android Behaviour
+## Notification vs Data Payloads
+
+Notifications behave differently depending on the foreground/background state of the receiving app and the payload you send to the app.
+
+For instance if you send the following payload:
+
+```
+{
+ "notification": {
+ "title": "Test Notification",
+ "body": "This offer expires at 11:30 or whatever",
+ "notId": 10
+ }
+}
+```
+
+When your app is in the foreground any `on('notification')` handlers you have registered will be called. However if your app is in the background the notification will show up in the system tray. Clicking on the notification in the system tray will start the app but your `on('notification')` handler will not be called as messages with only `notification` payloads will not cause the plugins `onMessageReceived` method to be called.
+
+If you send a payload with a mix of `notification` & `data` objects like this:
+
+```
+{
+ "notification": {
+ "title": "Test Notification",
+ "body": "This offer expires at 11:30 or whatever",
+ "notId": 10
+ },
+ "data" : {
+ "surveyID": "ewtawgreg-gragrag-rgarhthgbad"
+ }
+}
+```
+
+When your app is in the foreground any `on('notification')` handlers you have registered will be called. If your app is in the background the notification will show up in the system tray. Clicking on the notification in the system tray will start the app and your `on('notification')` handler will not be called as messages with only `notification` payloads will not cause the plugins `onMessageReceived` method to be called.
+
+My recommended format for your push payload when using this plugin (while it differs from Google's docs) works 100% of the time:
+
+```
+{
+ "data" : {
+ "title": "Test Notification",
+ "body": "This offer expires at 11:30 or whatever",
+ "notId": 10,
+ "surveyID": "ewtawgreg-gragrag-rgarhthgbad"
+ }
+}
+```
+
+When your app is in the foreground any `on('notification')` handlers you have registered will be called. If your app is in the background the notification will show up in the system tray. Clicking on the notification in the system tray will start the app and your `on('notification')` handler will be called and the event received by your `on('notification')` handler will get the following data:
+
+```
+{
+ "message": "This offer expires at 11:30 or whatever",
+ "title": "Test Notification",
+ "additionalData": {
+ "surveyID": "ewtawgreg-gragrag-rgarhthgbad"
+ }
+}
+```
+
## Localization
Plugin supported localization from resources for: title, message and summaryText.
@@ -95,22 +158,32 @@ Or use localization with formatted constants.
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', {"locKey": "push_app_title"});
-message.addData('message', 'Simple non-localizable text for message!');
-// Constant with formatted params
-// message.addData('message', {"locKey": "push_message_fox", "locData": ["fox", "dog"]});
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: {"locKey": "push_app_title"},
+ message: 'Simple non-localizable text for message!'
+ // Constant with formatted params
+ // message: {"locKey": "push_message_fox", "locData": ["fox", "dog"]});
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -129,9 +202,8 @@ By default the icon displayed in your push notification will be your apps icon.
```javascript
var push = PushNotification.init({
"android": {
- "senderID": "12345679"
},
- browser: {
+ "browser": {
pushServiceURL: 'http://push.api.phonegap.com/v1/push'
},
"ios": {
@@ -154,11 +226,10 @@ In order to get a better user experience you can specify an alternate icon and b
```javascript
var push = PushNotification.init({
"android": {
- "senderID": "123456789",
"icon": "phonegap",
"iconColor": "blue"
},
- browser: {
+ "browser": {
pushServiceURL: 'http://push.api.phonegap.com/v1/push'
},
"ios": {
@@ -170,7 +241,8 @@ var push = PushNotification.init({
});
```
-Where *icon* is the name of an image in the Android *drawables* folder. Writing a hook to describe how to copy an image to the Android *drawables* folder is out of scope for this README but there is an [excellent tutorial](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/) that you can copy.
+Where *icon* is the name of an `.png` image file in the Android `res/drawable` folder. For example: `platforms/android/res/drawable/phonegap.png`
+Writing a hook to describe how to copy an image to the Android `res/drawable` folder is out of scope for this README but there is an [excellent tutorial](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/) that you can copy.
*iconColor* is one of the supported formats #RRGGBB or #AARRGGBB or one of the following names: 'red', 'blue', 'green', 'black', 'white', 'gray', 'cyan', 'magenta', 'yellow', 'lightgray', 'darkgray', 'grey', 'lightgrey', 'darkgrey', 'aqua', 'fuchsia', 'lime', 'maroon', 'navy', 'olive', 'purple', 'silver', 'teal'. *iconColor* is supported on Android 5.0 and greater.
@@ -180,38 +252,48 @@ Please follow the [Android icon design guidelines](https://www.google.com/design
Additionally, each push can include a large icon which is used to personalize each push. The location of the image may one of three types.
-The first is the *drawables* folder in your app. This JSON sent from GCM:
+The first is the `res/drawable` folder in your app. This JSON sent from GCM:
```javascript
{
"registration_ids": ["my device id"],
"data": {
"title": "Large Icon",
- "message": "Loaded from drawables folder",
+ "message": "Loaded from drawable folder",
"image": "twitter"
}
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Large Icon');
-message.addData('message', 'Loaded from drawables folder.');
-message.addData('image', 'twitter');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Large Icon',
+ message: 'Loaded from drawables folder.',
+ image: 'twitter'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
-Would look for the *twitter* image in the drawables folder and produce the following notification.
+Would look for the *twitter* image in the `res/drawable` folder and produce the following notification.
![2015-07-24 02 34 41](https://cloud.githubusercontent.com/assets/353180/8866903/2df48028-3190-11e5-8176-fe8b3f7c5aab.png)
@@ -228,25 +310,35 @@ The second is the *assets* folder in your app. This JSON sent from GCM:
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Large Icon');
-message.addData('message', 'Loaded from assets folder.');
-message.addData('image', 'www/image/logo.png');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Large Icon',
+ message: 'Loaded from assets folder.',
+ image: 'www/image/logo.png'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
-Would look for the *logo.png* file in the assets/www/img folder. Since your apps www folder gets copied into the Android assets folder it is an excellent spot to store the images without needing to write a hook to copy them to the *drawables* folder. It produces the following notification.
+Would look for the *logo.png* file in the assets/www/img folder. Since your apps www folder gets copied into the Android assets folder it is an excellent spot to store the images without needing to write a hook to copy them to the `res/drawable` folder. It produces the following notification.
![2015-07-24 02 20 02](https://cloud.githubusercontent.com/assets/353180/8866901/2df19052-3190-11e5-8c16-a355c59209f3.png)
@@ -264,6 +356,52 @@ The third is the remote *URL*. This JSON sent from GCM:
}
```
+Here is an example using fcm-node that sends the above JSON:
+
+```javascript
+var FCM = require('fcm-node');
+// Replace these with your own values.
+var apiKey = "replace with API key";
+var deviceID = "my device id";
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Large Icon',
+ message: 'Loaded from URL',
+ image: 'https://dl.dropboxusercontent.com/u/887989/antshot.png'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
+});
+```
+
+Produces the following notification.
+
+![2015-07-24 02 17 55](https://cloud.githubusercontent.com/assets/353180/8866900/2df0ab06-3190-11e5-9a81-fdb85bb0f5a4.png)
+
+Finally the Material UI guidelines recommend using a circular icon for the large icon if the subject of the image is a person. This JSON sent from GCM:
+
+```javascript
+{
+ "registration_ids": ["my device id"],
+ "data": {
+ "title": "Large Circular Icon",
+ "message": "Loaded from URL",
+ "image": "https://pbs.twimg.com/profile_images/837060031895896065/VHIQ4oUf_400x400.jpg",
+ "image-type": "circle"
+ }
+}
+```
+
Here is an example using node-gcm that sends the above JSON:
```javascript
@@ -273,9 +411,10 @@ var apiKey = "replace with API key";
var deviceID = "my device id";
var service = new gcm.Sender(apiKey);
var message = new gcm.Message();
-message.addData('title', 'Large Icon');
+message.addData('title', 'Large Circular Icon');
message.addData('message', 'Loaded from URL');
-message.addData('image', 'https://dl.dropboxusercontent.com/u/887989/antshot.png');
+message.addData('image', 'https://pbs.twimg.com/profile_images/837060031895896065/VHIQ4oUf_400x400.jpg');
+message.addData('image-type', 'circular');
service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
if(err) console.error(err);
else console.log(response);
@@ -284,7 +423,7 @@ service.send(message, { registrationTokens: [ deviceID ] }, function (err, respo
Produces the following notification.
-![2015-07-24 02 17 55](https://cloud.githubusercontent.com/assets/353180/8866900/2df0ab06-3190-11e5-9a81-fdb85bb0f5a4.png)
+![screenshot_20170308-214947](https://cloud.githubusercontent.com/assets/353180/23733917/902a4650-0449-11e7-924e-d45a38030c74.png)
## Sound
@@ -339,21 +478,31 @@ In order for your your notification to play a custom sound you will need to add
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Sound Test');
-message.addData('message', 'Loaded res/raw');
-message.addData('soundname', 'test');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Sound Test',
+ message: 'Loaded res/raw',
+ soundname: 'test'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -375,20 +524,30 @@ If you want to see multiple notifications in the shade you will need to provide
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Test Push');
-message.addData('message', 'Push number 1');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Test Push',
+ message: 'Push number 1'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -404,20 +563,30 @@ Followed by:
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Test Push');
-message.addData('message', 'Push number 2');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Test Push',
+ message: 'Push number 2'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -434,21 +603,31 @@ You will only see "Push number 2" in the shade. However, if you send:
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Test Push');
-message.addData('message', 'Push number 1');
-message.addData('notId', 1);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Test Push',
+ message: 'Push number 1',
+ notId: 1
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -465,21 +644,31 @@ and:
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Test Push');
-message.addData('message', 'Push number 2');
-message.addData('notId', 2);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Test Push',
+ message: 'Push number 2',
+ notId: 2
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -501,22 +690,32 @@ A better alternative to stacking your notifications is to use the inbox style to
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'My Title');
-message.addData('message', 'My first message');
-message.addData('style', 'inbox');
-message.addData('summaryText', 'There are %n% notifications');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'My Title',
+ message: 'My first message',
+ style: 'inbox',
+ summaryText: 'There are %n% notifications'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -538,22 +737,32 @@ But, if you follow it up with subsequent notifications like:
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'My Title');
-message.addData('message', 'My second message');
-message.addData('style', 'inbox');
-message.addData('summaryText', 'There are %n% notifications');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'My Title',
+ message: 'My second message',
+ style: 'inbox',
+ summaryText: 'There are %n% notifications'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -581,24 +790,34 @@ Your notification can include a maximum of three action buttons. If you wish to
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'AUX Scrum');
-message.addData('message', 'Scrum: Daily touchbase @ 10am Please be on time so we can cover everything on the agenda.');
-message.addData('actions', [
- { "icon": "emailGuests", "title": "EMAIL GUESTS", "callback": "app.emailGuests", "foreground": true},
- { "icon": "snooze", "title": "SNOOZE", "callback": "app.snooze", "foreground": false},
-]);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'AUX Scrum',
+ message: 'Scrum: Daily touchbase @ 10am Please be on time so we can cover everything on the agenda.',
+ actions: [
+ { icon: "emailGuests", title: "EMAIL GUESTS", callback: "app.emailGuests", foreground: true},
+ { icon: "snooze", title: "SNOOZE", callback: "app.snooze", foreground: false},
+ ]
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -628,24 +847,34 @@ Your notification can include action buttons. If you wish to include an icon alo
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'AUX Scrum');
-message.addData('message', 'Scrum: Daily touchbase @ 10am Please be on time so we can cover everything on the agenda.');
-message.addData('actions', [
- { "icon": "emailGuests", "title": "EMAIL GUESTS", "callback": "app.emailGuests", "foreground": false, "inline": true},
- { "icon": "snooze", "title": "SNOOZE", "callback": "app.snooze", "foreground": false},
-]);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'AUX Scrum',
+ message: 'Scrum: Daily touchbase @ 10am Please be on time so we can cover everything on the agenda.',
+ actions: [
+ { "icon": "emailGuests", "title": "EMAIL GUESTS", "callback": "app.emailGuests", "foreground": false, "inline": true},
+ { "icon": "snooze", "title": "SNOOZE", "callback": "app.snooze", "foreground": false},
+ ]
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -712,21 +941,31 @@ You can use a Led notifcation and choose the color of it. Just add a `ledColor`
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Green LED');
-message.addData('message', 'This is my message with a Green LED');
-message.addData('ledColor', [0, 0, 255, 0]);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Green LED',
+ message: 'This is my message with a Green LED',
+ ledColor: [0, 0, 255, 0]
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -745,21 +984,31 @@ You can set a Vibration Pattern for your notifications. Just add a `vibrationPat
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Vibration Pattern');
-message.addData('message', 'Device should wait for 2 seconds, vibrate for 1 second then be silent for 500 ms then vibrate for 500 ms');
-message.addData('vibrationPattern', [2000, 1000, 500, 500]);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Vibration Pattern',
+ message: 'Device should wait for 2 seconds, vibrate for 1 second then be silent for 500 ms then vibrate for 500 ms',
+ vibrationPattern: [2000, 1000, 500, 500]
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -778,21 +1027,31 @@ You can set a priority parameter for your notifications. This priority value det
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'This is a maximum priority Notification');
-message.addData('message', 'This notification should appear in front of all others');
-message.addData('priority', 2);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'This is a maximum priority Notification',
+ message: 'This notification should appear in front of all others',
+ priority: 2
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -815,23 +1074,32 @@ Perhaps you want to include a large picture in the notification that you are sen
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Big Picture');
-message.addData('message', 'This is my big picture message');
-message.addData('style', 'picture');
-message.addData('picture', 'http://36.media.tumblr.com/c066cc2238103856c9ac506faa6f3bc2/tumblr_nmstmqtuo81tssmyno1_1280.jpg');
-message.addData('summaryText', 'The internet is built on cat pictures');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Big Picture',
+ message: 'This is my big picture message',
+ picture: 'http://36.media.tumblr.com/c066cc2238103856c9ac506faa6f3bc2/tumblr_nmstmqtuo81tssmyno1_1280.jpg',
+ summaryText: 'The internet is built on cat pictures'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -859,22 +1127,32 @@ First the JSON you send from GCM will need to include `"content-available": "1"`
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Test Push');
-message.addData('message', 'Push number 1');
-message.addData('info', 'super secret info');
-message.addData('content-available', '1');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ "to": deviceID,
+ "data": {
+ "title": 'Test Push',
+ "message": 'Push number 1',
+ "info": 'super secret info',
+ "content-available": '1'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -891,28 +1169,38 @@ or if you want the payload to be delivered directly to your app without anything
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('info', 'super secret info');
-message.addData('content-available', '1');
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ "to": deviceID,
+ "data": {
+ "info": 'super secret info',
+ "content-available": '1'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
If do not want this type of behaviour just omit `"content-available": 1` from your push data and your `on('notification')` event handler will not be called.
-### Use of content-available: true
+### Use of content_available: true
-The GCM docs will tell you to send a data payload of:
+The [GCM docs](https://developers.google.com/cloud-messaging/http-server-ref#downstream-http-messages-json) will tell you to send a data payload of:
```javascript
{
@@ -926,9 +1214,9 @@ The GCM docs will tell you to send a data payload of:
}
```
-Where the `content-available` property is part of the main payload object. Setting the property in this part of the payload will result in the PushPlugin not getting the data correctly. Setting `content-available: true` will cause the Android OS to handle the push payload for you and not pass the data to the PushPlugin.
+Where the `content_available` property is part of the main payload object. Setting the property in this part of the payload will result in the PushPlugin not getting the data correctly. Setting `content_available: true` will cause the Android OS to handle the push payload for you and not pass the data to the PushPlugin.
-Instead move `content-available: true` into the `data` object of the payload and set it to `1` as per the example below:
+Instead move `content_available: true` into the `data` object of the payload. The property name changes slightly to use a `-` instead of an `_`. So, `content_available` becomes `content-available` and `true` becomes `1` as per the example below:
```javascript
{
@@ -947,7 +1235,8 @@ Instead move `content-available: true` into the `data` object of the payload and
These phones have a particular quirk that when the app is force closed that you will no longer be able to receive notifications until the app is restarted. In order for you to receive background notifications:
- On your Huawei device go to Settings > Protected apps > check "My App" where.
-- On your Xiaomi makes sure your phone has the "Auto-start" property enabled for your app.
+- On your Xiaomi make sure your phone has the "Auto-start" property enabled for your app.
+- On your Asus make sure your phone has the "Auto-start" property enabled for your app.
### Application force closed
@@ -993,24 +1282,50 @@ If you add `force-start: 1` to the data payload the application will be restarte
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Force Start');
-message.addData('message', 'This notification should restart the app');
-message.addData('force-start', 1);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ "data": {
+ "title": 'Force Start',
+ "message": 'This notification should restart the app',
+ "force-start": '1'
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
+### Caching
+
+By default, when a notification arrives and 'content-available' is set to '1', the plugin will try to deliver the data payload even if the app is not running. In that case, the payload is cached and may be delivered when the app is started again. To disable this behavior, you can set a `no-cache` flag in the notification payload. 0: caching enabled (default), 1: caching disabled.
+
+```javascript
+{
+ "registration_ids": ["my device id"],
+ "data": {
+ "title": "Push without cache",
+ "message": "When the app is closed, this notification will not be cached",
+ "content-available": "1",
+ "no-cache": "1"
+ }
+}
+```
+
## Visibility of Notifications
You can set a visibility parameter for your notifications. Just add a `visibility` field in your notification. -1: secret, 0: private (default), 1: public. `Secret` shows only the most minimal information, excluding even the notification's icon. `Private` shows basic information about the existence of this notification, including its icon and the name of the app that posted it. The rest of the notification's details are not displayed. `Public` Shows the notification's full content.
@@ -1026,21 +1341,31 @@ You can set a visibility parameter for your notifications. Just add a `visibilit
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'This is a public Notification');
-message.addData('message', 'You should be able to read this notification on your lock screen');
-message.addData('visibility', 1);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'This is a public Notification',
+ message: 'You should be able to read this notification on your lock screen',
+ visibility: 1
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -1061,21 +1386,31 @@ In order to set the badge number you will need to include the `badge` property i
}
```
-Here is an example using node-gcm that sends the above JSON:
+Here is an example using fcm-node that sends the above JSON:
```javascript
-var gcm = require('node-gcm');
+var FCM = require('fcm-node');
// Replace these with your own values.
var apiKey = "replace with API key";
var deviceID = "my device id";
-var service = new gcm.Sender(apiKey);
-var message = new gcm.Message();
-message.addData('title', 'Badge Test');
-message.addData('message', 'Badges, we don\'t need no stinking badges');
-message.addData('badge', 7);
-service.send(message, { registrationTokens: [ deviceID ] }, function (err, response) {
- if(err) console.error(err);
- else console.log(response);
+var fcm = new FCM(apiKey);
+
+var message = {
+ to: deviceID,
+ data: {
+ title: 'Badge Test',
+ message: 'Badges, we don\'t need no stinking badges',
+ badge: 7
+ }
+};
+
+fcm.send(message, function(err, response){
+ if (err) {
+ console.log(err);
+ console.log("Something has gone wrong!");
+ } else {
+ console.log("Successfully sent with response: ", response);
+ }
});
```
@@ -1113,11 +1448,17 @@ The JSON received by your app will comply with the standards described in the se
Note: "sound" and "soundname" are equivalent and are considered to be the same by the plugin.
+## Notification ID
+
+When setting the notification ID or `notId` please make sure that you are not exceeding the [MAX_INT](https://developer.android.com/reference/java/lang/Integer.html#MAX_VALUE) value for Android. Using a value larger than MAX_INT will throw an exception which will be caught by the plugin and it will use a default value of `0`.
+
+This means you can't use the JavaScript's `Date.getMilliseconds()` or Java's `System.currentTimeMillis()` as they will give you a value greater than MAX_INT.
+
# iOS Behaviour
## Sound
-In order for your notification to play a custom sound you will need to add the files to root of your iOS project. The files must be in the proper format. See the [Local and Remote Notification Programming Guide](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW6) for more info on proper file formats and how to convert existing sound files.
+In order for your notification to play a custom sound you will need to add the files to root of your iOS project. The files must be in the proper format. See the [Local and Remote Notification Programming Guide](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/SupportingNotificationsinYourApp.html#//apple_ref/doc/uid/TP40008194-CH4-SW10) for more info on proper file formats and how to convert existing sound files.
Then send the follow JSON from APNS:
diff --git a/StoneIsland/plugins/phonegap-plugin-push/docs/PHONEGAP_BUILD.md b/StoneIsland/plugins/phonegap-plugin-push/docs/PHONEGAP_BUILD.md
index 8a95d6a1..7f460738 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/docs/PHONEGAP_BUILD.md
+++ b/StoneIsland/plugins/phonegap-plugin-push/docs/PHONEGAP_BUILD.md
@@ -4,19 +4,20 @@
- [Including the plugin](#including-the-plugin)
- [Adding Resources](#adding-resources)
- [IntelXDK Support](#intelxdk-support)
+- [Ionic Cloud Build](#ionic-cloud-build)
## PhoneGap Build Support
-> Currently PhoneGap Build does not support version 1.9.0 of the plugin. Updates are being made to PGB to support the latest release.
+> PhoneGap Build now support version 1.9.0 of the plugin.
### Including the plugin
-Including this plugin in a project that is built by PhoneGap Build is as easy as adding:
+Including this plugin in a project that is built by PhoneGap Build is as easy as adding (replacing `123456789` with your own, that is):
```xml
<preference name="android-build-tool" value="gradle" />
<plugin name="phonegap-plugin-push" source="npm">
- <param name="SENDER_ID" value="<Your Sender ID>" />
+ <param name="SENDER_ID" value="123456789" />
</plugin>
```
@@ -91,3 +92,25 @@ f. you probably need to install the required gem (`gem install pushmeup`)
g. send the notification (`ruby pushAPNS.rb`)
10. See notification on device!
+
+## Ionic Cloud Build
+
+Users have reported issues with Ionic Cloud Build. Apparently there are some differences in the way variables are handled. If your app has an issue where the `PushNotification` object can't be found try the following.
+
+1. Remove the inclusion of `phonegap-plugin-push` from config.xml. That is delete lines that look like this:
+
+```
+<plugin name="phonegap-plugin-push" spec="~1.9.1">
+ <variable name="SENDER_ID" value="xxx"/>
+</plugin>
+```
+2. Add the following lines into `package.json` in the `cordovaPlugins` array.
+
+```
+{
+ "variables": {
+ "SENDER_ID": "xxx"
+ },
+ "locator": "phonegap-plugin-push"
+}
+```
diff --git a/StoneIsland/plugins/phonegap-plugin-push/docs/TYPESCRIPT.md b/StoneIsland/plugins/phonegap-plugin-push/docs/TYPESCRIPT.md
index 37117d16..53d215b3 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/docs/TYPESCRIPT.md
+++ b/StoneIsland/plugins/phonegap-plugin-push/docs/TYPESCRIPT.md
@@ -1,7 +1,7 @@
# Typescript definition file
For those of you who use typescript, we're glad to say that we have the complete definition file available at [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped).
-Search for `phonegap-plugin-push` there, or simply grab it directly [here](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/phonegap-plugin-push/phonegap-plugin-push.d.ts).
+Search for `phonegap-plugin-push` there, or simply grab it directly [here](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/phonegap-plugin-push/index.d.ts).
## Example usage
@@ -11,7 +11,6 @@ All available attributes and properties will have autocomplete support and type
```typescript
let push = PushNotification.init({
android: {
- senderID: "12345679"
},
ios: {
alert: "true",
@@ -69,4 +68,4 @@ push.on('notification', (data: my.custom.NotificationEventResponse) => {
## Outdated definitions
Is our definition file at DefinitelyTyped outdated? Is there any improvements that could be done?
-We welcome any contribution, and they should be done through issues created [there](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/new). \ No newline at end of file
+We welcome any contribution, and they should be done through issues created [there](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/new).
diff --git a/StoneIsland/plugins/phonegap-plugin-push/hooks/windows/setToastCapable.js b/StoneIsland/plugins/phonegap-plugin-push/hooks/windows/setToastCapable.js
index b8cbcbc0..5b784582 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/hooks/windows/setToastCapable.js
+++ b/StoneIsland/plugins/phonegap-plugin-push/hooks/windows/setToastCapable.js
@@ -1,7 +1,13 @@
module.exports = function(context) {
- console.log('Updating appxmanifests with ToastCapable=true...');
+ console.log('Updating appxmanifests with ToastCapable=true ...');
var path = require('path');
+ var fs = require('fs');
+
var platformProjPath = path.join(context.opts.projectRoot, 'platforms/windows');
+ if (!fs.existsSync(platformProjPath)) {
+ platformProjPath = context.opts.projectRoot;
+ }
+
var AppxManifest = require(path.join(platformProjPath, 'cordova/lib/AppxManifest'));
['package.phone.appxmanifest', 'package.windows.appxmanifest'].forEach(function(manifestPath) {
diff --git a/StoneIsland/plugins/phonegap-plugin-push/package.json b/StoneIsland/plugins/phonegap-plugin-push/package.json
index 91983f9a..14f757b2 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/package.json
+++ b/StoneIsland/plugins/phonegap-plugin-push/package.json
@@ -1,15 +1,35 @@
{
- "name": "phonegap-plugin-push",
- "description": "Register and receive push notifications.",
- "version": "1.9.2",
- "homepage": "http://github.com/phonegap/phonegap-plugin-push#readme",
- "repository": {
- "type": "git",
- "url": "git://github.com/phonegap/phonegap-plugin-push.git"
+ "_from": "phonegap-plugin-push@2.0.0",
+ "_id": "phonegap-plugin-push@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-FhKJtP3r0LUqTVoQUg0VYIPuz3M=",
+ "_location": "/phonegap-plugin-push",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "phonegap-plugin-push@2.0.0",
+ "name": "phonegap-plugin-push",
+ "escapedName": "phonegap-plugin-push",
+ "rawSpec": "2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "2.0.0"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/phonegap-plugin-push/-/phonegap-plugin-push-2.0.0.tgz",
+ "_shasum": "161289b4fdebd0b52a4d5a10520d156083eecf73",
+ "_spec": "phonegap-plugin-push@2.0.0",
+ "_where": "/Users/user/Sites/stone-island/StoneIsland/node_modules",
+ "author": {
+ "name": "Adobe PhoneGap Team"
},
"bugs": {
"url": "https://github.com/phonegap/phonegap-plugin-push/issues"
},
+ "bundleDependencies": false,
"cordova": {
"id": "phonegap-plugin-push",
"platforms": [
@@ -19,16 +39,26 @@
"browser"
]
},
- "keywords": [
- "ecosystem:cordova",
- "ecosystem:phonegap",
- "cordova-ios",
- "cordova-android",
- "cordova-windows8",
- "cordova-windows",
- "cordova-wp8",
- "cordova-browser"
- ],
+ "dependencies": {
+ "babel-plugin-add-header-comment": "^1.0.3",
+ "install": "^0.8.2"
+ },
+ "deprecated": false,
+ "description": "Register and receive push notifications.",
+ "devDependencies": {
+ "babel-cli": "^6.10.1",
+ "babel-core": "^6.10.4",
+ "babel-eslint": "^6.1.0",
+ "babel-preset-es2015": "^6.9.0",
+ "eslint": "^2.13.1",
+ "eslint-config-airbnb": "^9.0.1",
+ "eslint-plugin-import": "^1.9.2",
+ "eslint-plugin-jsx-a11y": "^1.5.3",
+ "eslint-plugin-react": "^5.2.2",
+ "jasmine-node": "1.14.5",
+ "nodemon": "^1.9.2",
+ "pluginpub": "^0.0.8"
+ },
"engines": {
"cordovaDependencies": {
"1.8.2": {
@@ -36,23 +66,41 @@
"cordova-android": ">=4.0.0",
"cordova-ios": ">=4.1.0"
},
- "1.9.0": {
- "cordova-ios": ">=4.3.0",
- "cordova-android": ">=6.0.0",
- "cordova": ">=6.4.0"
- },
"2.0.0": {
- "cordova": ">100"
+ "cordova": ">=7.0.0",
+ "cordova-android": ">=6.2.1",
+ "cordova-ios": ">=4.4.0"
+ },
+ "<2.0.0": {
+ "cordova": ">=6.4.0",
+ "cordova-android": ">=6.0.0",
+ "cordova-ios": ">=4.3.0"
}
}
},
- "author": "Adobe PhoneGap Team",
- "license": "APL",
+ "homepage": "http://github.com/phonegap/phonegap-plugin-push#readme",
+ "keywords": [
+ "ecosystem:cordova",
+ "ecosystem:phonegap",
+ "cordova-ios",
+ "cordova-android",
+ "cordova-windows8",
+ "cordova-windows",
+ "cordova-wp8",
+ "cordova-browser"
+ ],
+ "license": "MIT",
+ "name": "phonegap-plugin-push",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/phonegap/phonegap-plugin-push.git"
+ },
"scripts": {
- "test": "jasmine-node --color spec"
+ "build": "babel src/js --out-dir www",
+ "build:watch": "nodemon -w ./src/js -e js -x npm run build",
+ "jasmine": "jasmine-node --color spec",
+ "test": "npm run build && npm run jasmine"
},
- "devDependencies": {
- "jasmine-node": "1.14.5",
- "pluginpub": "^0.0.5"
- }
+ "types": "./types/index.d.ts",
+ "version": "2.0.0"
}
diff --git a/StoneIsland/plugins/phonegap-plugin-push/plugin.xml b/StoneIsland/plugins/phonegap-plugin-push/plugin.xml
index bf9c659a..2c507e4d 100755
--- a/StoneIsland/plugins/phonegap-plugin-push/plugin.xml
+++ b/StoneIsland/plugins/phonegap-plugin-push/plugin.xml
@@ -1,75 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:amazon="http://schemas.android.com/apk/lib/com.amazon.device.ads" xmlns:rim="http://www.blackberry.com/ns/widgets" id="phonegap-plugin-push" version="1.9.2">
+<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:amazon="http://schemas.android.com/apk/lib/com.amazon.device.ads" xmlns:rim="http://www.blackberry.com/ns/widgets" id="phonegap-plugin-push" version="2.0.0">
<name>PushPlugin</name>
<description>
- This plugin allows your application to receive push notifications on Android, iOS and Windows devices.
- Android uses Google Cloud Messaging.
+ This plugin allows your application to receive push notifications on Android, iOS and Windows devices.
+ Android uses Firebase Cloud Messaging.
iOS uses Apple APNS Notifications.
Windows uses Microsoft WNS Notifications.
- </description>
+ </description>
<license>MIT</license>
<js-module src="www/push.js" name="PushNotification">
<clobbers target="PushNotification"/>
</js-module>
<engines>
- <engine name="cordova" version=">=6.4.0"/>
- <engine name="cordova-android" version=">=6.0.0"/>
- <engine name="cordova-ios" version=">=4.3.0"/>
+ <engine name="cordova" version=">=7.0.0"/>
+ <engine name="cordova-android" version=">=6.2.1"/>
+ <engine name="cordova-ios" version=">=4.4.0"/>
</engines>
- <preference name="SENDER_ID" default="85075801930"/>
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="PushNotification">
<param name="android-package" value="com.adobe.phonegap.push.PushPlugin"/>
</feature>
</config-file>
- <config-file target="res/values/strings.xml" parent="/resources">
- <string name="google_app_id">$SENDER_ID</string>
- </config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.VIBRATE"/>
- <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
- <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/>
- <uses-permission android:name="${applicationId}.permission.PushHandlerActivity"/>
- <permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
- <permission android:name="${applicationId}.permission.PushHandlerActivity" android:protectionLevel="signature"/>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity android:name="com.adobe.phonegap.push.PushHandlerActivity" android:exported="true" android:permission="${applicationId}.permission.PushHandlerActivity"/>
<receiver android:name="com.adobe.phonegap.push.BackgroundActionButtonHandler"/>
- <receiver android:name="com.google.android.gms.gcm.GcmReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
- <intent-filter>
- <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
- <category android:name="${applicationId}"/>
- </intent-filter>
- </receiver>
- <service android:name="com.adobe.phonegap.push.GCMIntentService" android:exported="false">
+ <receiver android:name="com.adobe.phonegap.push.PushDismissedHandler"/>
+ <service android:name="com.adobe.phonegap.push.FCMService">
<intent-filter>
- <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
+ <action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
- <service android:name="com.adobe.phonegap.push.PushInstanceIDListenerService" android:exported="false">
+ <service android:name="com.adobe.phonegap.push.PushInstanceIDListenerService">
<intent-filter>
- <action android:name="com.google.android.gms.iid.InstanceID"/>
+ <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
- <service android:name="com.adobe.phonegap.push.RegistrationIntentService" android:exported="false"/>
</config-file>
+ <framework src="com.android.support:support-v13:25.1.0"/>
+ <framework src="me.leolin:ShortcutBadger:1.1.17@aar"/>
+ <framework src="com.google.firebase:firebase-messaging:11.0.1"/>
<framework src="push.gradle" custom="true" type="gradleReference"/>
- <framework src="com.android.support:support-v13:23+"/>
- <framework src="com.google.android.gms:play-services-gcm:9.8+"/>
- <framework src="me.leolin:ShortcutBadger:1.1.11@aar"/>
- <source-file src="src/android/com/adobe/phonegap/push/GCMIntentService.java" target-dir="src/com/adobe/phonegap/push/"/>
+ <source-file src="src/android/com/adobe/phonegap/push/FCMService.java" target-dir="src/com/adobe/phonegap/push/"/>
<source-file src="src/android/com/adobe/phonegap/push/PushConstants.java" target-dir="src/com/adobe/phonegap/push/"/>
<source-file src="src/android/com/adobe/phonegap/push/PushHandlerActivity.java" target-dir="src/com/adobe/phonegap/push/"/>
<source-file src="src/android/com/adobe/phonegap/push/PushInstanceIDListenerService.java" target-dir="src/com/adobe/phonegap/push/"/>
<source-file src="src/android/com/adobe/phonegap/push/PushPlugin.java" target-dir="src/com/adobe/phonegap/push/"/>
- <source-file src="src/android/com/adobe/phonegap/push/RegistrationIntentService.java" target-dir="src/com/adobe/phonegap/push/"/>
<source-file src="src/android/com/adobe/phonegap/push/PermissionUtils.java" target-dir="src/com/adobe/phonegap/push/"/>
<source-file src="src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java" target-dir="src/com/adobe/phonegap/push/"/>
+ <source-file src="src/android/com/adobe/phonegap/push/PushDismissedHandler.java" target-dir="src/com/adobe/phonegap/push/"/>
</platform>
<platform name="browser">
<js-module src="www/browser/push.js" name="BrowserPush">
@@ -89,12 +74,6 @@
<string>remote-notification</string>
</array>
</config-file>
- <config-file target="*-Info.plist" parent="GCM_SENDER_ID">
- <string>$SENDER_ID</string>
- </config-file>
- <config-file target="*-Info.plist" parent="IS_GCM_ENABLED">
- <true/>
- </config-file>
<config-file target="*-Debug.plist" parent="aps-environment">
<string>development</string>
</config-file>
@@ -105,16 +84,12 @@
<source-file src="src/ios/PushPlugin.m"/>
<header-file src="src/ios/AppDelegate+notification.h"/>
<header-file src="src/ios/PushPlugin.h"/>
- <framework src="AddressBook.framework"/>
- <framework src="libsqlite3.tbd"/>
- <framework src="libz.tbd"/>
- <framework src="GoogleCloudMessaging" type="podspec" spec="~> 1.2.0"/>
- <framework src="GGLInstanceID" type="podspec" spec="~> 1.2.1"/>
+ <framework src="FirebaseMessaging" type="podspec" spec="~> 2.0.0"/>
</platform>
<platform name="windows">
<hook type="after_plugin_install" src="hooks/windows/setToastCapable.js"/>
<js-module src="src/windows/PushPluginProxy.js" name="PushPlugin">
- <merges target=""/>
+ <runs/>
</js-module>
<config-file target="config.xml" parent="/*">
<preference name="WindowsToastCapable" value="true"/>
diff --git a/StoneIsland/plugins/phonegap-plugin-push/push.gradle b/StoneIsland/plugins/phonegap-plugin-push/push.gradle
index 11e735ae..1506191b 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/push.gradle
+++ b/StoneIsland/plugins/phonegap-plugin-push/push.gradle
@@ -16,6 +16,24 @@ android {
}
defaultConfig {
+ multiDexEnabled true
applicationId = doExtractStringFromManifest("package")
}
}
+
+buildscript {
+ repositories {
+ jcenter()
+ mavenLocal()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:+'
+ classpath 'com.google.gms:google-services:3.0.0'
+ }
+}
+
+// apply plugin: 'com.google.gms.google-services'
+// class must be used instead of id(string) to be able to apply plugin from non-root gradle file
+ext.postBuildExtras = {
+ apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
+}
diff --git a/StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js b/StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js
index 8e1c2665..e41accd2 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js
+++ b/StoneIsland/plugins/phonegap-plugin-push/spec/index.spec.js
@@ -193,7 +193,7 @@ describe('phonegap-plugin-push', function () {
push.off('notification', eventHandler);
- expect(push._handlers.notification.indexOf(eventHandler)).toEqual(-1);
+ expect(push.handlers.notification.indexOf(eventHandler)).toEqual(-1);
done();
});
});
@@ -208,7 +208,7 @@ describe('phonegap-plugin-push', function () {
push.off('registration', eventHandler);
- expect(push._handlers.registration.indexOf(eventHandler)).toEqual(-1);
+ expect(push.handlers.registration.indexOf(eventHandler)).toEqual(-1);
done();
});
});
@@ -222,7 +222,7 @@ describe('phonegap-plugin-push', function () {
push.on('error', eventHandler);
push.off('error', eventHandler);
- expect(push._handlers.error.indexOf(eventHandler)).toEqual(-1);
+ expect(push.handlers.error.indexOf(eventHandler)).toEqual(-1);
done();
});
});
@@ -233,19 +233,19 @@ describe('phonegap-plugin-push', function () {
eventHandler = function () {
};
- expect(push._handlers.registration.length).toEqual(0);
+ expect(push.handlers.registration.length).toEqual(0);
push.on('registration',eventHandler);
- expect(push._handlers.registration.length).toEqual(1);
- expect(push._handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1);
+ expect(push.handlers.registration.length).toEqual(1);
+ expect(push.handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1);
execSpy.andCallFake(function (win, fail, service, id, args) {
win();
});
push.unregister(function() {
- expect(push._handlers.registration.length).toEqual(0);
- expect(push._handlers.registration.indexOf(eventHandler)).toEqual(-1);
+ expect(push.handlers.registration.length).toEqual(0);
+ expect(push.handlers.registration.indexOf(eventHandler)).toEqual(-1);
done();
});
});
@@ -255,19 +255,19 @@ describe('phonegap-plugin-push', function () {
eventHandler = function () {
};
- expect(push._handlers.notification.length).toEqual(0);
+ expect(push.handlers.notification.length).toEqual(0);
push.on('notification', eventHandler);
- expect(push._handlers.notification.length).toEqual(1);
- expect(push._handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1);
+ expect(push.handlers.notification.length).toEqual(1);
+ expect(push.handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1);
execSpy.andCallFake(function (win, fail, service, id, args) {
win();
});
push.unregister(function() {
- expect(push._handlers.notification.length).toEqual(0);
- expect(push._handlers.notification.indexOf(eventHandler)).toEqual(-1);
+ expect(push.handlers.notification.length).toEqual(0);
+ expect(push.handlers.notification.indexOf(eventHandler)).toEqual(-1);
done();
});
});
@@ -277,19 +277,19 @@ describe('phonegap-plugin-push', function () {
eventHandler = function () {
};
- expect(push._handlers.error.length).toEqual(0);
+ expect(push.handlers.error.length).toEqual(0);
push.on('error', eventHandler);
- expect(push._handlers.error.length).toEqual(1);
- expect(push._handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1);
+ expect(push.handlers.error.length).toEqual(1);
+ expect(push.handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1);
execSpy.andCallFake(function (win, fail, service, id, args) {
win();
});
push.unregister(function() {
- expect(push._handlers.error.length).toEqual(0);
- expect(push._handlers.error.indexOf(eventHandler)).toEqual(-1);
+ expect(push.handlers.error.length).toEqual(0);
+ expect(push.handlers.error.indexOf(eventHandler)).toEqual(-1);
done();
});
});
@@ -301,21 +301,21 @@ describe('phonegap-plugin-push', function () {
eventHandler = function () {
};
- expect(push._handlers.registration.length).toEqual(0);
+ expect(push.handlers.registration.length).toEqual(0);
push.on('registration',eventHandler);
- expect(push._handlers.registration.length).toEqual(1);
- expect(push._handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1);
+ expect(push.handlers.registration.length).toEqual(1);
+ expect(push.handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1);
execSpy.andCallFake(function (win, fail, service, id, args) {
win();
});
push.unregister(function() {
- expect(push._handlers.registration.length).toEqual(1);
- expect(push._handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1);
+ expect(push.handlers.registration.length).toEqual(1);
+ expect(push.handlers.registration.indexOf(eventHandler)).toBeGreaterThan(-1);
done();
- }, null, ['foo', 'bar']);
+ }, function() {}, ['foo', 'bar']);
});
it('should not clear "notification" event handlers', function (done) {
@@ -323,21 +323,21 @@ describe('phonegap-plugin-push', function () {
eventHandler = function () {
};
- expect(push._handlers.notification.length).toEqual(0);
+ expect(push.handlers.notification.length).toEqual(0);
push.on('notification', eventHandler);
- expect(push._handlers.notification.length).toEqual(1);
- expect(push._handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1);
+ expect(push.handlers.notification.length).toEqual(1);
+ expect(push.handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1);
execSpy.andCallFake(function (win, fail, service, id, args) {
win();
});
push.unregister(function() {
- expect(push._handlers.notification.length).toEqual(1);
- expect(push._handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1);
+ expect(push.handlers.notification.length).toEqual(1);
+ expect(push.handlers.notification.indexOf(eventHandler)).toBeGreaterThan(-1);
done();
- }, null, ['foo', 'bar']);
+ }, function() {}, ['foo', 'bar']);
});
it('should not clear "error" event handlers', function (done) {
@@ -345,21 +345,21 @@ describe('phonegap-plugin-push', function () {
eventHandler = function () {
};
- expect(push._handlers.error.length).toEqual(0);
+ expect(push.handlers.error.length).toEqual(0);
push.on('error', eventHandler);
- expect(push._handlers.error.length).toEqual(1);
- expect(push._handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1);
+ expect(push.handlers.error.length).toEqual(1);
+ expect(push.handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1);
execSpy.andCallFake(function (win, fail, service, id, args) {
win();
});
push.unregister(function() {
- expect(push._handlers.error.length).toEqual(1);
- expect(push._handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1);
+ expect(push.handlers.error.length).toEqual(1);
+ expect(push.handlers.error.indexOf(eventHandler)).toBeGreaterThan(-1);
done();
- }, null, ['foo', 'bar']);
+ }, function() {}, ['foo', 'bar']);
});
});
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java
index 3ccea6cb..4456f525 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/BackgroundActionButtonHandler.java
@@ -9,7 +9,7 @@ import android.util.Log;
import android.support.v4.app.RemoteInput;
public class BackgroundActionButtonHandler extends BroadcastReceiver implements PushConstants {
- private static String LOG_TAG = "PushPlugin_BackgroundActionButtonHandler";
+ private static String LOG_TAG = "Push_BGActionButton";
@Override
public void onReceive(Context context, Intent intent) {
@@ -19,7 +19,7 @@ public class BackgroundActionButtonHandler extends BroadcastReceiver implements
int notId = intent.getIntExtra(NOT_ID, 0);
Log.d(LOG_TAG, "not id = " + notId);
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
- notificationManager.cancel(GCMIntentService.getAppName(context), notId);
+ notificationManager.cancel(FCMService.getAppName(context), notId);
if (extras != null) {
Bundle originalExtras = extras.getBundle(PUSH_BUNDLE);
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/GCMIntentService.java b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/FCMService.java
index e1a2b75c..af328fb2 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/GCMIntentService.java
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/FCMService.java
@@ -13,17 +13,23 @@ import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
+import android.graphics.PorterDuff;
+import android.graphics.PorterDuffXfermode;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import android.graphics.Paint;
+import android.graphics.Canvas;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
-import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.app.NotificationCompat.WearableExtender;
import android.support.v4.app.RemoteInput;
import android.text.Html;
import android.text.Spanned;
import android.util.Log;
-import com.google.android.gms.gcm.GcmListenerService;
+import com.google.firebase.messaging.FirebaseMessagingService;
+import com.google.firebase.messaging.RemoteMessage;
import org.json.JSONArray;
import org.json.JSONException;
@@ -36,12 +42,13 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.Map;
import java.util.Random;
@SuppressLint("NewApi")
-public class GCMIntentService extends GcmListenerService implements PushConstants {
+public class FCMService extends FirebaseMessagingService implements PushConstants {
- private static final String LOG_TAG = "PushPlugin_GCMIntentService";
+ private static final String LOG_TAG = "Push_FCMService";
private static HashMap<Integer, ArrayList<String>> messageMap = new HashMap<Integer, ArrayList<String>>();
public void setNotification(int notId, String message){
@@ -59,17 +66,31 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
}
@Override
- public void onMessageReceived(String from, Bundle extras) {
+ public void onMessageReceived(RemoteMessage message){
+
+ String from = message.getFrom();
Log.d(LOG_TAG, "onMessage - from: " + from);
- if (extras != null) {
+ Bundle extras = new Bundle();
+
+ if (message.getNotification()!=null) {
+ extras.putString(TITLE,message.getNotification().getTitle());
+ extras.putString(MESSAGE,message.getNotification().getBody());
+ }
+ for (Map.Entry<String, String> entry : message.getData().entrySet()) {
+ extras.putString(entry.getKey(), entry.getValue());
+ }
+
+ if (extras != null && isAvailableSender(from)) {
Context applicationContext = getApplicationContext();
SharedPreferences prefs = applicationContext.getSharedPreferences(PushPlugin.COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE);
boolean forceShow = prefs.getBoolean(FORCE_SHOW, false);
boolean clearBadge = prefs.getBoolean(CLEAR_BADGE, false);
+ String messageKey = prefs.getString(MESSAGE_KEY, MESSAGE);
+ String titleKey = prefs.getString(TITLE_KEY, TITLE);
- extras = normalizeExtras(applicationContext, extras);
+ extras = normalizeExtras(applicationContext, extras, messageKey, titleKey);
if (clearBadge) {
PushPlugin.setApplicationIconBadgeNumber(getApplicationContext(), 0);
@@ -167,10 +188,10 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
/*
* Replace alternate keys with our canonical value
*/
- private String normalizeKey(String key) {
- if (key.equals(BODY) || key.equals(ALERT) || key.equals(GCM_NOTIFICATION_BODY) || key.equals(TWILIO_BODY)) {
+ private String normalizeKey(String key, String messageKey, String titleKey) {
+ if (key.equals(BODY) || key.equals(ALERT) || key.equals(MP_MESSAGE) || key.equals(GCM_NOTIFICATION_BODY) || key.equals(TWILIO_BODY) || key.equals(messageKey)) {
return MESSAGE;
- } else if (key.equals(TWILIO_TITLE)) {
+ } else if (key.equals(TWILIO_TITLE) || key.equals(SUBJECT) || key.equals(titleKey)) {
return TITLE;
}else if (key.equals(MSGCNT) || key.equals(BADGE)) {
return COUNT;
@@ -191,7 +212,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
/*
* Parse bundle into normalized keys.
*/
- private Bundle normalizeExtras(Context context, Bundle extras) {
+ private Bundle normalizeExtras(Context context, Bundle extras, String messageKey, String titleKey) {
Log.d(LOG_TAG, "normalize extras");
Iterator<String> it = extras.keySet().iterator();
Bundle newExtras = new Bundle();
@@ -203,7 +224,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
// If normalizeKeythe key is "data" or "message" and the value is a json object extract
// This is to support parse.com and other services. Issue #147 and pull #218
- if (key.equals(PARSE_COM_DATA) || key.equals(MESSAGE)) {
+ if (key.equals(PARSE_COM_DATA) || key.equals(MESSAGE) || key.equals(messageKey)) {
Object json = extras.get(key);
// Make sure data is json object stringified
if ( json instanceof String && ((String) json).startsWith("{") ) {
@@ -211,7 +232,8 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
try {
// If object contains message keys promote each value to the root of the bundle
JSONObject data = new JSONObject((String) json);
- if ( data.has(ALERT) || data.has(MESSAGE) || data.has(BODY) || data.has(TITLE) ) {
+ if ( data.has(ALERT) || data.has(MESSAGE) || data.has(BODY) || data.has(TITLE) ||
+ data.has(messageKey) || data.has(titleKey) ) {
Iterator<String> jsonIter = data.keys();
while (jsonIter.hasNext()) {
String jsonKey = jsonIter.next();
@@ -219,7 +241,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
Log.d(LOG_TAG, "key = data/" + jsonKey);
String value = data.getString(jsonKey);
- jsonKey = normalizeKey(jsonKey);
+ jsonKey = normalizeKey(jsonKey, messageKey, titleKey);
value = localizeKey(context, jsonKey, value);
newExtras.putString(jsonKey, value);
@@ -228,6 +250,10 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
} catch( JSONException e) {
Log.e(LOG_TAG, "normalizeExtras: JSON exception");
}
+ } else {
+ String newKey = normalizeKey(key, messageKey, titleKey);
+ Log.d(LOG_TAG, "replace key " + key + " with " + newKey);
+ replaceKey(context, key, newKey, extras, newExtras);
}
} else if (key.equals(("notification"))) {
Bundle value = extras.getBundle(key);
@@ -236,7 +262,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
String notifkey = iterator.next();
Log.d(LOG_TAG, "notifkey = " + notifkey);
- String newKey = normalizeKey(notifkey);
+ String newKey = normalizeKey(notifkey, messageKey, titleKey);
Log.d(LOG_TAG, "replace key " + notifkey + " with " + newKey);
String valueData = value.getString(notifkey);
@@ -245,12 +271,17 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
newExtras.putString(newKey, valueData);
}
continue;
+ // In case we weren't working on the payload data node or the notification node,
+ // normalize the key.
+ // This allows to have "message" as the payload data key without colliding
+ // with the other "message" key (holding the body of the payload)
+ // See issue #1663
+ } else {
+ String newKey = normalizeKey(key, messageKey, titleKey);
+ Log.d(LOG_TAG, "replace key " + key + " with " + newKey);
+ replaceKey(context, key, newKey, extras, newExtras);
}
- String newKey = normalizeKey(key);
- Log.d(LOG_TAG, "replace key " + key + " with " + newKey);
- replaceKey(context, key, newKey, extras, newExtras);
-
} // while
return newExtras;
@@ -301,15 +332,15 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
createNotification(context, extras);
}
- if(!PushPlugin.isActive() && "1".equals(forceStart)){
+ if(!PushPlugin.isActive() && "1".equals(forceStart)){
Log.d(LOG_TAG, "app is not running but we should start it and put in background");
- Intent intent = new Intent(this, PushHandlerActivity.class);
+ Intent intent = new Intent(this, PushHandlerActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(PUSH_BUNDLE, extras);
- intent.putExtra(START_IN_BACKGROUND, true);
+ intent.putExtra(START_IN_BACKGROUND, true);
intent.putExtra(FOREGROUND, false);
startActivity(intent);
- } else if ("1".equals(contentAvailable)) {
+ } else if ("1".equals(contentAvailable)) {
Log.d(LOG_TAG, "app is not running and content available true");
Log.d(LOG_TAG, "send notification event");
PushPlugin.sendExtras(extras);
@@ -331,12 +362,22 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
int requestCode = new Random().nextInt();
PendingIntent contentIntent = PendingIntent.getActivity(this, requestCode, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
+ Intent dismissedNotificationIntent = new Intent(this, PushDismissedHandler.class);
+ dismissedNotificationIntent.putExtra(PUSH_BUNDLE, extras);
+ dismissedNotificationIntent.putExtra(NOT_ID, notId);
+ dismissedNotificationIntent.putExtra(DISMISSED, true);
+ dismissedNotificationIntent.setAction(PUSH_DISMISSED);
+
+ requestCode = new Random().nextInt();
+ PendingIntent deleteIntent = PendingIntent.getBroadcast(this, requestCode, dismissedNotificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);
+
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(context)
.setWhen(System.currentTimeMillis())
.setContentTitle(fromHtml(extras.getString(TITLE)))
.setTicker(fromHtml(extras.getString(TITLE)))
.setContentIntent(contentIntent)
+ .setDeleteIntent(deleteIntent)
.setAutoCancel(true);
SharedPreferences prefs = context.getSharedPreferences(PushPlugin.COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE);
@@ -690,11 +731,46 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
}
}
+ private Bitmap getCircleBitmap(Bitmap bitmap) {
+ if (bitmap == null) {
+ return null;
+ }
+
+ final Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
+ final Canvas canvas = new Canvas(output);
+ final int color = Color.RED;
+ final Paint paint = new Paint();
+ final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
+ final RectF rectF = new RectF(rect);
+
+ paint.setAntiAlias(true);
+ canvas.drawARGB(0, 0, 0, 0);
+ paint.setColor(color);
+ float cx = bitmap.getWidth()/2;
+ float cy = bitmap.getHeight()/2;
+ float radius = cx < cy ? cx : cy;
+ canvas.drawCircle(cx,cy,radius,paint);
+
+ paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
+ canvas.drawBitmap(bitmap, rect, rect, paint);
+
+ bitmap.recycle();
+
+ return output;
+ }
+
private void setNotificationLargeIcon(Bundle extras, String packageName, Resources resources, NotificationCompat.Builder mBuilder) {
String gcmLargeIcon = extras.getString(IMAGE); // from gcm
+ String imageType = extras.getString(IMAGE_TYPE, IMAGE_TYPE_SQUARE);
if (gcmLargeIcon != null && !"".equals(gcmLargeIcon)) {
if (gcmLargeIcon.startsWith("http://") || gcmLargeIcon.startsWith("https://")) {
- mBuilder.setLargeIcon(getBitmapFromURL(gcmLargeIcon));
+ Bitmap bitmap = getBitmapFromURL(gcmLargeIcon);
+ if (IMAGE_TYPE_SQUARE.equalsIgnoreCase(imageType)) {
+ mBuilder.setLargeIcon(bitmap);
+ } else {
+ Bitmap bm = getCircleBitmap(bitmap);
+ mBuilder.setLargeIcon(bm);
+ }
Log.d(LOG_TAG, "using remote large-icon from gcm");
} else {
AssetManager assetManager = getAssets();
@@ -702,7 +778,12 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
try {
istr = assetManager.open(gcmLargeIcon);
Bitmap bitmap = BitmapFactory.decodeStream(istr);
- mBuilder.setLargeIcon(bitmap);
+ if (IMAGE_TYPE_SQUARE.equalsIgnoreCase(imageType)) {
+ mBuilder.setLargeIcon(bitmap);
+ } else {
+ Bitmap bm = getCircleBitmap(bitmap);
+ mBuilder.setLargeIcon(bm);
+ }
Log.d(LOG_TAG, "using assets large-icon from gcm");
} catch (IOException e) {
int largeIconId = 0;
@@ -762,6 +843,7 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
try {
URL url = new URL(strURL);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setConnectTimeout(15000);
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
@@ -799,4 +881,11 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
else
return null;
}
+
+ private boolean isAvailableSender(String from) {
+ SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(PushPlugin.COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE);
+ String savedSenderID = sharedPref.getString(SENDER_ID, "");
+
+ return from.equals(savedSenderID) || from.startsWith("/topics/");
+ }
}
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PermissionUtils.java b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PermissionUtils.java
index 6aa5c9bf..41bc6a6f 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PermissionUtils.java
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PermissionUtils.java
@@ -10,8 +10,12 @@ import java.lang.reflect.Method;
public class PermissionUtils {
private static final String CHECK_OP_NO_THROW = "checkOpNoThrow";
+ private static final int MIN_API_LEVEL = 19; // required by AppOpsManager
public static boolean hasPermission(Context appContext, String appOpsServiceId) throws UnknownError {
+ if (android.os.Build.VERSION.SDK_INT < MIN_API_LEVEL) {
+ return true;
+ }
ApplicationInfo appInfo = appContext.getApplicationInfo();
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushConstants.java b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushConstants.java
index 37874e04..e3aa217c 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushConstants.java
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushConstants.java
@@ -3,6 +3,7 @@ package com.adobe.phonegap.push;
public interface PushConstants {
public static final String COM_ADOBE_PHONEGAP_PUSH = "com.adobe.phonegap.push";
public static final String REGISTRATION_ID = "registrationId";
+ public static final String REGISTRATION_TYPE = "registrationType";
public static final String FOREGROUND = "foreground";
public static final String TITLE = "title";
public static final String NOT_ID = "notId";
@@ -55,10 +56,11 @@ public interface PushConstants {
public static final String FROM = "from";
public static final String COLLAPSE_KEY = "collapse_key";
public static final String FORCE_SHOW = "forceShow";
- public static final String GCM = "GCM";
+ public static final String FCM = "FCM";
public static final String CONTENT_AVAILABLE = "content-available";
public static final String TOPICS = "topics";
public static final String SET_APPLICATION_ICON_BADGE_NUMBER = "setApplicationIconBadgeNumber";
+ public static final String GET_APPLICATION_ICON_BADGE_NUMBER = "getApplicationIconBadgeNumber";
public static final String CLEAR_ALL_NOTIFICATIONS = "clearAllNotifications";
public static final String VISIBILITY = "visibility";
public static final String INLINE_REPLY = "inlineReply";
@@ -67,6 +69,18 @@ public interface PushConstants {
public static final String TWILIO_BODY = "twi_body";
public static final String TWILIO_TITLE = "twi_title";
public static final String TWILIO_SOUND = "twi_sound";
+ public static final String MP_MESSAGE = "mp_message";
public static final String START_IN_BACKGROUND = "cdvStartInBackground";
public static final String FORCE_START = "force-start";
+ public static final String MESSAGE_KEY = "messageKey";
+ public static final String TITLE_KEY = "titleKey";
+ public static final String NO_CACHE = "no-cache";
+ public static final String DISMISSED = "dismissed";
+ public static final String IMAGE_TYPE = "image-type";
+ public static final String IMAGE_TYPE_SQUARE = "square";
+ public static final String IMAGE_TYPE_CIRCLE = "circle";
+ public static final String SUBJECT = "subject";
+ public static final String GOOGLE_APP_ID = "google_app_id";
+ public static final String GCM_DEFAULT_SENDER_ID = "gcm_defaultSenderId";
+ public static final String PUSH_DISMISSED = "push_dismissed";
}
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushDismissedHandler.java b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushDismissedHandler.java
new file mode 100644
index 00000000..a517bc1e
--- /dev/null
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushDismissedHandler.java
@@ -0,0 +1,25 @@
+package com.adobe.phonegap.push;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+
+public class PushDismissedHandler extends BroadcastReceiver implements PushConstants {
+ private static String LOG_TAG = "Push_DismissedHandler";
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ Bundle extras = intent.getExtras();
+ FCMService fcm = new FCMService();
+ String action = intent.getAction();
+ int notID = intent.getIntExtra(NOT_ID, 0);
+
+ if (action.equals(PUSH_DISMISSED)) {
+ Log.d(LOG_TAG, "PushDismissedHandler = " + extras);
+ Log.d(LOG_TAG, "not id = " + notID);
+
+ fcm.setNotification(notID, "");
+ }
+ }
+}
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushHandlerActivity.java b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushHandlerActivity.java
index 23682ac8..0d399a61 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushHandlerActivity.java
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushHandlerActivity.java
@@ -11,7 +11,7 @@ import android.support.v4.app.RemoteInput;
public class PushHandlerActivity extends Activity implements PushConstants {
- private static String LOG_TAG = "PushPlugin_PushHandlerActivity";
+ private static String LOG_TAG = "Push_HandlerActivity";
/*
* this activity will be started if the user touches a notification that we own.
@@ -21,7 +21,7 @@ public class PushHandlerActivity extends Activity implements PushConstants {
*/
@Override
public void onCreate(Bundle savedInstanceState) {
- GCMIntentService gcm = new GCMIntentService();
+ FCMService gcm = new FCMService();
Intent intent = getIntent();
@@ -34,16 +34,18 @@ public class PushHandlerActivity extends Activity implements PushConstants {
Log.d(LOG_TAG, "callback = " + callback);
boolean foreground = getIntent().getExtras().getBoolean("foreground", true);
boolean startOnBackground = getIntent().getExtras().getBoolean(START_IN_BACKGROUND, false);
+ boolean dismissed = getIntent().getExtras().getBoolean(DISMISSED, false);
+ Log.d(LOG_TAG, "dismissed = " + dismissed);
if(!startOnBackground){
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
- notificationManager.cancel(GCMIntentService.getAppName(this), notId);
+ notificationManager.cancel(FCMService.getAppName(this), notId);
}
boolean isPushPluginActive = PushPlugin.isActive();
boolean inline = processPushBundle(isPushPluginActive, intent);
- if(inline && android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N){
+ if(inline && android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N && !startOnBackground){
foreground = true;
}
@@ -51,15 +53,17 @@ public class PushHandlerActivity extends Activity implements PushConstants {
finish();
- Log.d(LOG_TAG, "isPushPluginActive = " + isPushPluginActive);
- if (!isPushPluginActive && foreground && inline) {
- Log.d(LOG_TAG, "forceMainActivityReload");
- forceMainActivityReload(false);
- } else if(startOnBackground) {
- Log.d(LOG_TAG, "startOnBackgroundTrue");
- forceMainActivityReload(true);
- } else {
- Log.d(LOG_TAG, "don't want main activity");
+ if(!dismissed) {
+ Log.d(LOG_TAG, "isPushPluginActive = " + isPushPluginActive);
+ if (!isPushPluginActive && foreground && inline) {
+ Log.d(LOG_TAG, "forceMainActivityReload");
+ forceMainActivityReload(false);
+ } else if(startOnBackground) {
+ Log.d(LOG_TAG, "startOnBackgroundTrue");
+ forceMainActivityReload(true);
+ } else {
+ Log.d(LOG_TAG, "don't want main activity");
+ }
}
}
@@ -76,7 +80,9 @@ public class PushHandlerActivity extends Activity implements PushConstants {
originalExtras.putBoolean(FOREGROUND, false);
originalExtras.putBoolean(COLDSTART, !isPushPluginActive);
+ originalExtras.putBoolean(DISMISSED, extras.getBoolean(DISMISSED));
originalExtras.putString(ACTION_CALLBACK, extras.getString(CALLBACK));
+ originalExtras.remove(NO_CACHE);
remoteInput = RemoteInput.getResultsFromIntent(intent);
if (remoteInput != null) {
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushInstanceIDListenerService.java b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushInstanceIDListenerService.java
index eaa39a48..176b7419 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushInstanceIDListenerService.java
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushInstanceIDListenerService.java
@@ -5,23 +5,22 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
-import com.google.android.gms.iid.InstanceID;
-import com.google.android.gms.iid.InstanceIDListenerService;
+import com.google.firebase.iid.FirebaseInstanceId;
+import com.google.firebase.iid.FirebaseInstanceIdService;
import org.json.JSONException;
import java.io.IOException;
-public class PushInstanceIDListenerService extends InstanceIDListenerService implements PushConstants {
- public static final String LOG_TAG = "PushPlugin_PushInstanceIDListenerService";
+public class PushInstanceIDListenerService extends FirebaseInstanceIdService implements PushConstants {
+ public static final String LOG_TAG = "Push_InsIdService";
@Override
public void onTokenRefresh() {
- SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE);
- String senderID = sharedPref.getString(SENDER_ID, "");
- if (!"".equals(senderID)) {
- Intent intent = new Intent(this, RegistrationIntentService.class);
- startService(intent);
- }
+ // Get updated InstanceID token.
+ String refreshedToken = FirebaseInstanceId.getInstance().getToken();
+ Log.d(LOG_TAG, "Refreshed token: " + refreshedToken);
+ // TODO: Implement this method to send any registration to your app's servers.
+ //sendRegistrationToServer(refreshedToken);
}
}
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushPlugin.java b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushPlugin.java
index f6faaa2b..32f72bf3 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushPlugin.java
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/PushPlugin.java
@@ -1,13 +1,14 @@
package com.adobe.phonegap.push;
+import android.app.Activity;
import android.app.NotificationManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
-import com.google.android.gms.gcm.GcmPubSub;
-import com.google.android.gms.iid.InstanceID;
+import com.google.firebase.iid.FirebaseInstanceId;
+import com.google.firebase.messaging.FirebaseMessaging;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaInterface;
@@ -29,7 +30,7 @@ import me.leolin.shortcutbadger.ShortcutBadger;
public class PushPlugin extends CordovaPlugin implements PushConstants {
- public static final String LOG_TAG = "PushPlugin";
+ public static final String LOG_TAG = "Push_Plugin";
private static CallbackContext pushContext;
private static CordovaWebView gWebView;
@@ -59,6 +60,7 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
Log.v(LOG_TAG, "execute: data=" + data.toString());
SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE);
+ String token = null;
String senderID = null;
try {
@@ -66,15 +68,19 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
Log.v(LOG_TAG, "execute: jo=" + jo.toString());
- senderID = jo.getString(SENDER_ID);
+ senderID = getStringResourceByName(GCM_DEFAULT_SENDER_ID);
Log.v(LOG_TAG, "execute: senderID=" + senderID);
- String savedSenderID = sharedPref.getString(SENDER_ID, "");
- registration_id = InstanceID.getInstance(getApplicationContext()).getToken(senderID, GCM);
+ token = FirebaseInstanceId.getInstance().getToken();
- if (!"".equals(registration_id)) {
- JSONObject json = new JSONObject().put(REGISTRATION_ID, registration_id);
+ if (token == null) {
+ token = FirebaseInstanceId.getInstance().getToken(senderID,FCM);
+ }
+
+ if (!"".equals(token)) {
+ JSONObject json = new JSONObject().put(REGISTRATION_ID, token);
+ json.put(REGISTRATION_TYPE, FCM);
Log.v(LOG_TAG, "onRegistered: " + json.toString());
@@ -83,14 +89,14 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
PushPlugin.sendEvent( json );
} else {
- callbackContext.error("Empty registration ID received from GCM");
+ callbackContext.error("Empty registration ID received from FCM");
return;
}
} catch (JSONException e) {
Log.e(LOG_TAG, "execute: Got JSON Exception " + e.getMessage());
callbackContext.error(e.getMessage());
} catch (IOException e) {
- Log.e(LOG_TAG, "execute: Got JSON Exception " + e.getMessage());
+ Log.e(LOG_TAG, "execute: Got IO Exception " + e.getMessage());
callbackContext.error(e.getMessage());
}
@@ -118,6 +124,8 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
editor.putBoolean(CLEAR_NOTIFICATIONS, jo.optBoolean(CLEAR_NOTIFICATIONS, true));
editor.putBoolean(FORCE_SHOW, jo.optBoolean(FORCE_SHOW, false));
editor.putString(SENDER_ID, senderID);
+ editor.putString(MESSAGE_KEY, jo.optString(MESSAGE_KEY));
+ editor.putString(TITLE_KEY, jo.optString(TITLE_KEY));
editor.commit();
}
@@ -143,7 +151,7 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
if (topics != null && !"".equals(registration_id)) {
unsubscribeFromTopics(topics, registration_id);
} else {
- InstanceID.getInstance(getApplicationContext()).deleteInstanceID();
+ FirebaseInstanceId.getInstance().deleteInstanceId();
Log.v(LOG_TAG, "UNREGISTER");
// Remove shared prefs
@@ -194,6 +202,13 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
callbackContext.success();
}
});
+ } else if (GET_APPLICATION_ICON_BADGE_NUMBER.equals(action)) {
+ cordova.getThreadPool().execute(new Runnable() {
+ public void run() {
+ Log.v(LOG_TAG, "getApplicationIconBadgeNumber");
+ callbackContext.success(getApplicationIconBadgeNumber(getApplicationContext()));
+ }
+ });
} else if (CLEAR_ALL_NOTIFICATIONS.equals(action)) {
cordova.getThreadPool().execute(new Runnable() {
public void run() {
@@ -212,8 +227,6 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
callbackContext.success();
} catch (JSONException e) {
callbackContext.error(e.getMessage());
- } catch (IOException e) {
- callbackContext.error(e.getMessage());
}
}
});
@@ -227,8 +240,6 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
callbackContext.success();
} catch (JSONException e) {
callbackContext.error(e.getMessage());
- } catch (IOException e) {
- callbackContext.error(e.getMessage());
}
}
});
@@ -259,25 +270,41 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
/*
* Sends the pushbundle extras to the client application.
- * If the client application isn't currently active, it is cached for later processing.
+ * If the client application isn't currently active and the no-cache flag is not set, it is cached for later processing.
*/
public static void sendExtras(Bundle extras) {
if (extras != null) {
+ String noCache = extras.getString(NO_CACHE);
if (gWebView != null) {
sendEvent(convertBundleToJson(extras));
- } else {
+ } else if(!"1".equals(noCache)){
Log.v(LOG_TAG, "sendExtras: caching extras to send at a later time.");
gCachedExtras.add(extras);
}
}
}
+ /*
+ * Retrives badge count from SharedPreferences
+ */
+ public static int getApplicationIconBadgeNumber(Context context){
+ SharedPreferences settings = context.getSharedPreferences(BADGE, Context.MODE_PRIVATE);
+ return settings.getInt(BADGE, 0);
+ }
+
+ /*
+ * Sets badge count on application icon and in SharedPreferences
+ */
public static void setApplicationIconBadgeNumber(Context context, int badgeCount) {
if (badgeCount > 0) {
ShortcutBadger.applyCount(context, badgeCount);
- } else {
+ }else{
ShortcutBadger.removeCount(context);
}
+
+ SharedPreferences.Editor editor = context.getSharedPreferences(BADGE, Context.MODE_PRIVATE).edit();
+ editor.putInt(BADGE, Math.max(badgeCount, 0));
+ editor.apply();
}
@Override
@@ -315,23 +342,7 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
notificationManager.cancelAll();
}
- /**
- * Transform `topic name` to `topic path`
- * Normally, the `topic` inputed from end-user is `topic name` only.
- * We should convert them to GCM `topic path`
- * Example:
- * when topic name = 'my-topic'
- * then topic path = '/topics/my-topic'
- *
- * @param String topic The topic name
- * @return The topic path
- */
- private String getTopicPath(String topic)
- {
- return "/topics/" + topic;
- }
-
- private void subscribeToTopics(JSONArray topics, String registrationToken) throws IOException {
+ private void subscribeToTopics(JSONArray topics, String registrationToken) {
if (topics != null) {
String topic = null;
for (int i=0; i<topics.length(); i++) {
@@ -341,16 +352,10 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
}
}
- private void subscribeToTopic(String topic, String registrationToken) throws IOException
- {
- try {
- if (topic != null) {
- Log.d(LOG_TAG, "Subscribing to topic: " + topic);
- GcmPubSub.getInstance(getApplicationContext()).subscribe(registrationToken, getTopicPath(topic), null);
- }
- } catch (IOException e) {
- Log.e(LOG_TAG, "Failed to subscribe to topic: " + topic, e);
- throw e;
+ private void subscribeToTopic(String topic, String registrationToken) {
+ if (topic != null) {
+ Log.d(LOG_TAG, "Subscribing to topic: " + topic);
+ FirebaseMessaging.getInstance().subscribeToTopic(topic);
}
}
@@ -358,29 +363,20 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
if (topics != null) {
String topic = null;
for (int i=0; i<topics.length(); i++) {
- try {
- topic = topics.optString(i, null);
- if (topic != null) {
- Log.d(LOG_TAG, "Unsubscribing to topic: " + topic);
- GcmPubSub.getInstance(getApplicationContext()).unsubscribe(registrationToken, getTopicPath(topic));
- }
- } catch (IOException e) {
- Log.e(LOG_TAG, "Failed to unsubscribe to topic: " + topic, e);
+ topic = topics.optString(i, null);
+ unsubscribeFromTopic(topic, registrationToken);
+ if (topic != null) {
+ Log.d(LOG_TAG, "Unsubscribing to topic: " + topic);
+ FirebaseMessaging.getInstance().unsubscribeFromTopic(topic);
}
}
}
}
- private void unsubscribeFromTopic(String topic, String registrationToken) throws IOException
- {
- try {
- if (topic != null) {
- Log.d(LOG_TAG, "Unsubscribing to topic: " + topic);
- GcmPubSub.getInstance(getApplicationContext()).unsubscribe(registrationToken, getTopicPath(topic));
- }
- } catch (IOException e) {
- Log.e(LOG_TAG, "Failed to unsubscribe to topic: " + topic, e);
- throw e;
+ private void unsubscribeFromTopic(String topic, String registrationToken) {
+ if (topic != null) {
+ Log.d(LOG_TAG, "Unsubscribing to topic: " + topic);
+ FirebaseMessaging.getInstance().unsubscribeFromTopic(topic);
}
}
@@ -413,6 +409,9 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
else if (key.equals(FOREGROUND)) {
additionalData.put(key, extras.getBoolean(FOREGROUND));
}
+ else if (key.equals(DISMISSED)) {
+ additionalData.put(key, extras.getBoolean(DISMISSED));
+ }
else if ( value instanceof String ) {
String strValue = (String)value;
try {
@@ -444,6 +443,13 @@ public class PushPlugin extends CordovaPlugin implements PushConstants {
return null;
}
+ private String getStringResourceByName(String aString) {
+ Activity activity = cordova.getActivity();
+ String packageName = activity.getPackageName();
+ int resId = activity.getResources().getIdentifier(aString, "string", packageName);
+ return activity.getString(resId);
+ }
+
public static boolean isInForeground() {
return gForeground;
}
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/RegistrationIntentService.java b/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/RegistrationIntentService.java
deleted file mode 100644
index b181e88e..00000000
--- a/StoneIsland/plugins/phonegap-plugin-push/src/android/com/adobe/phonegap/push/RegistrationIntentService.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.adobe.phonegap.push;
-
-import android.content.Context;
-
-import android.app.IntentService;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.util.Log;
-
-import com.google.android.gms.gcm.GoogleCloudMessaging;
-import com.google.android.gms.iid.InstanceID;
-
-import java.io.IOException;
-
-public class RegistrationIntentService extends IntentService implements PushConstants {
- public static final String LOG_TAG = "PushPlugin_RegistrationIntentService";
-
- public RegistrationIntentService() {
- super(LOG_TAG);
- }
-
- @Override
- protected void onHandleIntent(Intent intent) {
- SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE);
-
- try {
- InstanceID instanceID = InstanceID.getInstance(this);
- String senderID = sharedPreferences.getString(SENDER_ID, "");
- String token = instanceID.getToken(senderID,
- GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
- PushPlugin.setRegistrationID(token);
- Log.i(LOG_TAG, "new GCM Registration Token: " + token);
-
- } catch (Exception e) {
- Log.d(LOG_TAG, "Failed to complete token refresh", e);
- }
- }
-}
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/browser/manifest.json b/StoneIsland/plugins/phonegap-plugin-push/src/browser/manifest.json
index ce8390ab..eff52c74 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/browser/manifest.json
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/browser/manifest.json
@@ -1,4 +1,4 @@
{
"name": "Push Demo",
- "gcm_sender_id": "85075801930"
+ "gcm_sender_id": "996231231186"
}
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.h b/StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.h
index 276a0080..4cc1dcb0 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.h
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.h
@@ -29,7 +29,7 @@
@protocol GGLInstanceIDDelegate;
@protocol GCMReceiverDelegate;
-@interface PushPlugin : CDVPlugin<GGLInstanceIDDelegate, GCMReceiverDelegate>
+@interface PushPlugin : CDVPlugin
{
NSDictionary *notificationMessage;
BOOL isInline;
@@ -68,13 +68,12 @@
- (void)didSendDataMessageWithID:(NSString *)messageID;
- (void)didDeleteMessagesOnServer;
-// GCM Features
-@property(nonatomic, assign) BOOL usesGCM;
-@property(nonatomic, strong) NSNumber* gcmSandbox;
-@property(nonatomic, strong) NSString *gcmSenderId;
-@property(nonatomic, strong) NSDictionary *gcmRegistrationOptions;
-@property(nonatomic, strong) void (^gcmRegistrationHandler) (NSString *registrationToken, NSError *error);
-@property(nonatomic, strong) NSString *gcmRegistrationToken;
-@property(nonatomic, strong) NSArray *gcmTopics;
+// FCM Features
+@property(nonatomic, assign) BOOL usesFCM;
+@property(nonatomic, strong) NSNumber *fcmSandbox;
+@property(nonatomic, strong) NSString *fcmSenderId;
+@property(nonatomic, strong) NSDictionary *fcmRegistrationOptions;
+@property(nonatomic, strong) NSString *fcmRegistrationToken;
+@property(nonatomic, strong) NSArray *fcmTopics;
@end
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.m b/StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.m
index a176b9af..90475d10 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.m
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/ios/PushPlugin.m
@@ -27,8 +27,9 @@
#define GMP_NO_MODULES true
#import "PushPlugin.h"
-#import "GoogleCloudMessaging.h"
-#import "GGLInstanceIDHeaders.h"
+@import FirebaseInstanceID;
+@import FirebaseMessaging;
+@import FirebaseAnalytics;
@implementation PushPlugin : CDVPlugin
@@ -42,78 +43,62 @@
@synthesize clearBadge;
@synthesize handlerObj;
-@synthesize usesGCM;
-@synthesize gcmSandbox;
-@synthesize gcmSenderId;
-@synthesize gcmRegistrationOptions;
-@synthesize gcmRegistrationHandler;
-@synthesize gcmRegistrationToken;
-@synthesize gcmTopics;
+@synthesize usesFCM;
+@synthesize fcmSandbox;
+@synthesize fcmSenderId;
+@synthesize fcmRegistrationOptions;
+@synthesize fcmRegistrationToken;
+@synthesize fcmTopics;
--(void)initGCMRegistrationHandler;
+-(void)initRegistration;
{
- __weak __block PushPlugin *weakSelf = self;
- gcmRegistrationHandler = ^(NSString *registrationToken, NSError *error){
- if (registrationToken != nil) {
- NSLog(@"GCM Registration Token: %@", registrationToken);
- [weakSelf setGcmRegistrationToken: registrationToken];
+ NSString * registrationToken = [[FIRInstanceID instanceID] token];
- id topics = [weakSelf gcmTopics];
- if (topics != nil) {
- for (NSString *topic in topics) {
- NSLog(@"subscribe from topic: %@", topic);
- id pubSub = [GCMPubSub sharedInstance];
- [pubSub subscribeWithToken: [weakSelf gcmRegistrationToken]
- topic:[NSString stringWithFormat:@"/topics/%@", topic]
- options:nil
- handler:^void(NSError *error) {
- if (error) {
- if (error.code == 3001) {
- NSLog(@"Already subscribed to %@", topic);
- } else {
- NSLog(@"Failed to subscribe to topic %@: %@", topic, error);
- }
- }
- else {
- NSLog(@"Successfully subscribe to topic %@", topic);
- }
- }];
- }
- }
+ if (registrationToken != nil) {
+ NSLog(@"FCM Registration Token: %@", registrationToken);
+ [self setFcmRegistrationToken: registrationToken];
- [weakSelf registerWithToken:registrationToken];
- } else {
- NSLog(@"Registration to GCM failed with error: %@", error.localizedDescription);
- [weakSelf failWithMessage:self.callbackId withMsg:@"" withError:error];
+ id topics = [self fcmTopics];
+ if (topics != nil) {
+ for (NSString *topic in topics) {
+ NSLog(@"subscribe to topic: %@", topic);
+ id pubSub = [FIRMessaging messaging];
+ [pubSub subscribeToTopic:topic];
+ }
}
- };
+
+ [self registerWithToken:registrationToken];
+ } else {
+ NSLog(@"FCM token is null");
+ }
+
}
-// GCM refresh token
+// FCM refresh token
// Unclear how this is testable under normal circumstances
- (void)onTokenRefresh {
#if !TARGET_IPHONE_SIMULATOR
// A rotation of the registration tokens is happening, so the app needs to request a new token.
- NSLog(@"The GCM registration token needs to be changed.");
- [[GGLInstanceID sharedInstance] tokenWithAuthorizedEntity:[self gcmSenderId]
- scope:kGGLInstanceIDScopeGCM
- options:[self gcmRegistrationOptions]
- handler:[self gcmRegistrationHandler]];
+ NSLog(@"The FCM registration token needs to be changed.");
+ [[FIRInstanceID instanceID] token];
+ [self initRegistration];
#endif
}
-- (void)willSendDataMessageWithID:(NSString *)messageID error:(NSError *)error {
- NSLog(@"willSendDataMessageWithID");
- if (error) {
- // Failed to send the message.
- } else {
- // Will send message, you can save the messageID to track the message
- }
+// contains error info
+- (void)sendDataMessageFailure:(NSNotification *)notification {
+ NSLog(@"sendDataMessageFailure");
+}
+- (void)sendDataMessageSuccess:(NSNotification *)notification {
+ NSLog(@"sendDataMessageSuccess");
+}
+
+- (void)didSendDataMessageWithID:messageID {
+ NSLog(@"didSendDataMessageWithID");
}
-- (void)didSendDataMessageWithID:(NSString *)messageID {
+- (void)willSendDataMessageWithID:messageID error:error {
NSLog(@"willSendDataMessageWithID");
- // Did successfully send message identified by messageID
}
- (void)didDeleteMessagesOnServer {
@@ -128,20 +113,10 @@
NSArray* topics = [command argumentAtIndex:0];
if (topics != nil) {
- id pubSub = [GCMPubSub sharedInstance];
+ id pubSub = [FIRMessaging messaging];
for (NSString *topic in topics) {
NSLog(@"unsubscribe from topic: %@", topic);
- [pubSub unsubscribeWithToken: [self gcmRegistrationToken]
- topic:[NSString stringWithFormat:@"/topics/%@", topic]
- options:nil
- handler:^void(NSError *error) {
- if (error) {
- NSLog(@"Failed to unsubscribe from topic %@: %@", topic, error);
- }
- else {
- NSLog(@"Successfully unsubscribe from topic %@", topic);
- }
- }];
+ [pubSub unsubscribeFromTopic:topic];
}
} else {
[[UIApplication sharedApplication] unregisterForRemoteNotifications];
@@ -155,25 +130,10 @@
if (topic != nil) {
NSLog(@"subscribe from topic: %@", topic);
- id pubSub = [GCMPubSub sharedInstance];
- [pubSub subscribeWithToken: [self gcmRegistrationToken]
- topic:[NSString stringWithFormat:@"/topics/%@", topic]
- options:nil
- handler:^void(NSError *error) {
- if (error) {
- if (error.code == 3001) {
- NSLog(@"Already subscribed to %@", topic);
- [self successWithMessage:command.callbackId withMsg:[NSString stringWithFormat:@"Already subscribed to %@", topic]];
- } else {
- NSLog(@"Failed to subscribe to topic %@: %@", topic, error);
- [self failWithMessage:command.callbackId withMsg:[NSString stringWithFormat:@"Failed to subscribe to topic %@", topic] withError:error];
- }
- }
- else {
- NSLog(@"Successfully subscribe to topic %@", topic);
- [self successWithMessage:command.callbackId withMsg:[NSString stringWithFormat:@"Successfully subscribe to topic %@", topic]];
- }
- }];
+ id pubSub = [FIRMessaging messaging];
+ [pubSub subscribeToTopic:topic];
+ NSLog(@"Successfully subscribe to topic %@", topic);
+ [self successWithMessage:command.callbackId withMsg:[NSString stringWithFormat:@"Successfully subscribe to topic %@", topic]];
} else {
NSLog(@"There is no topic to subscribe");
[self successWithMessage:command.callbackId withMsg:@"There is no topic to subscribe"];
@@ -186,19 +146,10 @@
if (topic != nil) {
NSLog(@"unsubscribe from topic: %@", topic);
- id pubSub = [GCMPubSub sharedInstance];
- [pubSub unsubscribeWithToken: [self gcmRegistrationToken]
- topic:[NSString stringWithFormat:@"/topics/%@", topic]
- options:nil
- handler:^void(NSError *error) {
- if (error) {
- NSLog(@"Failed to unsubscribe to topic %@: %@", topic, error);
- [self failWithMessage:command.callbackId withMsg:[NSString stringWithFormat:@"Failed to unsubscribe to topic %@", topic] withError:error];
- } else {
- NSLog(@"Successfully unsubscribe to topic %@", topic);
- [self successWithMessage:command.callbackId withMsg:[NSString stringWithFormat:@"Successfully unsubscribe to topic %@", topic]];
- }
- }];
+ id pubSub = [FIRMessaging messaging];
+ [pubSub unsubscribeFromTopic:topic];
+ NSLog(@"Successfully unsubscribe from topic %@", topic);
+ [self successWithMessage:command.callbackId withMsg:[NSString stringWithFormat:@"Successfully unsubscribe from topic %@", topic]];
} else {
NSLog(@"There is no topic to unsubscribe");
[self successWithMessage:command.callbackId withMsg:@"There is no topic to unsubscribe"];
@@ -207,6 +158,22 @@
- (void)init:(CDVInvokedUrlCommand*)command;
{
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self selector:@selector(onTokenRefresh)
+ name:kFIRInstanceIDTokenRefreshNotification object:nil];
+
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self selector:@selector(sendDataMessageFailure:)
+ name:FIRMessagingSendErrorNotification object:nil];
+
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self selector:@selector(sendDataMessageSuccess:)
+ name:FIRMessagingSendSuccessNotification object:nil];
+
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self selector:@selector(didDeleteMessagesOnServer)
+ name:FIRMessagingMessagesDeletedNotification object:nil];
+
[self.commandDelegate runInBackground:^ {
NSLog(@"Push Plugin register called");
@@ -215,13 +182,10 @@
NSMutableDictionary* options = [command.arguments objectAtIndex:0];
NSMutableDictionary* iosOptions = [options objectForKey:@"ios"];
- NSArray* topics = [iosOptions objectForKey:@"topics"];
- [self setGcmTopics:topics];
+ NSArray* topics = [iosOptions objectForKey:@"topics"];
+ [self setFcmTopics:topics];
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
UIUserNotificationType UserNotificationTypes = UIUserNotificationTypeNone;
-#endif
- UIRemoteNotificationType notificationTypes = UIRemoteNotificationTypeNone;
id badgeArg = [iosOptions objectForKey:@"badge"];
id soundArg = [iosOptions objectForKey:@"sound"];
@@ -230,32 +194,20 @@
if (([badgeArg isKindOfClass:[NSString class]] && [badgeArg isEqualToString:@"true"]) || [badgeArg boolValue])
{
- notificationTypes |= UIRemoteNotificationTypeBadge;
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
UserNotificationTypes |= UIUserNotificationTypeBadge;
-#endif
}
if (([soundArg isKindOfClass:[NSString class]] && [soundArg isEqualToString:@"true"]) || [soundArg boolValue])
{
- notificationTypes |= UIRemoteNotificationTypeSound;
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
UserNotificationTypes |= UIUserNotificationTypeSound;
-#endif
}
if (([alertArg isKindOfClass:[NSString class]] && [alertArg isEqualToString:@"true"]) || [alertArg boolValue])
{
- notificationTypes |= UIRemoteNotificationTypeAlert;
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
UserNotificationTypes |= UIUserNotificationTypeAlert;
-#endif
}
- notificationTypes |= UIRemoteNotificationTypeNewsstandContentAvailability;
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
UserNotificationTypes |= UIUserNotificationActivationModeBackground;
-#endif
if (clearBadgeArg == nil || ([clearBadgeArg isKindOfClass:[NSString class]] && [clearBadgeArg isEqualToString:@"false"]) || ![clearBadgeArg boolValue]) {
NSLog(@"PushPlugin.register: setting badge to false");
@@ -267,12 +219,8 @@
}
NSLog(@"PushPlugin.register: clear badge is set to %d", clearBadge);
- if (notificationTypes == UIRemoteNotificationTypeNone)
- NSLog(@"PushPlugin.register: Push notification type is set to none");
-
isInline = NO;
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
NSLog(@"PushPlugin.register: better button setup");
// setup action buttons
NSMutableSet *categories = [[NSMutableSet alloc] init];
@@ -329,45 +277,46 @@
}
}
-#else
- NSLog(@"PushPlugin.register: action buttons only supported on iOS8 and above");
-#endif
-
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
if ([[UIApplication sharedApplication]respondsToSelector:@selector(registerUserNotificationSettings:)]) {
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UserNotificationTypes categories:categories];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
- } else {
- [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
- (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
}
-#else
- [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
- (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
-#endif
+
+ // Read GoogleService-Info.plist
+ NSString *path = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
+
+ // Load the file content and read the data into arrays
+ NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path];
+ fcmSenderId = [dict objectForKey:@"GCM_SENDER_ID"];
+ BOOL isGcmEnabled = [[dict valueForKey:@"IS_GCM_ENABLED"] boolValue];
+
+ NSLog(@"FCM Sender ID %@", fcmSenderId);
// GCM options
- [self setGcmSenderId: [iosOptions objectForKey:@"senderID"]];
- NSLog(@"GCM Sender ID %@", gcmSenderId);
- if([[self gcmSenderId] length] > 0) {
- NSLog(@"Using GCM Notification");
- [self setUsesGCM: YES];
- [self initGCMRegistrationHandler];
+ [self setFcmSenderId: fcmSenderId];
+ if(isGcmEnabled && [[self fcmSenderId] length] > 0) {
+ NSLog(@"Using FCM Notification");
+ [self setUsesFCM: YES];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ if([FIRApp defaultApp] == nil)
+ [FIRApp configure];
+ [self initRegistration];
+ });
} else {
NSLog(@"Using APNS Notification");
- [self setUsesGCM:NO];
+ [self setUsesFCM:NO];
}
- id gcmSandBoxArg = [iosOptions objectForKey:@"gcmSandbox"];
+ id fcmSandboxArg = [iosOptions objectForKey:@"fcmSandbox"];
- [self setGcmSandbox:@NO];
- if ([self usesGCM] &&
- (([gcmSandBoxArg isKindOfClass:[NSString class]] && [gcmSandBoxArg isEqualToString:@"true"]) ||
- [gcmSandBoxArg boolValue]))
+ [self setFcmSandbox:@NO];
+ if ([self usesFCM] &&
+ (([fcmSandboxArg isKindOfClass:[NSString class]] && [fcmSandboxArg isEqualToString:@"true"]) ||
+ [fcmSandboxArg boolValue]))
{
- NSLog(@"Using GCM Sandbox");
- [self setGcmSandbox:@YES];
+ NSLog(@"Using FCM Sandbox");
+ [self setFcmSandbox:@YES];
}
if (notificationMessage) { // if there is a pending startup notification
@@ -422,14 +371,8 @@
[results setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] forKey:@"appVersion"];
// Check what Notifications the user has turned on. We registered for all three, but they may have manually disabled some or all of them.
-#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
- NSUInteger rntypes;
- if (!SYSTEM_VERSION_LESS_THAN(@"8.0")) {
- rntypes = [[[UIApplication sharedApplication] currentUserNotificationSettings] types];
- } else {
- rntypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
- }
+ NSUInteger rntypes = [[[UIApplication sharedApplication] currentUserNotificationSettings] types];
// Set the defaults to disabled unless we find otherwise...
NSString *pushBadge = @"disabled";
@@ -440,13 +383,13 @@
// one is actually disabled. So we are literally checking to see if rnTypes matches what is turned on, instead of by number. The "tricky" part is that the
// single notification types will only match if they are the ONLY one enabled. Likewise, when we are checking for a pair of notifications, it will only be
// true if those two notifications are on. This is why the code is written this way
- if(rntypes & UIRemoteNotificationTypeBadge){
+ if(rntypes & UIUserNotificationTypeBadge){
pushBadge = @"enabled";
}
- if(rntypes & UIRemoteNotificationTypeAlert) {
+ if(rntypes & UIUserNotificationTypeAlert) {
pushAlert = @"enabled";
}
- if(rntypes & UIRemoteNotificationTypeSound) {
+ if(rntypes & UIUserNotificationTypeSound) {
pushSound = @"enabled";
}
@@ -460,24 +403,7 @@
[results setValue:dev.model forKey:@"deviceModel"];
[results setValue:dev.systemVersion forKey:@"deviceSystemVersion"];
- if([self usesGCM]) {
- GGLInstanceIDConfig *instanceIDConfig = [GGLInstanceIDConfig defaultConfig];
- instanceIDConfig.delegate = self;
- [[GGLInstanceID sharedInstance] startWithConfig:instanceIDConfig];
-
- [self setGcmRegistrationOptions: @{kGGLInstanceIDRegisterAPNSOption:deviceToken,
- kGGLInstanceIDAPNSServerTypeSandboxOption:[self gcmSandbox]}];
-
- [[GGLInstanceID sharedInstance] tokenWithAuthorizedEntity:[self gcmSenderId]
- scope:kGGLInstanceIDScopeGCM
- options:[self gcmRegistrationOptions]
- handler:[self gcmRegistrationHandler]];
-
- GCMConfig *gcmConfig = [GCMConfig defaultConfig];
- gcmConfig.receiverDelegate = self;
- [[GCMService sharedInstance] startWithConfig:gcmConfig];
-
- } else {
+ if(![self usesFCM]) {
[self registerWithToken: token];
}
#endif
@@ -610,31 +536,36 @@
[self.commandDelegate sendPluginResult:commandResult callbackId:command.callbackId];
}
--(void)successWithMessage:(NSString *)callbackId withMsg:(NSString *)message
+-(void)successWithMessage:(NSString *)myCallbackId withMsg:(NSString *)message
{
- if (callbackId != nil)
+ if (myCallbackId != nil)
{
CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
- [self.commandDelegate sendPluginResult:commandResult callbackId:callbackId];
+ [self.commandDelegate sendPluginResult:commandResult callbackId:myCallbackId];
}
}
-(void)registerWithToken:(NSString*)token; {
// Send result to trigger 'registration' event but keep callback
- NSMutableDictionary* message = [NSMutableDictionary dictionaryWithCapacity:1];
+ NSMutableDictionary* message = [NSMutableDictionary dictionaryWithCapacity:2];
[message setObject:token forKey:@"registrationId"];
+ if ([self usesFCM]) {
+ [message setObject:@"FCM" forKey:@"registrationType"];
+ } else {
+ [message setObject:@"APNS" forKey:@"registrationType"];
+ }
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:message];
[pluginResult setKeepCallbackAsBool:YES];
[self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
}
--(void)failWithMessage:(NSString *)callbackId withMsg:(NSString *)message withError:(NSError *)error
+-(void)failWithMessage:(NSString *)myCallbackId withMsg:(NSString *)message withError:(NSError *)error
{
NSString *errorMessage = (error) ? [NSString stringWithFormat:@"%@ - %@", message, [error localizedDescription]] : message;
CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:errorMessage];
- [self.commandDelegate sendPluginResult:commandResult callbackId:callbackId];
+ [self.commandDelegate sendPluginResult:commandResult callbackId:myCallbackId];
}
-(void) finish:(CDVInvokedUrlCommand*)command
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/js/push.js b/StoneIsland/plugins/phonegap-plugin-push/src/js/push.js
new file mode 100644
index 00000000..150af344
--- /dev/null
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/js/push.js
@@ -0,0 +1,316 @@
+/* global cordova:false */
+/* globals window */
+
+/*!
+ * Module dependencies.
+ */
+
+const exec = cordova.require('cordova/exec');
+
+class PushNotification {
+ /**
+ * PushNotification constructor.
+ *
+ * @param {Object} options to initiate Push Notifications.
+ * @return {PushNotification} instance that can be monitored and cancelled.
+ */
+ constructor(options) {
+ this.handlers = {
+ registration: [],
+ notification: [],
+ error: [],
+ };
+
+ // require options parameter
+ if (typeof options === 'undefined') {
+ throw new Error('The options argument is required.');
+ }
+
+ // store the options to this object instance
+ this.options = options;
+
+ // triggered on registration and notification
+ const success = (result) => {
+ if (result && typeof result.registrationId !== 'undefined') {
+ this.emit('registration', result);
+ } else if (result && result.additionalData &&
+ typeof result.additionalData.actionCallback !== 'undefined') {
+ const executeFuctionOrEmitEventByName = (functionName, context, ...args) => {
+ const namespaces = functionName.split('.');
+ const func = namespaces.pop();
+ for (let i = 0; i < namespaces.length; i++) {
+ context = context[namespaces[i]];
+ }
+
+ if (typeof context[func] === 'function') {
+ context[func].call(context, args);
+ } else {
+ this.emit(functionName, args);
+ }
+ };
+
+ executeFuctionOrEmitEventByName(result.additionalData.actionCallback, window, result);
+ } else if (result) {
+ this.emit('notification', result);
+ }
+ };
+
+ // triggered on error
+ const fail = (msg) => {
+ const e = (typeof msg === 'string') ? new Error(msg) : msg;
+ this.emit('error', e);
+ };
+
+ // wait at least one process tick to allow event subscriptions
+ setTimeout(() => {
+ exec(success, fail, 'PushNotification', 'init', [options]);
+ }, 10);
+ }
+
+ /**
+ * Unregister from push notifications
+ */
+ unregister(successCallback, errorCallback = () => {}, options) {
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.unregister failure: failure parameter not a function');
+ return;
+ }
+
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.unregister failure: success callback parameter ' +
+ ' must be a function');
+ return;
+ }
+
+ const cleanHandlersAndPassThrough = () => {
+ if (!options) {
+ this.handlers = {
+ registration: [],
+ notification: [],
+ error: [],
+ };
+ }
+ successCallback();
+ };
+
+ exec(cleanHandlersAndPassThrough, errorCallback, 'PushNotification', 'unregister', [options]);
+ }
+
+ /**
+ * subscribe to a topic
+ * @param {String} topic topic to subscribe
+ * @param {Function} successCallback success callback
+ * @param {Function} errorCallback error callback
+ * @return {void}
+ */
+ subscribe(topic, successCallback, errorCallback = () => {}) {
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.subscribe failure: ' +
+ 'failure parameter not a function');
+ return;
+ }
+
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.subscribe failure: ' +
+ 'success callback parameter must be a function');
+ return;
+ }
+
+ exec(successCallback, errorCallback, 'PushNotification', 'subscribe', [topic]);
+ }
+
+ /**
+ * unsubscribe to a topic
+ * @param {String} topic topic to unsubscribe
+ * @param {Function} successCallback success callback
+ * @param {Function} errorCallback error callback
+ * @return {void}
+ */
+ unsubscribe(topic, successCallback, errorCallback = () => {}) {
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.unsubscribe failure: failure parameter not a function');
+ return;
+ }
+
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.unsubscribe failure: ' +
+ 'success callback parameter must be a function');
+ return;
+ }
+
+ exec(successCallback, errorCallback, 'PushNotification', 'unsubscribe', [topic]);
+ }
+
+
+ /**
+ * Call this to set the application icon badge
+ */
+ setApplicationIconBadgeNumber(successCallback, errorCallback = () => {}, badge) {
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.setApplicationIconBadgeNumber failure: failure ' +
+ 'parameter not a function');
+ return;
+ }
+
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.setApplicationIconBadgeNumber failure: success ' +
+ 'callback parameter must be a function');
+ return;
+ }
+
+ exec(successCallback, errorCallback, 'PushNotification',
+ 'setApplicationIconBadgeNumber', [{ badge }]);
+ }
+
+ /**
+ * Get the application icon badge
+ */
+
+ getApplicationIconBadgeNumber(successCallback, errorCallback = () => {}) {
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.getApplicationIconBadgeNumber failure: failure ' +
+ 'parameter not a function');
+ return;
+ }
+
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.getApplicationIconBadgeNumber failure: success ' +
+ 'callback parameter must be a function');
+ return;
+ }
+
+ exec(successCallback, errorCallback, 'PushNotification', 'getApplicationIconBadgeNumber', []);
+ }
+
+ /**
+ * Clear all notifications
+ */
+
+ clearAllNotifications(successCallback = () => {}, errorCallback = () => {}) {
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.clearAllNotifications failure: failure parameter ' +
+ 'not a function');
+ return;
+ }
+
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.clearAllNotifications failure: success callback ' +
+ 'parameter must be a function');
+ return;
+ }
+
+ exec(successCallback, errorCallback, 'PushNotification', 'clearAllNotifications', []);
+ }
+ /**
+ * Listen for an event.
+ *
+ * The following events are supported:
+ *
+ * - registration
+ * - notification
+ * - error
+ *
+ * @param {String} eventName to subscribe to.
+ * @param {Function} callback triggered on the event.
+ */
+
+ on(eventName, callback) {
+ if (!this.handlers.hasOwnProperty(eventName)) {
+ this.handlers[eventName] = [];
+ }
+ this.handlers[eventName].push(callback);
+ }
+
+ /**
+ * Remove event listener.
+ *
+ * @param {String} eventName to match subscription.
+ * @param {Function} handle function associated with event.
+ */
+
+ off(eventName, handle) {
+ if (this.handlers.hasOwnProperty(eventName)) {
+ const handleIndex = this.handlers[eventName].indexOf(handle);
+ if (handleIndex >= 0) {
+ this.handlers[eventName].splice(handleIndex, 1);
+ }
+ }
+ }
+
+ /**
+ * Emit an event.
+ *
+ * This is intended for internal use only.
+ *
+ * @param {String} eventName is the event to trigger.
+ * @param {*} all arguments are passed to the event listeners.
+ *
+ * @return {Boolean} is true when the event is triggered otherwise false.
+ */
+
+ emit(...args) {
+ const eventName = args.shift();
+
+ if (!this.handlers.hasOwnProperty(eventName)) {
+ return false;
+ }
+
+ for (let i = 0, length = this.handlers[eventName].length; i < length; i++) {
+ const callback = this.handlers[eventName][i];
+ if (typeof callback === 'function') {
+ callback.apply(undefined, args);
+ } else {
+ console.log(`event handler: ${eventName} must be a function`);
+ }
+ }
+
+ return true;
+ }
+
+ finish(successCallback = () => {}, errorCallback = () => {}, id = 'handler') {
+ if (typeof successCallback !== 'function') {
+ console.log('finish failure: success callback parameter must be a function');
+ return;
+ }
+
+ if (typeof errorCallback !== 'function') {
+ console.log('finish failure: failure parameter not a function');
+ return;
+ }
+
+ exec(successCallback, errorCallback, 'PushNotification', 'finish', [id]);
+ }
+}
+
+/*!
+ * Push Notification Plugin.
+ */
+
+module.exports = {
+ /**
+ * Register for Push Notifications.
+ *
+ * This method will instantiate a new copy of the PushNotification object
+ * and start the registration process.
+ *
+ * @param {Object} options
+ * @return {PushNotification} instance
+ */
+
+ init: (options) => {
+ return new PushNotification(options);
+ },
+
+ hasPermission: (successCallback, errorCallback) => {
+ exec(successCallback, errorCallback, 'PushNotification', 'hasPermission', []);
+ },
+
+ /**
+ * PushNotification Object.
+ *
+ * Expose the PushNotification object for direct use
+ * and testing. Typically, you should use the
+ * .init helper method.
+ */
+ PushNotification,
+};
diff --git a/StoneIsland/plugins/phonegap-plugin-push/src/windows/PushPluginProxy.js b/StoneIsland/plugins/phonegap-plugin-push/src/windows/PushPluginProxy.js
index ac04f39d..eb552dc0 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/src/windows/PushPluginProxy.js
+++ b/StoneIsland/plugins/phonegap-plugin-push/src/windows/PushPluginProxy.js
@@ -88,6 +88,12 @@ module.exports = {
} catch(ex) {
onFail(ex);
}
+ },
+ subscribe: function() {
+ console.log("Subscribe is unsupported");
+ },
+ unsubscribe: function() {
+ console.log("Subscribe is unsupported");
}
};
require("cordova/exec/proxy").add("PushNotification", module.exports);
diff --git a/StoneIsland/plugins/phonegap-plugin-push/types/index.d.ts b/StoneIsland/plugins/phonegap-plugin-push/types/index.d.ts
new file mode 100644
index 00000000..b47335c2
--- /dev/null
+++ b/StoneIsland/plugins/phonegap-plugin-push/types/index.d.ts
@@ -0,0 +1,302 @@
+// Type definitions for phonegap-plugin-push
+// Project: https://github.com/phonegap/phonegap-plugin-push
+// Definitions by: Frederico Galvão <https://github.com/fredgalvao>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare namespace PhonegapPluginPush {
+ type EventResponse = RegistrationEventResponse | NotificationEventResponse | Error
+
+ interface PushNotification {
+ /**
+ * The event registration will be triggered on each successful registration with the 3rd party push service.
+ * @param event
+ * @param callback
+ */
+ on(event: "registration", callback: (response: RegistrationEventResponse) => any): void
+ /**
+ * The event notification will be triggered each time a push notification is received by a 3rd party push service on the device.
+ * @param event
+ * @param callback
+ */
+ on(event: "notification", callback: (response: NotificationEventResponse) => any): void
+ /**
+ * The event error will trigger when an internal error occurs and the cache is aborted.
+ * @param event
+ * @param callback
+ */
+ on(event: "error", callback: (response: Error) => any): void
+ /**
+ *
+ * @param event Name of the event to listen to. See below(above) for all the event names.
+ * @param callback is called when the event is triggered.
+ * @param event
+ * @param callback
+ */
+ on(event: string, callback: (response: EventResponse) => any): void
+
+ off(event: "registration", callback: (response: RegistrationEventResponse) => any): void
+ off(event: "notification", callback: (response: NotificationEventResponse) => any): void
+ off(event: "error", callback: (response: Error) => any): void
+ /**
+ * As stated in the example, you will have to store your event handler if you are planning to remove it.
+ * @param event Name of the event type. The possible event names are the same as for the push.on function.
+ * @param callback handle to the function to get removed.
+ * @param event
+ * @param callback
+ */
+ off(event: string, callback: (response: EventResponse) => any): void
+
+ /**
+ * The unregister method is used when the application no longer wants to receive push notifications.
+ * Beware that this cleans up all event handlers previously registered,
+ * so you will need to re-register them if you want them to function again without an application reload.
+ * @param successHandler
+ * @param errorHandler
+ * @param topics
+ */
+ unregister(successHandler: () => any, errorHandler?: () => any, topics?: string[]): void
+
+ /**
+ * The subscribe method is used when the application wants to subscribe a new topic to receive push notifications.
+ * @param topic Topic to subscribe to.
+ * @param successHandler Is called when the api successfully unregisters.
+ * @param errorHandler Is called when the api encounters an error while unregistering.
+ */
+ subscribe(topic: string, successHandler: () => any, errorHandler: () => any): void;
+
+ /**
+ * The unsubscribe method is used when the application no longer wants to receive push notifications
+ * from a specific topic but continue to receive other push messages.
+ * @param topic Topic to unsubscribe from.
+ * @param successHandler Is called when the api successfully unregisters.
+ * @param errorHandler Is called when the api encounters an error while unregistering.
+ */
+ unsubscribe(topic: string, successHandler: () => any, errorHandler: () => any): void;
+
+ /*TODO according to js source code, "errorHandler" is optional, but is "count" also optional? I can't read objetive-C code (can anyone at all? I wonder...)*/
+ /**
+ * Set the badge count visible when the app is not running
+ *
+ * The count is an integer indicating what number should show up in the badge.
+ * Passing 0 will clear the badge.
+ * Each notification event contains a data.count value which can be used to set the badge to correct number.
+ * @param successHandler
+ * @param errorHandler
+ * @param count
+ */
+ setApplicationIconBadgeNumber(successHandler: () => any, errorHandler: () => any, count: number): void
+
+ /**
+ * Get the current badge count visible when the app is not running
+ * successHandler gets called with an integer which is the current badge count
+ * @param successHandler
+ * @param errorHandler
+ */
+ getApplicationIconBadgeNumber(successHandler: (count: number) => any, errorHandler: () => any): void
+
+ /**
+ * iOS only
+ * Tells the OS that you are done processing a background push notification.
+ * successHandler gets called when background push processing is successfully completed.
+ * @param successHandler
+ * @param errorHandler
+ * @param id
+ */
+ finish(successHandler?: () => any, errorHandler?: () => any, id?: string): void
+
+ /**
+ * Tells the OS to clear all notifications from the Notification Center
+ * @param successHandler Is called when the api successfully clears the notifications.
+ * @param errorHandler Is called when the api encounters an error when attempting to clears the notifications.
+ */
+ clearAllNotifications(successHandler: () => any, errorHandler: () => any): void
+ }
+
+ /**
+ * platform specific initialization options.
+ */
+ interface InitOptions {
+ /**
+ * Android specific initialization options.
+ */
+ android?: {
+ /**
+ * Maps to the project number in the Google Developer Console.
+ */
+ senderID: string
+ /**
+ * The name of a drawable resource to use as the small-icon. The name should not include the extension.
+ */
+ icon?: string
+ /**
+ * Sets the background color of the small icon on Android 5.0 and greater.
+ * Supported Formats - http://developer.android.com/reference/android/graphics/Color.html#parseColor(java.lang.String)
+ */
+ iconColor?: string
+ /**
+ * If true it plays the sound specified in the push data or the default system sound. Default is true.
+ */
+ sound?: boolean
+ /**
+ * If true the device vibrates on receipt of notification. Default is true.
+ */
+ vibrate?: boolean
+ /**
+ * If true the app clears all pending notifications when it is closed. Default is true.
+ */
+ clearNotifications?: boolean
+ /**
+ * If true will always show a notification, even when the app is on the foreground. Default is false.
+ */
+ forceShow?: boolean
+ /**
+ * If the array contains one or more strings each string will be used to subscribe to a GcmPubSub topic.
+ */
+ topics?: string[]
+ }
+
+ /**
+ * iOS specific initialization options.
+ */
+ ios?: {
+ /**
+ * If true|"true" the device sets the badge number on receipt of notification.
+ * Default is false|"false".
+ * Note: the value you set this option to the first time you call the init method will be how the application always acts.
+ * Once this is set programmatically in the init method it can only be changed manually by the user in Settings>Notifications>App Name.
+ * This is normal iOS behaviour.
+ */
+ badge?: boolean | string
+ /**
+ * If true|"true" the device plays a sound on receipt of notification.
+ * Default is false|"false".
+ * Note: the value you set this option to the first time you call the init method will be how the application always acts.
+ * Once this is set programmatically in the init method it can only be changed manually by the user in Settings>Notifications>App Name.
+ * This is normal iOS behaviour.
+ */
+ sound?: boolean | string
+ /**
+ * If true|"true" the device shows an alert on receipt of notification.
+ * Default is false|"false".
+ * Note: the value you set this option to the first time you call the init method will be how the application always acts.
+ * Once this is set programmatically in the init method it can only be changed manually by the user in Settings>Notifications>App Name.
+ * This is normal iOS behaviour.
+ */
+ alert?: boolean | string
+ /**
+ * If true|"true" the badge will be cleared on app startup. Default is false|"false".
+ */
+ clearBadge?: boolean | string
+ /**
+ * The data required in order to enable Action Buttons for iOS.
+ * Action Buttons on iOS - https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#action-buttons-1
+ */
+ categories?: CategoryArray
+ /**
+ * Maps to the project number in the Google Developer Console. Setting this uses GCM for notifications instead of native
+ */
+ senderID?: string
+ /**
+ * Whether to use prod or sandbox GCM setting. Defaults to false.
+ */
+ gcmSandbox?: boolean
+ /**
+ * If the array contains one or more strings each string will be used to subscribe to a GcmPubSub topic. Note: only usable in conjunction with senderID
+ */
+ topics?: string[]
+ }
+
+ /**
+ * Windows specific initialization options.
+ */
+ windows?: {
+
+ }
+ }
+
+ interface CategoryArray {
+ [name: string]: CategoryAction
+ }
+
+ interface CategoryAction {
+ yes?: CategoryActionData
+ no?: CategoryActionData
+ maybe?: CategoryActionData
+ }
+
+ interface CategoryActionData {
+ callback: string
+ title: string
+ foreground: boolean
+ destructive: boolean
+ }
+
+ interface RegistrationEventResponse {
+ /**
+ * The registration ID provided by the 3rd party remote push service.
+ */
+ registrationId: string
+ }
+
+ interface NotificationEventResponse {
+ /**
+ * The text of the push message sent from the 3rd party service.
+ */
+ message: string
+ /**
+ * The optional title of the push message sent from the 3rd party service.
+ */
+ title?: string
+ /**
+ * The number of messages to be displayed in the badge iOS or message count in the notification shade in Android.
+ * For windows, it represents the value in the badge notification which could be a number or a status glyph.
+ */
+ count: string
+ /**
+ * The name of the sound file to be played upon receipt of the notification.
+ */
+ sound: string
+ /**
+ * The path of the image file to be displayed in the notification.
+ */
+ image: string
+ /**
+ * An optional collection of data sent by the 3rd party push service that does not fit in the above properties.
+ */
+ additionalData: NotificationEventAdditionalData
+ }
+
+ /**
+ * TODO: document all possible properties (I only got the android ones)
+ *
+ * Loosened up with a dictionary notation, but all non-defined properties need to use (map['prop']) notation
+ *
+ * Ideally the developer would overload (merged declaration) this or create a new interface that would extend this one
+ * so that he could specify any custom code without having to use array notation (map['prop']) for all of them.
+ */
+ interface NotificationEventAdditionalData {
+ [name: string]: any
+
+ /**
+ * Whether the notification was received while the app was in the foreground
+ */
+ foreground?: boolean
+ /**
+ * Will be true if the application is started by clicking on the push notification, false if the app is already started. (Android/iOS only)
+ */
+ coldstart?: boolean
+ collapse_key?: string
+ from?: string
+ notId?: string
+ }
+
+ interface PushNotificationStatic {
+ init(options: InitOptions): PushNotification
+ new (options: InitOptions): PushNotification
+ }
+}
+
+interface Window {
+ PushNotification: PhonegapPluginPush.PushNotificationStatic
+}
+declare var PushNotification: PhonegapPluginPush.PushNotificationStatic; \ No newline at end of file
diff --git a/StoneIsland/plugins/phonegap-plugin-push/www/browser/push.js b/StoneIsland/plugins/phonegap-plugin-push/www/browser/push.js
index 9b74d8a4..1badd77b 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/www/browser/push.js
+++ b/StoneIsland/plugins/phonegap-plugin-push/www/browser/push.js
@@ -29,6 +29,12 @@ var PushNotification = function(options) {
// store the options to this object instance
this.options = options;
+ // subscription options
+ var subOptions = {userVisibleOnly: true};
+ if (this.options.browser && this.options.browser.applicationServerKey) {
+ subOptions.applicationServerKey = urlBase64ToUint8Array(this.options.browser.applicationServerKey);
+ }
+
// triggered on registration and notification
var that = this;
@@ -50,7 +56,7 @@ var PushNotification = function(options) {
})
.then(function(reg) {
serviceWorker = reg;
- reg.pushManager.subscribe({userVisibleOnly: true}).then(function(sub) {
+ reg.pushManager.subscribe(subOptions).then(function(sub) {
subscription = sub;
result = { 'registrationId': sub.endpoint.substring(sub.endpoint.lastIndexOf('/') + 1) };
that.emit('registration', result);
@@ -322,6 +328,29 @@ PushNotification.prototype.finish = function(successCallback, errorCallback, id)
* Push Notification Plugin.
*/
+/**
+ * Converts the server key to an Uint8Array
+ *
+ * @param base64String
+ *
+ * @returns {Uint8Array}
+ */
+function urlBase64ToUint8Array(base64String) {
+ const padding = '='.repeat((4 - base64String.length % 4) % 4);
+ const base64 = (base64String + padding)
+ .replace(/\-/g, '+')
+ .replace(/_/g, '/');
+
+ const rawData = window.atob(base64);
+ const outputArray = new Uint8Array(rawData.length);
+
+ for (var i = 0; i < rawData.length; ++i) {
+ outputArray[i] = rawData.charCodeAt(i);
+ }
+ return outputArray;
+}
+
+
module.exports = {
/**
* Register for Push Notifications.
diff --git a/StoneIsland/plugins/phonegap-plugin-push/www/push.js b/StoneIsland/plugins/phonegap-plugin-push/www/push.js
index 58c686d3..03f02e64 100644
--- a/StoneIsland/plugins/phonegap-plugin-push/www/push.js
+++ b/StoneIsland/plugins/phonegap-plugin-push/www/push.js
@@ -1,3 +1,15 @@
+/**
+* This file has been generated by Babel.
+*
+* DO NOT EDIT IT DIRECTLY
+*
+* Edit the JS source file src/js/push.js
+**/'use strict';
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
/* global cordova:false */
/* globals window */
@@ -7,320 +19,357 @@
var exec = cordova.require('cordova/exec');
-/**
- * PushNotification constructor.
- *
- * @param {Object} options to initiate Push Notifications.
- * @return {PushNotification} instance that can be monitored and cancelled.
- */
+var PushNotification = function () {
+ /**
+ * PushNotification constructor.
+ *
+ * @param {Object} options to initiate Push Notifications.
+ * @return {PushNotification} instance that can be monitored and cancelled.
+ */
+ function PushNotification(options) {
+ var _this = this;
-var PushNotification = function(options) {
- this._handlers = {
- 'registration': [],
- 'notification': [],
- 'error': []
+ _classCallCheck(this, PushNotification);
+
+ this.handlers = {
+ registration: [],
+ notification: [],
+ error: []
};
// require options parameter
if (typeof options === 'undefined') {
- throw new Error('The options argument is required.');
+ throw new Error('The options argument is required.');
}
// store the options to this object instance
this.options = options;
// triggered on registration and notification
- var that = this;
- var success = function(result) {
- if (result && typeof result.registrationId !== 'undefined') {
- that.emit('registration', result);
- } else if (result && result.additionalData && typeof result.additionalData.actionCallback !== 'undefined') {
- var executeFuctionOrEmitEventByName = function(callbackName, context, arg) {
- var namespaces = callbackName.split('.');
- var func = namespaces.pop();
- for (var i = 0; i < namespaces.length; i++) {
- context = context[namespaces[i]];
- }
+ var success = function success(result) {
+ if (result && typeof result.registrationId !== 'undefined') {
+ _this.emit('registration', result);
+ } else if (result && result.additionalData && typeof result.additionalData.actionCallback !== 'undefined') {
+ var executeFuctionOrEmitEventByName = function executeFuctionOrEmitEventByName(functionName, context) {
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
+ args[_key - 2] = arguments[_key];
+ }
- if (typeof context[func] === 'function') {
- context[func].call(context, arg);
- } else {
- that.emit(callbackName, arg);
- }
- };
+ var namespaces = functionName.split('.');
+ var func = namespaces.pop();
+ for (var i = 0; i < namespaces.length; i++) {
+ context = context[namespaces[i]];
+ }
- executeFuctionOrEmitEventByName(result.additionalData.actionCallback, window, result);
- } else if (result) {
- that.emit('notification', result);
- }
+ if (typeof context[func] === 'function') {
+ context[func].call(context, args);
+ } else {
+ _this.emit(functionName, args);
+ }
+ };
+
+ executeFuctionOrEmitEventByName(result.additionalData.actionCallback, window, result);
+ } else if (result) {
+ _this.emit('notification', result);
+ }
};
// triggered on error
- var fail = function(msg) {
- var e = (typeof msg === 'string') ? new Error(msg) : msg;
- that.emit('error', e);
+ var fail = function fail(msg) {
+ var e = typeof msg === 'string' ? new Error(msg) : msg;
+ _this.emit('error', e);
};
// wait at least one process tick to allow event subscriptions
- setTimeout(function() {
- exec(success, fail, 'PushNotification', 'init', [options]);
+ setTimeout(function () {
+ exec(success, fail, 'PushNotification', 'init', [options]);
}, 10);
-};
+ }
-/**
- * Unregister from push notifications
- */
+ /**
+ * Unregister from push notifications
+ */
-PushNotification.prototype.unregister = function(successCallback, errorCallback, options) {
- if (!errorCallback) { errorCallback = function() {}; }
- if (typeof errorCallback !== 'function') {
+ _createClass(PushNotification, [{
+ key: 'unregister',
+ value: function unregister(successCallback) {
+ var _this2 = this;
+
+ var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
+ var options = arguments[2];
+
+ if (typeof errorCallback !== 'function') {
console.log('PushNotification.unregister failure: failure parameter not a function');
return;
- }
+ }
- if (typeof successCallback !== 'function') {
- console.log('PushNotification.unregister failure: success callback parameter must be a function');
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.unregister failure: success callback parameter ' + ' must be a function');
return;
- }
+ }
- var that = this;
- var cleanHandlersAndPassThrough = function() {
+ var cleanHandlersAndPassThrough = function cleanHandlersAndPassThrough() {
if (!options) {
- that._handlers = {
- 'registration': [],
- 'notification': [],
- 'error': []
- };
+ _this2.handlers = {
+ registration: [],
+ notification: [],
+ error: []
+ };
}
successCallback();
- };
+ };
- exec(cleanHandlersAndPassThrough, errorCallback, 'PushNotification', 'unregister', [options]);
-};
+ exec(cleanHandlersAndPassThrough, errorCallback, 'PushNotification', 'unregister', [options]);
+ }
-/**
- * subscribe to a topic
- * @param {String} topic topic to subscribe
- * @param {Function} successCallback success callback
- * @param {Function} errorCallback error callback
- * @return {void}
- */
-PushNotification.prototype.subscribe = function(topic, successCallback, errorCallback) {
- if (!errorCallback) { errorCallback = function() {}; }
+ /**
+ * subscribe to a topic
+ * @param {String} topic topic to subscribe
+ * @param {Function} successCallback success callback
+ * @param {Function} errorCallback error callback
+ * @return {void}
+ */
+
+ }, {
+ key: 'subscribe',
+ value: function subscribe(topic, successCallback) {
+ var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
- if (typeof errorCallback !== 'function') {
- console.log('PushNotification.subscribe failure: failure parameter not a function');
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.subscribe failure: ' + 'failure parameter not a function');
return;
- }
+ }
- if (typeof successCallback !== 'function') {
- console.log('PushNotification.subscribe failure: success callback parameter must be a function');
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.subscribe failure: ' + 'success callback parameter must be a function');
return;
+ }
+
+ exec(successCallback, errorCallback, 'PushNotification', 'subscribe', [topic]);
}
- exec(successCallback, errorCallback, 'PushNotification', 'subscribe', [topic]);
-};
+ /**
+ * unsubscribe to a topic
+ * @param {String} topic topic to unsubscribe
+ * @param {Function} successCallback success callback
+ * @param {Function} errorCallback error callback
+ * @return {void}
+ */
-/**
- * unsubscribe to a topic
- * @param {String} topic topic to unsubscribe
- * @param {Function} successCallback success callback
- * @param {Function} errorCallback error callback
- * @return {void}
- */
-PushNotification.prototype.unsubscribe = function(topic, successCallback, errorCallback) {
- if (!errorCallback) { errorCallback = function() {}; }
+ }, {
+ key: 'unsubscribe',
+ value: function unsubscribe(topic, successCallback) {
+ var errorCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
- if (typeof errorCallback !== 'function') {
+ if (typeof errorCallback !== 'function') {
console.log('PushNotification.unsubscribe failure: failure parameter not a function');
return;
- }
+ }
- if (typeof successCallback !== 'function') {
- console.log('PushNotification.unsubscribe failure: success callback parameter must be a function');
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.unsubscribe failure: ' + 'success callback parameter must be a function');
return;
- }
+ }
- exec(successCallback, errorCallback, 'PushNotification', 'unsubscribe', [topic]);
-};
+ exec(successCallback, errorCallback, 'PushNotification', 'unsubscribe', [topic]);
+ }
-/**
- * Call this to set the application icon badge
- */
+ /**
+ * Call this to set the application icon badge
+ */
-PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallback, errorCallback, badge) {
- if (!errorCallback) { errorCallback = function() {}; }
+ }, {
+ key: 'setApplicationIconBadgeNumber',
+ value: function setApplicationIconBadgeNumber(successCallback) {
+ var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
+ var badge = arguments[2];
- if (typeof errorCallback !== 'function') {
- console.log('PushNotification.setApplicationIconBadgeNumber failure: failure parameter not a function');
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.setApplicationIconBadgeNumber failure: failure ' + 'parameter not a function');
return;
- }
+ }
- if (typeof successCallback !== 'function') {
- console.log('PushNotification.setApplicationIconBadgeNumber failure: success callback parameter must be a function');
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.setApplicationIconBadgeNumber failure: success ' + 'callback parameter must be a function');
return;
- }
+ }
- exec(successCallback, errorCallback, 'PushNotification', 'setApplicationIconBadgeNumber', [{badge: badge}]);
-};
+ exec(successCallback, errorCallback, 'PushNotification', 'setApplicationIconBadgeNumber', [{ badge: badge }]);
+ }
-/**
- * Get the application icon badge
- */
+ /**
+ * Get the application icon badge
+ */
-PushNotification.prototype.getApplicationIconBadgeNumber = function(successCallback, errorCallback) {
- if (!errorCallback) { errorCallback = function() {}; }
+ }, {
+ key: 'getApplicationIconBadgeNumber',
+ value: function getApplicationIconBadgeNumber(successCallback) {
+ var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
- if (typeof errorCallback !== 'function') {
- console.log('PushNotification.getApplicationIconBadgeNumber failure: failure parameter not a function');
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.getApplicationIconBadgeNumber failure: failure ' + 'parameter not a function');
return;
- }
+ }
- if (typeof successCallback !== 'function') {
- console.log('PushNotification.getApplicationIconBadgeNumber failure: success callback parameter must be a function');
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.getApplicationIconBadgeNumber failure: success ' + 'callback parameter must be a function');
return;
- }
+ }
- exec(successCallback, errorCallback, 'PushNotification', 'getApplicationIconBadgeNumber', []);
-};
+ exec(successCallback, errorCallback, 'PushNotification', 'getApplicationIconBadgeNumber', []);
+ }
-/**
- * Get the application icon badge
- */
+ /**
+ * Clear all notifications
+ */
-PushNotification.prototype.clearAllNotifications = function(successCallback, errorCallback) {
- if (!successCallback) { successCallback = function() {}; }
- if (!errorCallback) { errorCallback = function() {}; }
+ }, {
+ key: 'clearAllNotifications',
+ value: function clearAllNotifications() {
+ var successCallback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
+ var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
- if (typeof errorCallback !== 'function') {
- console.log('PushNotification.clearAllNotifications failure: failure parameter not a function');
+ if (typeof errorCallback !== 'function') {
+ console.log('PushNotification.clearAllNotifications failure: failure parameter ' + 'not a function');
return;
- }
+ }
- if (typeof successCallback !== 'function') {
- console.log('PushNotification.clearAllNotifications failure: success callback parameter must be a function');
+ if (typeof successCallback !== 'function') {
+ console.log('PushNotification.clearAllNotifications failure: success callback ' + 'parameter must be a function');
return;
- }
-
- exec(successCallback, errorCallback, 'PushNotification', 'clearAllNotifications', []);
-};
+ }
-/**
- * Listen for an event.
- *
- * Any event is supported, but the following are built-in:
- *
- * - registration
- * - notification
- * - error
- *
- * @param {String} eventName to subscribe to.
- * @param {Function} callback triggered on the event.
- */
+ exec(successCallback, errorCallback, 'PushNotification', 'clearAllNotifications', []);
+ }
+ /**
+ * Listen for an event.
+ *
+ * The following events are supported:
+ *
+ * - registration
+ * - notification
+ * - error
+ *
+ * @param {String} eventName to subscribe to.
+ * @param {Function} callback triggered on the event.
+ */
-PushNotification.prototype.on = function(eventName, callback) {
- if (!this._handlers.hasOwnProperty(eventName)) {
- this._handlers[eventName] = [];
+ }, {
+ key: 'on',
+ value: function on(eventName, callback) {
+ if (!this.handlers.hasOwnProperty(eventName)) {
+ this.handlers[eventName] = [];
+ }
+ this.handlers[eventName].push(callback);
}
- this._handlers[eventName].push(callback);
-};
-/**
- * Remove event listener.
- *
- * @param {String} eventName to match subscription.
- * @param {Function} handle function associated with event.
- */
+ /**
+ * Remove event listener.
+ *
+ * @param {String} eventName to match subscription.
+ * @param {Function} handle function associated with event.
+ */
-PushNotification.prototype.off = function (eventName, handle) {
- if (this._handlers.hasOwnProperty(eventName)) {
- var handleIndex = this._handlers[eventName].indexOf(handle);
+ }, {
+ key: 'off',
+ value: function off(eventName, handle) {
+ if (this.handlers.hasOwnProperty(eventName)) {
+ var handleIndex = this.handlers[eventName].indexOf(handle);
if (handleIndex >= 0) {
- this._handlers[eventName].splice(handleIndex, 1);
+ this.handlers[eventName].splice(handleIndex, 1);
}
+ }
}
-};
-/**
- * Emit an event.
- *
- * This is intended for internal use only.
- *
- * @param {String} eventName is the event to trigger.
- * @param {*} all arguments are passed to the event listeners.
- *
- * @return {Boolean} is true when the event is triggered otherwise false.
- */
+ /**
+ * Emit an event.
+ *
+ * This is intended for internal use only.
+ *
+ * @param {String} eventName is the event to trigger.
+ * @param {*} all arguments are passed to the event listeners.
+ *
+ * @return {Boolean} is true when the event is triggered otherwise false.
+ */
-PushNotification.prototype.emit = function() {
- var args = Array.prototype.slice.call(arguments);
- var eventName = args.shift();
+ }, {
+ key: 'emit',
+ value: function emit() {
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
- if (!this._handlers.hasOwnProperty(eventName)) {
+ var eventName = args.shift();
+
+ if (!this.handlers.hasOwnProperty(eventName)) {
return false;
- }
+ }
- for (var i = 0, length = this._handlers[eventName].length; i < length; i++) {
- var callback = this._handlers[eventName][i];
+ for (var i = 0, length = this.handlers[eventName].length; i < length; i++) {
+ var callback = this.handlers[eventName][i];
if (typeof callback === 'function') {
- callback.apply(undefined,args);
+ callback.apply(undefined, args);
} else {
- console.log('event handler: ' + eventName + ' must be a function');
+ console.log('event handler: ' + eventName + ' must be a function');
}
- }
+ }
- return true;
-};
-
-PushNotification.prototype.finish = function(successCallback, errorCallback, id) {
- if (!successCallback) { successCallback = function() {}; }
- if (!errorCallback) { errorCallback = function() {}; }
- if (!id) { id = 'handler'; }
+ return true;
+ }
+ }, {
+ key: 'finish',
+ value: function finish() {
+ var successCallback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
+ var errorCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
+ var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'handler';
- if (typeof successCallback !== 'function') {
+ if (typeof successCallback !== 'function') {
console.log('finish failure: success callback parameter must be a function');
return;
- }
+ }
- if (typeof errorCallback !== 'function') {
+ if (typeof errorCallback !== 'function') {
console.log('finish failure: failure parameter not a function');
return;
+ }
+
+ exec(successCallback, errorCallback, 'PushNotification', 'finish', [id]);
}
+ }]);
- exec(successCallback, errorCallback, 'PushNotification', 'finish', [id]);
-};
+ return PushNotification;
+}();
/*!
* Push Notification Plugin.
*/
module.exports = {
- /**
- * Register for Push Notifications.
- *
- * This method will instantiate a new copy of the PushNotification object
- * and start the registration process.
- *
- * @param {Object} options
- * @return {PushNotification} instance
- */
-
- init: function(options) {
- return new PushNotification(options);
- },
+ /**
+ * Register for Push Notifications.
+ *
+ * This method will instantiate a new copy of the PushNotification object
+ * and start the registration process.
+ *
+ * @param {Object} options
+ * @return {PushNotification} instance
+ */
- hasPermission: function(successCallback, errorCallback) {
- exec(successCallback, errorCallback, 'PushNotification', 'hasPermission', []);
- },
+ init: function init(options) {
+ return new PushNotification(options);
+ },
- /**
- * PushNotification Object.
- *
- * Expose the PushNotification object for direct use
- * and testing. Typically, you should use the
- * .init helper method.
- */
+ hasPermission: function hasPermission(successCallback, errorCallback) {
+ exec(successCallback, errorCallback, 'PushNotification', 'hasPermission', []);
+ },
- PushNotification: PushNotification
-};
+ /**
+ * PushNotification Object.
+ *
+ * Expose the PushNotification object for direct use
+ * and testing. Typically, you should use the
+ * .init helper method.
+ */
+ PushNotification: PushNotification
+}; \ No newline at end of file