Meet distributed actors in Swift

RSS for tag

Discuss the WWDC22 Session Meet distributed actors in Swift

Posts under wwdc2022-110356 tag

2 Posts
Sort by:
Post not yet marked as solved
4 Replies
1.9k Views
Non-sendable type '(any URLSessionTaskDelegate)?' exiting actor-isolated context in call to non-isolated instance method 'data(from:delegate:)' cannot cross actor boundary Please help, I am 1000% stuck on this issue in particular. Using strict asynchronous warnings, how can I make this work without warning? I can convert NetworkManager into a struct, but I prefer to keep it as an actor so that it is Sendable by default.
Posted Last updated
.
Post marked as solved
2 Replies
2.4k Views
Trying to implement a type that conforms to ASWebAuthenticationPresentationContextProviding. This is now causing errors with Xcode 14. With the following implementation:         final class PresentationContextProvider: NSObject, ASWebAuthenticationPresentationContextProviding {             func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor {                 return ASPresentationAnchor()             }         } I get this compilation error: Call to main actor-isolated initializer 'init()' in a synchronous nonisolated context So I can annotate the class or method with @MainActor, but then I get this warning: Main actor-isolated instance method 'presentationAnchor(for:)' cannot be used to satisfy nonisolated protocol requirement Is there a way to fix this?
Posted
by rolson.
Last updated
.