Repository navigation
Conversation
added 6 commits
November 24, 2026 17:20
The application picks the records up on SDK start, on becoming active and on background wakes of the delivery queue.
…module The record and the names of its files are compiled into both Mindbox and MindboxNotifications from the MindboxShared folder, so the extension and the application cannot drift apart.
Contributor
|
This branch has not been deployed
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 cascade sends an SMS when the delivery confirmation of a push does not arrive within 45 seconds. After MOBILE-652 the notification service extension makes one request, and a single failed answer already costs the SMS. The extension now tries three times before it shows the push, and leaves a record for the application when all three fail.
What changes in
didReceive(_:withContentHandler:):last-successwith the time in milliseconds. The application will use it to reset its retry pause;<sha256 of the URL>.pending. After three failures it becomes<sha256>.jsonwithlastStatusCode(absent when there was no answer) andlastAttemptAt;The record format moves to a new folder,
MindboxShared: one struct with five fields and the names of the files. It is compiled into bothMindboxandMindboxNotifications— a target inPackage.swift,source_filesin the two podspecs, both targets in the Xcode project — the same waySDKVersionProvideris. The type is@_spi(Internal), so the public API does not change. The main module does not use it yet.Not in this PR:
pushDelivered(_:)still only writes a log. That is MOBILE-657.One difference from Android (MOBILE-656): there the attempts go at seconds 0, 3 and 6. Here they go without a pause, because on iOS the push is shown only after them, and a pause would delay every push whose confirmation fails fast.
Checked on an iPhone 16 Pro (iOS 27.0.1) with sandbox pushes from the Push Notifications console, the delivered URL routed through Proxyman to a local mock:
last-successis left;.jsonrecord with the last status code;.jsonrecord without a status code;callbacksor with anhttp://URL: no request, no record;Every request was a POST with the body
{}, the four SDK headers and adateTimeOffsetthat grows from attempt to attempt. No.pendingfile was left after a push was shown.The device run was made before the record format moved to
MindboxShared. After that: the Swift package builds from a copy without the Xcode project,pod lib lintpasses for both podspecs with static and dynamic linkage (the main pod against the localMindboxLogger.podspec), and the test application builds for the simulator with its extensions.Not checked: a write on a locked device of an application with Data Protection set to Complete. The protection of the files was confirmed only by their attributes.
Unit tests:
MindboxNotificationsTestspass (96). In the full local run 2739 tests pass and 3 fail, all inDateFormatMigrationTestsof the main module, which this PR does not change apart from compiling the shared file.https://tracker.yandex.ru/MOBILE-658