“Expand Macro” stays gray even though I’ve seen the @Observable
macro expanding earlier.
However when I manually trigger build error it does expand the location of the error. In this case I target macOS 13.5 that doesn't support ObservationRegistrar
.
I tried to restart Xcode, try different macros, different projects and types of projects.
I believe you are missing
import Observation
at the top of your fileI ran into the same issue as it is not so straight forward that all the
@Observable
macros "work" in code, they just cant be expanded without importing first. Seems like the compiler does not require the import, just Xcode.