Pretty sure my tests were running fine before I updated from Xcode 10.3 to Xcode 11. Now when I try to run a test I get the following error.
The run destination iPhone 5s is not valid for tests you have chosen to perform. Please select a run destination which supports the tests that you wish to perform.
As an experiment, I tried creating a brand new test target and running the example tests that it gives you and the error is the same. I've also tried with different simulators.
Check your Targets: (test Target) -> Build Settings -> Deployment -> iOS
Deployment Target: select a lower iOS version eg: iOS 10.0
This will be solving your problem.
For me, my Targeted Device Family in the Build Settings for my test target, was iPad-only, whereas the Targeted Device Family was Universal for the app target.
I had to change the Targeted Device Family to Universal for my test target to match the Targeted Device Family for the app.
It was:
I had to change to:
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