swift-observation
Installation
SKILL.md
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.