Post

Replies

Boosts

Views

Activity

userNotificationCenter(_:willPresent:withCompletionHandler:) Triggered Twice in iOS 18
I'm encountering an unexpected issue in my app since upgrading to iOS 18, and I’m wondering if anyone has found a solution or workaround. The Problem: The userNotificationCenter(:willPresent:withCompletionHandler:) method is being triggered twice whenever a push notification arrives while the app is in the foreground. Additionally, application(:didReceiveRemoteNotification:fetchCompletionHandler:) is also being triggered once during the same notification event. This redundant triggering is causing inconsistent behavior and double-processing of notifications, which is obviously problematic for my use case. The exact flow looks like this: userNotificationCenter(:willPresent:withCompletionHandler:) — called twice. application(:didReceiveRemoteNotification:fetchCompletionHandler:) — called once. Has anyone else experienced this behavior specifically in iOS 18? Is this a known issue with the new version? This issue is affecting how we handle notifications in a major way, and I’m hoping there's a more fundamental fix or explanation for this behavior in iOS 18.
1
0
44
3d