StanfordSpezi / Spezi

Open-source framework for rapid development of modern, interoperable digital health applications.
https://swiftpackageindex.com/StanfordSpezi/Spezi/documentation
MIT License
130 stars 10 forks source link

Migrate from the Observable Object Protocol to the Observable Macro #66

Closed PSchmiedmayer closed 8 months ago

PSchmiedmayer commented 1 year ago

Problem

Starting with iOS 17, iPadOS 17, macOS 14, tvOS 17, and watchOS 10, SwiftUI provides support for Observation, a Swift-specific implementation of the observer design pattern. More context is provided in the Migrating from the Observable Object protocol to the Observable macro article. Spezi should be at the forefront of modern development for mobile applications and should therefore use and support Observation.

Solution

Follow the best practices outline in Managing model data in your app- Create connections between your app’s data model and views. and other documentation about the Observation mechanism in Spezi and sub sequentially in the Spezi modules.

Code of Conduct