Join us for Ask Apple, a new series for developers to connect directly with Apple experts. Ask about integrating the latest technologies into your apps, designing intuitive UIs, testing on the latest software, and so much more.
If you call SwiftUI’s task modifier inside a view’s body property, the async operation will run on the main actor. However, this isn’t the case if you call task from a helper property or function that isn’t main-actor-annotated. Why?