-
Notifications
You must be signed in to change notification settings - Fork 293
Closed
Description
Hey.
I've currently done full integration as per documentation (AppDelegate .h and .m), and notification event listener returns most of the data as undefined.
RNCPushNotificationIOS.addEventListener('localNotification', notif => {
console.log(notif);
});
// {"_alert": undefined, "_badgeCount": undefined, "_category": "", "_data": {"id": "1231231"}, "_fireDate": undefined, "_isRemote": undefined, "_remoteNotificationCompleteCallbackCalled": false, "_sound": undefined}
Although in the native side you can easily get fireDate etc., it results undefined in the listener.
UIApplication *app = [UIApplication sharedApplication];
NSArray *eventArray = [app scheduledLocalNotifications];
for (int i=0; i<[eventArray count]; i++)
{
UILocalNotification* oneEvent = [eventArray objectAtIndex:i];
NSLog(@"notifs hello %@", oneEvent);
}
// notifs hello <UIConcreteLocalNotification: 0x600003561e00>{fire date = Wednesday, July 8, 2020 at 12:37:21 PM Eastern European Summer Time, time zone = (null), repeat interval = 0, next fire date = Wednesday, July 8, 2020 at 12:37:21 PM Eastern European Summer Time, user info = {
Notifications work alright and fire on time with message and text. What am I missing?
RNCPushNotificationIOS.scheduleLocalNotification({
fireDate: new Date(Date.now() + 15000).toISOString(),
alertTitle: 'hello',
alertBody: 'message 2',
userInfo: { id: 1231231 },
alertAction: 'view',
});
Metadata
Metadata
Assignees
Labels
No labels