Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async configure(params) {
this.onRegister = params.onRegister;
this.onNotification = params.onNotification;
const initial = await NotificationsIOS.getInitialNotification();
// NotificationsIOS.consumeBackgroundQueue();
return Promise.resolve(initial);
}
}
configure(options) {
this.reduxStore = options.reduxStore;
this.onRegister = options.onRegister;
this.onNotification = options.onNotification;
this.onReply = options.onReply;
this.requestNotificationReplyPermissions();
if (options.popInitialNotification) {
NotificationsIOS.getInitialNotification().
then((notification) => {
if (notification) {
const data = notification.getData();
if (data) {
ephemeralStore.appStartedFromPushNotification = true;
this.handleNotification(data, false, true);
}
}
}).
catch((err) => {
console.log('iOS getInitialNotifiation() failed', err); //eslint-disable-line no-console
});
}
}