I have many phonegap (CLI-8.0.0) applications in production that are currently receiving notifications in 2019 so yes it's work.
I used the 3rd party Cloud messaging by Firebase (https://firebase.google.com/docs/cloud-messaging/) and the phonegap-plugin-push (version 2.1.3 for Android and last version for iOS)
We have tested the following on Android 7 and 8 and iOS 12.
Notifications were sent with the C# Firebase API.
How to use Firebase with Phonegap :
First you have to install 4 plugin for Android :
<plugin name="phonegap-plugin-push" spec="2.1.3" />
<plugin name="cordova-android-support-gradle-release" spec="https://github.com/dpa99c/cordova-android-support-gradle-release.git" />
<plugin name="cordova-android-play-services-gradle-release" spec="https://github.com/dpa99c/cordova-android-play-services-gradle-release.git" />
<plugin name="cordova-android-firebase-gradle-release" spec="https://github.com/dpa99c/cordova-android-firebase-gradle-release.git" />
I used 2.1.3 version of plugin for android because the last version didn't work for me.
*-gradle-release grants you full compatibility between phonegap-plugin-push and other plugins because there are often conflicts
For iOS i used last version :
<plugin name="phonegap-plugin-push" />
After that, you have to register your apps to firebase until you have sender id
and google-services.json
.
For apple you have to grant your certificate the push notification rights and get an APNS certificate.
When you have your sender id
, google-services.json
and GoogleService-Info.plist
you just have to configure your config.xml like this:
<platform name="android" custom="push">
<plugin name="cordova-android-support-gradle-release" spec="https://github.com/dpa99c/cordova-android-support-gradle-release.git" />
<plugin name="phonegap-plugin-push" spec="2.1.3">
<param name="SENDER_ID" value="XXXXXXXXXXXXXXXXXXXXXX" />
</plugin>
<plugin name="cordova-android-play-services-gradle-release" spec="https://github.com/dpa99c/cordova-android-play-services-gradle-release.git" />
<plugin name="cordova-android-firebase-gradle-release" spec="https://github.com/dpa99c/cordova-android-firebase-gradle-release.git"/>
<resource-file src="google-services.json" target="/app/google-services.json" />
</platform>
<platform name="ios" custom="push">
<plugin name="phonegap-plugin-push">
<param name="SENDER_ID" value="XXXXXXXXXXXXXXXX" />
</plugin>
<resource-file src="GoogleService-Info.plist" />
</platform>
google-services.json and GoogleService-Info.plist has to be at the same level of your config.xml in the www folder.
After that, the documentation of the plugin will be able to help you better than me.