Some background:
I have iOS application with a target configured to run unitTests. And I am running build automation tool jenkins on my MacBook whic
A osx test target can become a huge hassle because you have to manage yourself which source file to include. Putting @testable import YourAppName on top of your XCTest files is way more convenient. So just prevent your app from launching in case of a XCTest run.
In your AppDelegate put: (Swift 3 solution)
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
{
if ProcessInfo.processInfo.environment["XCInjectBundleInto"] != nil {
return false
}
...
This wont prevent the simulator from launching, but will save you a lot of time.