Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix async/await threading issues with Swift 5.7 #722

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Jul 21, 2022

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

馃搵 Changes

This PR makes sure the Web Auth operations run on the main thread when invoked using async/await, due to a change in the way non-actor-isolated async functions run with Swift 5.7: https://github.com/apple/swift-evolution/blob/main/proposals/0338-clarify-execution-non-actor-async.md

Previously, the code would run on the main thread:


(using Xcode 13.4.1)

But with Swift 5.7, it does not:


(using Xcode 14.0 beta 3)

馃搸 References

Fixes #721

馃幆 Testing

This was tested manually using an iPhone 13 simulator running iOS 16, using Xcode 14.0 beta 3 (14A5270f).

Screen.Recording.2022-07-21.at.18.40.29.mov

@Widcket Widcket requested a review from a team as a code owner July 21, 2022 21:54
@Widcket Widcket enabled auto-merge (squash) July 21, 2022 23:20
@stevehobbsdev stevehobbsdev merged commit 3c303b1 into master Jul 22, 2022
@stevehobbsdev stevehobbsdev deleted the fix/async-threading branch July 22, 2022 12:07
@Widcket Widcket mentioned this pull request Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI threading violation using async/await with Xcode 14 beta 3
3 participants