-
Notifications
You must be signed in to change notification settings - Fork 54
Update examples to use default main actor #248
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
enum Section: Hashable { | ||
nonisolated enum Section: Hashable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually unrelated to our library. It's required just to work with UICollectionViewDiffableDataSource
in default main actor isolation mode.
|
||
extension DependencyValues { | ||
var openSettings: @Sendable () async -> Void { | ||
nonisolated var openSettings: @Sendable () async -> Void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is what is necessary to work with Dependencies in default main actor isolation mode.
.denied | ||
} | ||
var startTask: | ||
@Sendable (_ request: SFSpeechAudioBufferRecognitionRequest) async -> AsyncThrowingStream< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SFSpeechAudioBufferRecognitionRequest
is not sendable and this is now complaining. but we really don't need to accept this value as an argument in this demo so I just got rid of it.
While we don't feel that most projects should be using default main actor isolation, it is the default for new projects in Xcode 26. As such we have converted our demo apps to use default main actor isolation so that one knows how to work around its quirks.