@GRALInfo Thanks for this additional testing.
Using AppStorage (for a simple Bool) was an early design decision as the property isDarkMode is used in many views.
So I could effectively use an environment variable and initialise in .onAppear or in an init().
I'll go this way if the bug is not corrected (I now definitely think it is an Xcode 16 regression).
But falling on such issues in development environment is making me a bit nervous, wondering what else may be broken ?
@VisionPro Thanks for the link.
It is another way of doing it, but that denies the simplicity of AppStorage. If it is not corrected in a future Xcode release, does it mean that AppStorage is on obsolescence path ?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: