Closed shayanaijaz closed 3 years ago
@mauron85/cordova-plugin-background-geolocation has its own push notification handlers and prevent's Capacitor push from working
related https://github.com/ionic-team/capacitor/discussions/3357
@shayanaijaz and all the people who run in the same problem:
this workaround was helpful: https://github.com/mauron85/cordova-plugin-background-geolocation/issues/627#issuecomment-576582283
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Bug Report
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 2.4.0 @capacitor/core: 2.4.0 @capacitor/android: 2.4.0 @capacitor/electron: 2.4.0 @capacitor/ios: 2.4.0
Installed Dependencies:
@capacitor/cli 2.4.0 @capacitor/ios 2.4.0 @capacitor/core 2.4.0 @capacitor/android 2.4.0 @capacitor/electron not installed
[success] Android looking great! 👌 Found 14 Capacitor plugins for ios: @mauron85/cordova-plugin-background-geolocation (3.1.0) cordova-plugin-actionsheet (2.3.3) cordova-plugin-advanced-http (2.5.1) cordova-plugin-androidx (2.0.0) cordova-plugin-androidx-adapter (1.1.1) cordova-plugin-background-fetch (6.1.1) cordova-plugin-dialogs (2.0.2) cordova-plugin-file (6.0.2) cordova-plugin-geolocation (4.0.2) cordova-plugin-screen-orientation (3.0.2) cordova.plugins.diagnostic (5.0.2) es6-promise-plugin (4.2.2) phonegap-plugin-multidex (1.0.0) uk.co.workingedge.phonegap.plugin.launchnavigator (5.0.4) [success] iOS looking great! 👌
Platform(s)
iOS
Current Behavior
The pushNotificationReceived and pushNotificationActionPerformed events are not triggered on iOS. I am using AWS Pinpoint therefore I am using APNS to get the token and using the pinpoint console to send test notifications. I am able to get a APNS token fine and successfully send a push through the Pinpoint console. On the phone I receive I receive a banner notification with the title and message I specified but the events mentioned above are not triggered and I see no console output.
Expected Behavior
On Android everything is working as expected, both the events fire and I am able to see the console outputs. Functionality should be the same for iOS.
Code Reproduction
async init() {
}
Other Technical Details
npm --version
output: 6.13.4node --version
output: v12.14.1pod --version
output (iOS issues only): 1.9.3Additional Context