ScenePhase Environment Variable in SwiftUI
SwiftUI app moves from various phases of lifecycle and knowing about those phases can be helpful to make important decisions.
ScenePhase enum gives us access to three important phases of app lifecycle,
We can access
Environment variable and observe the change in scene to act accordingly.