December 1, 2012
Check for Unit-Tests in Objective-C
I’ve been adding some Unit Tests to an iOS App lately, which had both Test Host and Bundle Loader set for the Unit-Testing target. Now executing the unit tests caused the iOS App to launch, and the launch itself interfered with my unit-tests (e.g. real network calls which interfere with your mocked network calls).
I needed a way to stop the launch if we are running in a unit testing scenario.
Read more