The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Revised by Bytes Unlimited : June 14th 2017
NSSetUncaughtExceptionHandler { print("🧨", $0) } | |
let isUITesting = /* your UI test detection here */ | |
let isUnitTesting = NSClassFromString("XCTest") != nil | |
let noTests = !isUnitTesting && !isUITesting | |
let delegate = isUITesting | |
? NSStringFromClass(UITestAppDelegate.self) | |
: noTests ? NSStringFromClass(AppDelegate.self) | |
: nil |