Unable To Run Unit Tests in Xcode 11: The run destination * is not valid for tests you have chosen to perform

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:

enter image description here

I had to change to:

enter image description here


If you create a new project using Xcode 11 (Mine was Xcode 11.2.1), the default iOS deployment target is set to iOS 13. This prevents you from running the application on iOS devices lower than 13 and requires you to modify the deployment target (say to iOS 12 in order to support these devices).

The above changes can be done by clicking on the project -> Target -> "APP TARGET" -> General. However, the unit test target also has a iOS Deployment target which is not shown in the General tab. This can be seen in the Build Settings (project -> Target -> "UNIT TEST TARGET" -> Build Settings and type in "Deployment Target" in the search box). See answer by @Chris Livdahl. This must also be changed (ideally to the same target version as the app) in order to fix the problem.