Repository navigation
Conversation
camden-king
approved these changes
Oct 22, 2026
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.
(Fresh-branch version of #917 by @Prash88)
On cancel,
ASWebAuthenticationSession's completion handler runs before its dismiss transition starts (this is an apple bug, radar is linked at the end). We dropped our last reference inside that handler, so the transition's completion block later released an already-freedSFAuthenticationSession-EXC_BAD_ACCESSonce the sheet finished animating.At each release point the session goes to a main-queue block that holds it for one turn + 2s. The delay starts once the main queue is next free, so a slow completion callback doesn't eat into it (2s is a guess, there's no real API to observe the transition).
I also tried the messy option of inspecting the
transitionCoordinatorto time against the animation, but the crash happened before that was available.Not covered here: the Catalyst agent has the same handler pattern. There's no unit test, as dealloc timing isn't unit-testable.
Verified on the iOS 26.4 simulator: 3 cancels via the #917 repro, no crash.
Radar link: https://openradar.appspot.com/FB12132525
Dev forum workaround link: https://developer.apple.com/forums/thread/123667
Note to reviewer: Sent you some additional internal context on chat.