swift-observation
Observation
What to open
- Use
swift-observation/observation.mdfor full API details and examples. - Search within it for
@Observable,withObservationTracking,ObservationRegistrar,Observations, andObservationIgnored. - Use
swift-observation/observations_pre_iOS_26_backport.mdfor availability notes and backport discussion. - Use
swift-observation/Observation/source files to inspect theObservationsimplementation and any supporting runtime pieces when evaluating backport feasibility.
Workflow
- Prefer
@Observableto make models observable; do not conform toObservablemanually. - Read properties inside
withObservationTrackingto define the dependency set. - Use
ObservationIgnoredfor properties that should not trigger updates. - Use
Observationswhen you need async change streams.
SwiftUI usage
- For SwiftUI, treat
@Observablemodels as the source of truth and let the view read the properties it needs. - Use
withObservationTrackingfor non-SwiftUI rendering or custom observers.
Availability and backport notes
Observationsis available on iOS 26+; plan for fallbacks on earlier OSes.- For pre-iOS 26 support, consider community backports or vendor forks; see
swift-observation/observations_pre_iOS_26_backport.mdfor options and caveats.
More from nonameplum/agent-skills
corebluetooth
Apple Core Bluetooth framework for BLE and Bluetooth Classic. Use for central/peripheral workflows, scanning, connecting, advertising, GATT services/characteristics, read/write/notify, L2CAP, background processing or state restoration, and error handling across Apple platforms.
42swift-composable-architecture
The Composable Architecture (TCA) - A library for building Swift applications with state management, composition, and testability
29swift-dependencies
A dependency management library for Swift with controlled, testable dependencies
26swift-docc
Official Swift DocC documentation markup and syntax reference
23swift-navigation
A collection of tools for making navigation in Swift applications more ergonomic and powerful across SwiftUI, UIKit, and AppKit
22programming-swift-embedded
Provides the complete Embedded Swift documentation for developing on microcontrollers, embedded systems, and baremetal applications.
20