I'm using these plugin on cordova@8.1.2:
<plugin name="cordova-plugin-device" spec="^1.1.6" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="cordova-plugin-wkwebview-engine" spec="^1.1.4" />
<plugin name="cordova-plugin-inappbrowser" spec="https://github.com/apache/cordova-plugin-inappbrowser" />
<plugin name="cordova-plugin-firebase"
spec="git+https://github.com/dpa99c/cordova-plugin-firebase.git#GH-1057-April-05-android-build-issue" />
<plugin name="cordova-plugin-network-information" spec="^2.0.1" />
<plugin name="cordova-plugin-androidx" spec="^1.0.2" />
<plugin name="cordova-plugin-androidx-adapter" spec="^1.0.2" />
I've tried many different guides, I'm using legacy Build, set the p8 key on firebase for APN and in Android FCM messaging works smoothie. On IoS I can receive it only when the app is in the foreground.
I think the problem is related to "Disconnected from FCM" string. I obtain this log whenever I close or I switch my App.
You are using my old fork of cordova-plugin-firebase
(https://github.com/dpa99c/cordova-plugin-firebase.git#GH-1057-April-05-android-build-issue) which is only a partial fix for that plugin's multiple unresolved issues.
Please try using my fork of that plugin - cordova-plugin-firebasex - which resolves numerous issues with FCM notifications and adds new functionality.
Note: the latest version - cordova-plugin-firebasex@5.0.0
- contains breaking changes such that the API is no longer the same as cordova-plugin-firebase
. If you decide to migrate, please read the documentation carefully.