Repository navigation
MOBILE-652: Confirm push delivery from the notification service extension - #857
Merged
Vailence merged 9 commits intoNov 23, 2026
Conversation
added 7 commits
November 20, 2026 16:56
The notification extension takes callbacks.deliveredUrl (https only) and
builds a POST with the body {}, the SDK headers and dateTimeOffset in
the query.
didReceive writes a file to the App Group, sends one request (3 s for the answer) and shows the push. 2xx and 4xx except 429 remove the file; 429, 5xx and no answer leave it for guaranteed delivery.
Contributor
|
added 2 commits
November 20, 2026 17:20
The notification service extension now sends the delivery confirmation itself, so MindboxNotifications no longer collects nothing.
The parameter was appended, so a URL that already had it sent two. Now every dateTimeOffset of the URL is dropped and one is added at the end, as on Android. The other parameters keep their place and encoding.
sergeysozinov
approved these changes
Nov 23, 2026
Vailence
deleted the
feature/MOBILE-652-delivery-confirmation-request
branch
November 23, 2026 12:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The backend needs to know that a push reached the phone, so that a cascade can fall back from push to a more expensive channel only when the push did not arrive. The notification service extension now reports the delivery itself, as soon as it gets the push.
What the extension does in the standard
didReceive(_:withContentHandler:):callbacks.deliveredUrlfrom the push. The field is optional: a push without it, withnull, with a non-https or unparsable URL is handled exactly as before, with no request and no file;{}, the same four headers as the requests of the main module (Mindbox-Integration,Mindbox-Integration-Version,User-Agent,Content-Type), anddateTimeOffsetadded to the query — milliseconds from receiving the push to sending the request. Other query parameters keep their order and encoding. A redirect is not followed;Not in this PR:
pushDelivered(_:)still only writes a log. That is MOBILE-657.All the code is in
MindboxNotifications. The main module,Package.swiftand the podspecs are not touched, and the public API does not change. The delivered URL is read through the existing internalPayloadmodel.Two things differ from the wording of the task card: the wait is 3 seconds, not 5 (under discussion), and an http URL is dropped while parsing the push instead of being tried once — either way nothing is retried.
Checked on a real iPhone with pushes sent from the Apple Push Notifications console, traffic recorded in Proxyman:
{}, the four headers anddateTimeOffset=3;callbacks: no request;Checked on the simulator, with the service code running in an extension process and Proxyman answering: 200 and 404 remove the file; 429, 500 and a broken TLS connection leave it.
Not checked: the file on the real device (the App Group folder cannot be read from outside), and a 200 from the real backend — staging has no confirmation endpoint yet, so the live answer was 404.
The full unit test run passed before the branch was rebased onto the current mission branch (2673 tests); it was not repeated locally after the rebase, which brought in only main-module changes from MOBILE-541.
https://tracker.yandex.ru/MOBILE-652