Open Wakko90 opened 2 years ago
now, i faced this issue too
Push notifications don't work in iOS simulator, only on real device:
https://stackoverflow.com/questions/1811900/can-we-check-push-notification-in-simulator
You can trigger them manually for testing i.e. via terminal commands. But real push notifications coming from Firebase will not work.
Hello, I'm working on a NS/Angular project using Firebase. Push notifications from Firebase Cloud Messaging are not received at all on iOS simulator (I cannot test on a real iOS device at the moment).
Here is my configuration:
"@nativescript/firebase": "^11.1.3", "@nativescript/angular": "~12.0.0", "@nativescript/core": "~8.0.0"
XCode version 13.0 Simulating an iPhone 13 with iOS 15.0
APN Auth Key is uploaded to my Firebase console
This is my firebase.nativescript.json file
Entitlements file is placed in App_Resources/iOS and this is its content:
the file App_Resources/iOS/Info.plist contains this value
I followed this guide to the letter as requested in the plugin documentation. Anyway i couldn't perform the tasks described in the sections "Initialize Firebase in your app" and "Register for remote notifications" but I guess this plugin should handle that.
my main.ts file
my app.component.ts ngOnInit method
When I run the application, I correctly receive the push token via the onPushTokenReceivedCallback
I use Postman to make POST calls to Firebase Messaging service, this is what I send:
and this is the response
But in the app the OnMessageReceivedCallback is never fired and no popup comes out on the simulator.
Can someone please help me figure out what I'm doing wrong?
Thanks