SwiftUI App State
Amit Ranjan ?
CEO, Evangelist Apps | Creating seamless app experiences | Build AI apps | Vision Pro | AR | The Climate App | Tech Enthusiast
When we create a new App in Swift UI, Xcode generates two template files for us:
Unlike UIKit Template, where we get App state change methods by default, in SwiftUI we don’t have such methods.
But there is a way to track App State changes:
2. Add an onChange modifier for scenePhase and switch over ScenePhase types to handle states accordingly
Please share your thoughts and suggestions on this article.