I am trying to show a notification on my react-native app using react-native-push-notifications which is based on PushNotificationsIOS that ships with React Native. The problem is that nothing happens, no error, no notification, nothing.
I am not sure whether I made an error when programming the notification, or it just doesn't work on a simulator.
Thank you!
I've figured it out.
To send local notifications, we can use the simulator. When using react-native-push-notifications, I forgot to add the configurations of the push notifications to the same component that was attempting to schedule the notifications and that is the reason why it did not work.
However, to send remote notifications we need to get the device ID, but the simulator doesn't have one because it is not a real device, for that reason we cannot receive remote notifications from a server and display them using an emulator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With