-
-
Save LutherBaker/086e561a1f2e6eff6946321ac39a7f9a to your computer and use it in GitHub Desktop.
simple main.swift to prevent running apps during unit testing
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
import UIKit | |
private func delegateClassName() -> String? { | |
guard NSClassFromString("XCTestCase") == nil else { return nil } | |
return NSStringFromClass(AppDelegate) | |
} | |
UIApplicationMain(Process.argc, Process.unsafeArgv, nil, delegateClassName()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment