evollu / evollu/react-native-fcm

iOS can't read local notification body

Open
#644 5 comments 0 reactions 0 assignees View on GitHub
question
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.