Usually you don't need Task.detached. To get a background thread simply move the code to a nonisolated async func in the View struct or move it to a struct that is not MainActor.
Topic:
App & System Services
SubTopic:
iCloud
Tags: