In addition, we should use the new Preview macro as introduced with Xcode 15/Swift 5.9.
Additional context
This issue requires a mechanism as described in https://github.com/StanfordSpezi/Spezi/issues/63 to make the injection of modules easy when working with Xcode previews.
Feel free to discuss the implications and ideas for APIs in the StanfordSpezi/Spezi repository and help us to address this issue.
Problem
Currently some views in the template application crash due to missing environment objects and some views do not provide any previews for the views.
Solution
Add the corresponding environment objects to the views and children by using a mechanism like proposed in https://github.com/StanfordSpezi/Spezi/issues/63.
In addition, we should use the new Preview macro as introduced with Xcode 15/Swift 5.9.
Additional context
This issue requires a mechanism as described in https://github.com/StanfordSpezi/Spezi/issues/63 to make the injection of modules easy when working with Xcode previews. Feel free to discuss the implications and ideas for APIs in the StanfordSpezi/Spezi repository and help us to address this issue.
We would encourage anyone who wants to address this PR to first watch the WWDC23 - Build programmatic UI with Xcode Previews session to learn more about previews and the new macros.
Code of Conduct