Closed joebernard closed 3 years ago
I get this error by trying to schedule a local notification using the new addNotificationRequest method.
addNotificationRequest
'Invalid parameter not satisfying: identifier != nil' was thrown while invoking addNotificationRequest on target RNCPushNotificationIOS with params ( { alertBody = "my alert body"; alertTitle = "my alert title"; fireDate = "2020-10-28T21:14:07.691+00:00"; userInfo = { data = { id = "febab689-9b96-afaa-11eb-8931d4e1699f"; myData: 'some data' }; }; } )
The stack trace references this line as the culprit.
I am calling it like this:
// first cancel any existing requests PushNotificationIOS.cancelLocalNotifications(userInfo); // schedule new push notification PushNotificationIOS.addNotificationRequest({ fireDate, alertTitle, alertBody, userInfo, });
Workaround: If I rollback to 1.6.1 and use scheduleLocalNotification instead of addNotificationRequest the problem goes away.
1.6.1
scheduleLocalNotification
@joebernard you need to set id in addNotificationRequest params. You can pass some dynamic id like -
id
id: new Date().toString()
I get this error by trying to schedule a local notification using the new
addNotificationRequest
method.The stack trace references this line as the culprit.
I am calling it like this:
Workaround: If I rollback to
1.6.1
and usescheduleLocalNotification
instead ofaddNotificationRequest
the problem goes away.