react-native-push-notification/ios

Need event listener when notification onShow

muslimmuda15 opened this issue · 0 comments

I need event listener when notif is fire by schedule time.

useEffect(() => {
      const type = 'notification';
      PushNotificationIOS.addEventListener(type, onRemoteNotification);
      return () => {
           PushNotificationIOS.removeEventListener(type);
      };
});

const onRemoteNotification = notification => {
      const actionIdentifier = notification.getActionIdentifier();
      console.log('NOTIF ACTION IDENTIFIER :', actionIdentifier);
}

I have no any text in my console when notif is fired.