When doing iOS app development, most unit test suites are fine to run on the simulator. I found myself in the situation on a current project of mine that the app I’m developing uses libraries where it can’t run on a simulator.
The problem was that on app launch, in the app delegate, there are references to these libraries and the app then crashes. No unit tests get run.
I didn’t want to start littering if else statements in my AppDelegate.
I found the easiest thing to do was add a whole new AppDelegate. I called mine SpecAppDelegate
And then use this in your main.m when you’re launching the app for unit tests.