The provided information is not enough to test the described scenario on our side but I can make some suggestions how to resolve your issue. First of all - to enable notifications via Firebase there are several plugins and I am guessing that you are either using one of them or creating your own implementation. (e.g. is it nativescript-local-notification
or your own code).Please refer to the detailed guides in the README sections of the used plugin as there are many small but crucial steps to enable the Cloud Messaging.
Notice that in iOS the notifications might be truly tested only on a real device
and are harder or even impossible to test on a simulator. To test on a real device you will have your Firebase console configured (with created push notification certificate
), the application has to be created with setting up your development profile and then after providing all the steps required by the specific push notification plugin you can send a notification from your Firebase console to your iOS application. Again it will only appear on a real device and should not be triggered on a simulator (or at least not all notification functionalities will work on the simulator)
Note that if you are using nativescript-local-notifications
for iOS addMessageReceivedCallback
should be triggered in both background and foreground (which ease the testing process) so you can check if your notifications are triggering the callback method with a simple log (or as in your case with a logic to show a dialog or redirect to another page). Are your logs from addMessageReceivedCallback
"Received message: "
// are you receving this on sent notificitaion?
Please make sure that you are executing each step provided by the author of the plugin.Setting up Firebase can indeed be a job that relays on many small but crucial steps. If using nativescript-local-notifications
you can also try this demo
(with providing your own Firebase settings and files) and test the differences between your code and the code of the author. If none of this work please provide us with a sample code that can reproduce this one and/or log an issue at the plugin's repository.
As a side note, one of the best plugins in terms of provided functionality for using Firebase with NativeScript is nativescript-plugin-firebase
which enables almost all of what Firebase can offer. There is a sub-section especially created for working with Cloud Messaging (a.k.a. push notifications) here
. Fully working application demonstrating the usage of the plugin with Firebase Cloud Messaging can be found in our nativescript-marketplace-demo
Telerik by Progress