Last active
April 2, 2023 18:46
-
-
Save LukeSmith16/4fbc95fb0996294f52a8ac02111edf41 to your computer and use it in GitHub Desktop.
Register a custom UITestConnectionManager in our app if we are running a testing environment
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
@main | |
struct MyApp: App { | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
.onAppear { | |
#if DEBUG | |
guard ProcessInfo.isRunningUITests else { return } | |
UITestConnectionManager.register() | |
#endif | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment