const onRemoteNotification = (notification) => {
console.log('entered')
// Use the appropriate result based on what you needed to do for this notification
const result = PushNotificationIOS.FetchResult.NoData;
notification.finish(result);
};
useEffect(() => {
const type = 'notification';
PushNotificationIOS.addEventListener(type, onRemoteNotification);
return () => {
PushNotificationIOS.removeEventListener(type);
};
});
React Native Version: 0.73.6
Reproduction Steps:
Using the following code, "entered" is never logged.
Notes: