Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
registerNotificationListener(listener) {
if (Platform.OS === 'ios') {
PushNotification.onNotification = (notification) => {
listener(notification);
notification.finish(PushNotificationIOS.FetchResult.NoData);
};
} else {
PushNotification.onNotification = listener;
}
}