I’m facing an issue with OneSignal notifications on iOS.
Current behavior
Push notification is received correctly.
When I tap the notification, the app opens.
However, the OneSignal notification click listener does not fire, so navigation based on notification data never happens.
This issue is reproducible on latest iOS versions (26.2).
Previously working fine when i am on the IOS 18.6
useEffect(() => {
OneSignal.initialize('APP_ID');
OneSignal.Notifications.addEventListener(
'foregroundWillDisplay',
(event) => {
const data = event.getNotification()?.additionalData;
// Custom in-app handling works fine here
event.getNotification().display();
}
);
OneSignal.Notifications.addEventListener('click', (event) => {
console.log('Notification clicked', event);
const data = event?.notification?.additionalData;
// Navigation based on notification type
// (navigation does NOT execute because listener is not firing)
});
return () => {
OneSignal.Notifications.removeEventListener('foregroundWillDisplay');
OneSignal.Notifications.removeEventListener('click');
};
}, []);
I’m facing an issue with OneSignal notifications on iOS.
Current behavior
Push notification is received correctly.
When I tap the notification, the app opens.
However, the OneSignal notification click listener does not fire, so navigation based on notification data never happens.
This issue is reproducible on latest iOS versions (26.2).
Previously working fine when i am on the IOS 18.6
useEffect(() => {
OneSignal.initialize('APP_ID');
OneSignal.Notifications.addEventListener(
'foregroundWillDisplay',
(event) => {
const data = event.getNotification()?.additionalData;
// Custom in-app handling works fine here
event.getNotification().display();
}
);
OneSignal.Notifications.addEventListener('click', (event) => {
console.log('Notification clicked', event);
const data = event?.notification?.additionalData;
});
return () => {
OneSignal.Notifications.removeEventListener('foregroundWillDisplay');
OneSignal.Notifications.removeEventListener('click');
};
}, []);