Michael Long
Jan 20, 2025

--

All the ambiguity comes from Apple's language on the matter, which states that one should use ObservedObject "if the object is passed in from the outside."

When it should say, ""if the object is passed in from the outside and if the caller owns (holds a strong reference to) the object."

Passing as a parameter isn't ownership.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet