Created
February 21, 2022 18:25
-
-
Save mitnick78/57319636d0dc5ad00f2b8c79a71b6469 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct TchatAppApp: App { | |
@Environment(\.scenePhase) var scenePhase | |
var body: some Scene { | |
WindowGroup { | |
ContentView(authVM: AuthViewModel()) | |
.onChange(of: scenePhase) { scenePhase in | |
if scenePhase == .background { | |
print("background") | |
// mettre l'user offline | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment