Skip to content

foregroundWillDisplay or click listener not working IOS 26.2 #1892

@YasirNaeem25

Description

@YasirNaeem25

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');
};
}, []);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions