Closed fabyeah closed 3 years ago
hey, thanks for the report.
There are plans on our roadmap to populate the data object outside of notifee_options
but currently, you need to set data
inside notifee_options
as you mentioned. This is planned for our next release to forward any custom keys outside of notifee_options
as data
.
For the events, any notification that is displayed by notifee will be handled by notifee. So when the notification is displayed by the notifications service extension, onForegroundEvent
should be triggered when the app first opens.
Hope that helps and answers your questions.
I have the same problem, but I'm using Amazon Pinpoint service . The notification fires but without sound and all the notifee properties. My question is if is there a way to work with amazon Pinpoint and notifee?. Thanks
@helenaford thanks for clarifying. The notification was displayed by the notifications service extension. I guess one can't modify the notification in the Javascript in that case, unfortunately, but only in the AppDelegate.m file?
When the app is in foreground, everything works. But when the app is backgrounded/terminated, only
title
andbody
fields are received from a remote push notification.This is the
apns
field for the notification in the firebase cloud function:In my RN app I have this event handler:
and this for foreground messages:
If the app was in foreground, I get this console.log for
remoteMessage
:Note that all my custom fields are there.
If the app was in background/terminated, when the notification is pressed, the app is opened, the handler runs and I get this console.log for
detail
:Note that all my custom fields are missing, as well as
subtitle
. And as there is no url, I now get an error.On top of this, I'm certain that everything worked fine like this. But I had to rename the app now, which was a ton of work and changes in itunes connect, so I can't check out an old commit to compare. But I never ran into this error before. I feel like I'm going crazy. Tried reinstalling Notifee, cleaning Xcode, etc. the issue is still there.
Now I found out, that whatever fields I set inside
notifee_options
will be available in thedetail.notification
, next totitle
,body
anddata
. This way I can make it work again. So is this actually the correct way to pass custom fields? But why isdata
empty?As a side note, I also have
messaging().onNotificationOpenedApp
andmessaging().getInitialNotification()
in my code for iOS, next tomessaging().onMessage
. But those never get called....? I feel like something is broken here?