evollu / evollu/react-native-fcm
iOS can't read local notification body
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 661
- PR merge metrics
- No merged PRs in 30d
Description
Version: 10.0.3
Tested on: iOS 9.3 and iOS 11.1
Language: TypeScript
Scheduled local notifications seem to work fine when the app is in the background. But when I receive them in the foreground I can't access their body - the `notif.notification` is undefined.
Receive notifications:
FCM.on(FCMEvent.Notification, async (notif) => {
if (notif.local_notification) {
console.log("notif.notification: " + notif.notification)
}
})
Schedule local notification:
FCM.scheduleLocalNotification({
fire_date: fireDate,
id: notificationId,
body: message,
show_in_foreground: true,
})
I'd like to show an alert when I receive a local notification (with a notification body) in the foreground, how can I do that?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.