Following along in the repo’s issues list, the maintainer seems to have fixed the issue with Android 12 (SDK Version 31) nearly a year ago, but has left it as a dev release for the time being (4.0.0.dev.0). Possibly due to potential issues this update may or may not be having with iOS.
The Voltbuilder upload tool does not allow for plugin versions of this kind:
<plugin name="@havesource/cordova-plugin-push" spec="4.0.0.dev.0">
UserError: Error: Plugin '@havesource/cordova-plugin-push' has invalid spec: '4.0.0.dev.0'.
Plugin specs should be in the form '1.2.3'. They should not include pathnames or URLs.
Has anyone else gotten this to work? Or does anyone have recommendations for a different push notification plugin (Android & iOS) that has a better track record for stability. This one has had me a bit worried ever since it was forked from the now obsolete phonegap-plugin-push.
you can use the “cordova-plugin-firebasex” plugin
I compiled just a day ago without problems and the plugin works fine.
Below is an excerpt of my config.xml:
I tried using: <plugin name="@havesource/cordova-plugin-push@dev" />, but ran into some issues with it. This was before the Gradle/Kotlin settings were mentioned above, so I did not try those.
I ended up switching over to cordova-plugin-firebasex and have everything working now. For anyone else reading this, that involved:
Changing the JS handling the plugin. This was a bit tricky, as not having the function parameters exactly correct would crash iOS, but not Android.
Changing the push notification payload server side. The two plugins did not seem to use compatible payloads.
Also of note:
I got Crashlytics for free through the Firebase console