Closed fascox closed 4 years ago
Firebase Cloud Message notification work quite well under Android. But in iOS notifications are pushed but shows only in Xcode console, callbacks like onMessageReceived() or with getToken() never get triggered.
Related code:
This method never get triggered.
this.firebase.onMessageReceived() <---- .subscribe(msg => { console.log('message received: ', msg.body); if (this.platform.is('ios')) { this.toastService.showAlert(msg.aps.alert); } else { this.toastService.showAlert(msg.body); } });
Xcode Output console while FCM push message correctly
2020-03-24 16:52:35.373086+0100 LibroUnico[89708:21726903] FirebasePlugin[native] LOG: didReceiveMessage: { "collapse_key" = "xx.zzzzz.yyyy"; from = 319668515092; notification = { body = "Hai un nuovo documento."; e = 1; title = "Test push"; }; }
Other information: Ionic CLI : 6.3.0 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.0.5 @angular-devkit/build-angular : 0.900.4 @angular-devkit/schematics : 9.0.4 @angular/cli : 9.0.4 @ionic/angular-toolkit : 2.2.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : android 8.1.0, ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 10 other plugins)
Utility:
cordova-res (update available: 0.10.0) : 0.9.0 native-run : 0.3.0
System:
Android SDK Tools : 26.1.1 (/Users/fascox/Library/Android/sdk) ios-deploy : 1.10.0 ios-sim : 8.0.2 NodeJS : v13.8.0 (/usr/local/Cellar/node/13.8.0/bin/node) npm : 6.14.3 OS : macOS Catalina Xcode : Xcode 11.3.1 Build version 11C504
never mind, missing APN configurations.
Firebase Cloud Message notification work quite well under Android. But in iOS notifications are pushed but shows only in Xcode console, callbacks like onMessageReceived() or with getToken() never get triggered.
Related code:
This method never get triggered.
Xcode Output console while FCM push message correctly
Other information: Ionic CLI : 6.3.0 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.0.5 @angular-devkit/build-angular : 0.900.4 @angular-devkit/schematics : 9.0.4 @angular/cli : 9.0.4 @ionic/angular-toolkit : 2.2.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : android 8.1.0, ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 10 other plugins)
Utility:
cordova-res (update available: 0.10.0) : 0.9.0 native-run : 0.3.0
System:
Android SDK Tools : 26.1.1 (/Users/fascox/Library/Android/sdk) ios-deploy : 1.10.0 ios-sim : 8.0.2 NodeJS : v13.8.0 (/usr/local/Cellar/node/13.8.0/bin/node) npm : 6.14.3 OS : macOS Catalina Xcode : Xcode 11.3.1 Build version 11C504