Conversation
nan-li
marked this pull request as ready for review
September 24, 2026 16:36
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.
Description
One Line Summary
Remove the 5.3.0-beta pending-auth queues at start, cap cached queue reads, and make UserDefaults archiving exception-safe. SDK-5314.
Details
Motivation
Devices upgrading from the 5.3.0-beta line carry five
*_PENDING_QUEUE_KEYblobs that this branch never reads, and on affected devices those blobs and the regular queue keys are large. Archiving or writing an oversized queue is what crashes the beta today, and the UserDefaults helper here would crash the same way on an unarchivable or oversized value.Scope
OneSignalUserManagerImpl.start()removes the five beta pending keys before the executors read their caches. Their names return toOneSignalCommonDefines.hasOS_IV_BETA_*.OneSignalUserDefaultscatches exceptions from archiving and unarchiving and drops the key instead of raising into the host app, treats a nil decode like a missing key, and refuses to write a value of 4 MB or more, which CFPreferences rejects and which can stop the suite persisting afterwards.Testing
Unit testing
Five tests in
OneSignalCoreTestscover the cap, a blob within the cap, an unreadable blob, an unarchivable value and a value at the platform limit. One test inOneSignalUserTestsseeds all five beta keys plus an oversized update blob, drivesstart(), and asserts the keys are gone and the queue is empty.Manual testing
OneSignalCoreTestsandOneSignalUserTestsrun on an iPhone 17 Pro simulator (iOS 26.5); the full test plan was not run. The dev app from this branch installed over 5.3.0-beta-03 state with 8 parked Requests: both beta keys removed at start, no crash, Requests held until a token arrives. Ran on device.Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code