Open varungupta85 opened 1 year ago
I realize the issue. The notification
parameter is of type UNNotification *
and the method required a parameter of type UILocalNotification *
. I guess we this can be fixed by either adding a converter to RCTConvert
to convert UNNotification
to UILocalNotification
or having a method that accepts UNNotificationRequest
to send events to the app.
Seeing this issue as well. Upgraded from 1.8.0 to 1.11.0. For now, we are downgrading back to 1.8.0
try to touch/tap the localNotification notification, you will get the listener triggered
Currently, it shows a heads-up notification even if the app is in foreground and doesn't emit
localNotification
event which is not the previous behavior. Previously, no notification was shown and thelocalNotification
event was emitted and the notification could be handled in the app as the app developer see fit.I see that in
willPresentNotification
, we just callcompletionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge);
which is probably the reason a heads-up notification is shown. I tried adding[RNCPushNotificationIOS didReceiveLocalNotification:notification];
to the method and call thecompletionHandler
usingcompletionHandler(UNNotificationPresentationOptionNone);
but I get the following error:Due to my limited knowledge in Objective-C, I don't know what kind of casting is needed to cast to the right type. Please advice.