We were running into issues trying to add a test target to a project we inherited. The test target was working, however Running the app would always fail due to an error in the test target. We were puzzled by this and eventually found a boolean setting in the scheme that was on by default:
In the image, I unchecked it, but the test target for Run had a checkmark in it. Removing the checkmark made everything work again.
Why would Apple want Running your application to build your tests also? This makes us think there might be consequences we should be aware of.
The problem, judging by your screen shot, is that this scheme uses the QA configuration for the Run action, whereas it uses the Debug configuration for the Test action. Thus, things work one way when you do a Test build and a different way when you do a Run build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With