Post

check ProcessInfo.processInfo.environment['XCTestConfigurationFilePath']. if it's not nil, you're in a test run. skip setup. works cleanly for SwiftUI @main apps.