I’ve just open-sourced SBSObservation. It reimplements Apple’s Observation framework and backports it to iOS 12 with similar internals and a more ergonomic API.

The code is for inspiration and learning, provided as-is with no guarantees.

https://github.com/simonbs/SBSObservation

GitHub - simonbs/SBSObservation: Tiny observation framework designed for UIKit-based apps and built with Swift macros. It automatically handles the deallocation of observations and supports iOS 12 and newer.

Tiny observation framework designed for UIKit-based apps and built with Swift macros. It automatically handles the deallocation of observations and supports iOS 12 and newer. - simonbs/SBSObservation

GitHub
@simonbs nice! How does it compare to https://github.com/pointfreeco/swift-perception ? Any reason to use SBSObservation instead of Perception?
GitHub - pointfreeco/swift-perception: Observable tools, backported.

Observable tools, backported. Contribute to pointfreeco/swift-perception development by creating an account on GitHub.

GitHub
@darrarski No clue. My framework predates theirs so I haven't looked at it.