EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 446 forks source link

addOnMessageReceivedCallback is not called when app in background #1604

Open bylmzio opened 4 years ago

bylmzio commented 4 years ago

Hey Folks, i have a very strange problem. On IOS the addOnMessageReceivedCallback is not called when the app is in background. Sometimes the callback is triggered. I could not find out, when and why. Fresh clean install on my first ios phone, callback ist called when app is in background and app is terminated. Fresh clean install on my second ios phone, callback ist not called when app is in background and app is terminated. Same push-notification same ios version 13.4. I dont get it. Setup:

node 12.14.1
npm 6.13.7
nativescript 6.3.3
@nativescript/core 6.3.2
tns-core-modules 6.3.2
nativescript-plugin-firebase: 10.4
bylmzio commented 4 years ago

Another hin: Now i dont geht the Error Error: Can't end BackgroundTask: no background task exists with and it works fine. But when i get the error, is not working.

calleja23 commented 4 years ago

@bunower To me right now, yesterday's application has stopped working I'm remaking it from 0 to see what happened. I get no glitches, but no notification either

bylmzio commented 4 years ago

i figured out something strange. When the app is clodes, after a push is incoming addOnMessageReceivedCallback is launching the app in background. It runs app.js and app.vue completly. @EddyVerbruggen can you tell me something about it?