Managing scenes in SwiftUI

On Apple platforms, a scene represents a part of an app's user interface, with a life cycle managed by the system. A single app may consist of multiple scenes, all of which can be running concurrently. With SwiftUI, we can use primitive scenes it provides, such as WindowGroup, together with custom scenes we create based on the Scene protocol. In this post, Majid Jabrayilov shows us how we can create custom scenes in SwiftUI, and how we can respond to app life cycle events.