Last active
July 31, 2017 22:31
-
-
Save JARinteractive/860a12253e8a26d94129 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