You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On iOS 17 (and previous versions), our app was working correctly, and receiving a single call to the push handler.
Actual Behaviour
Once I updated my device to iOS 18, it started calling the handler twice. This does not happen on background, and wasn't reproduced on other two devices with iOS 17, nor our logs show it's suddenly sending two pushes.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Not adding the rest given no one is probably going to fix it, but I wanted to report it anyway so users are a tiny bit aware of the problem, and possible workarounds.
My best bet so far is trying ideas with Lodash functions: lodash/lodash#2403
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
This issue occurs with iOS 18+ and is not related to the plugin.
I have already created a minimal reproduction repository of a native iOS application, demonstrating that this issue exists outside of Cordova and the plugin
I submitted a report to Apple prior to the release of iOS 18 but have not yet received a response.
I see two possible approaches to resolve this issue:
1. Native/Plugin (PR Solution)
In this PR, I've added logic specifically for iOS 18.0 to check if the notification payload is a duplicate.
The duplication check is based on two key pieces of information:
The payload's date/timestamp
The payload's content
If both the timestamp and content are identical, the second payload is discarded, preventing duplicate processing.
2. App Developer (Alternative Solution)
An alternative solution would require app developers to handle the duplicate detection on the front-end.
For example, developers could:
Compare the payload content themselves on the front-end.
Implement a debounce mechanism, as you suggested in the ticket description.
Currently, the payload's date/timestamp is not passed to the front-end, so developers would need to manage this comparison themselves.
Let me know your thoughts:
If the PR looks good, I can go ahead and merge it.
If the detection mechanism seems too strict and might prevent valid cases, we could close the PR and leave it up to app developers to implement their own checks.
Anther note is we could consider adding a preference flag in the future to allow users to disable this mechanism if it turns out to be restrictive for some, while others might find it helpful.
Just to reiterate, this fix only applies to iOS 18.0. I’ve tested it with the official release of iOS 18.1, and the issue seems resolved. However, I couldn’t find any comments in the Release Notes, and they haven't responded to my bug ticket yet.
Bug Report
Expected Behaviour
On iOS 17 (and previous versions), our app was working correctly, and receiving a single call to the push handler.
Actual Behaviour
Once I updated my device to iOS 18, it started calling the handler twice. This does not happen on background, and wasn't reproduced on other two devices with iOS 17, nor our logs show it's suddenly sending two pushes.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Not adding the rest given no one is probably going to fix it, but I wanted to report it anyway so users are a tiny bit aware of the problem, and possible workarounds.
My best bet so far is trying ideas with Lodash functions: lodash/lodash#2403
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
(Android) Device Vendor (e.g. Samsung, HTC, Sony...)
Androids are not affected
iOS
Version 18.0.1
cordova info
PrintoutIgnored as well
Sample Push Data Payload
Ignored as well
Sample Code that illustrates the problem
Ignored as well
Logs taken while reproducing problem
Ignored as well
The text was updated successfully, but these errors were encountered: