Cursor Rules for Swift (iOS/macOS): The Complete Guide to AI-Assisted Swift Development Swift is the language where you can ship a SwiftUI screen in an afternoon and a memory-cycle-leaking, main-thread-blocking, @Published-tangled production crash by the end of the sprint. The first regression is almost always concurrency: a Task { await fetch() } kicked off from a SwiftUI view's .onAppear , captured in a closure that strong-references self , mutating a @Published property from a background context because someone forgot to annotate the view model @MainActor , and Xcode's purple runtime warnings ignored until a user report comes in. The second is @StateObject vs @ObservedObject chosen at random: the AI creates @ObservedObject let vm = ViewModel() inside the view body, a new view model is instantiated on every SwiftUI re-render, subscriptions reset, and the screen "randomly refetches." The third is a URLSession call that decodes Data with try!β¦