ObservableObject is the Combine-era state-management protocol from iOS 13. @Observable is the Swift 5.9 macro that replaces it with finer-grained observation and zero boilerplate.
| Feature | @Observable (Swift macro) | ObservableObject |
|---|---|---|
| iOS minimum | iOS 17+ | iOS 13+ |
| Boilerplate | Near zero | @Published on every property |
| Observation granularity | Per-property | Whole-object |
| View update performance | Better (fewer redraws) | Coarser |
| Combine integration | Less native | Native |
@Observable for any new app targeting iOS 17+. Stay on ObservableObject only if you need iOS 16 support.
Yes — @Observable and ObservableObject can coexist in the same project. Migrate view by view.
Largely, yes. Use @State for @Observable instances; @StateObject is only for ObservableObject conformers.