I am trying to run tests for my Swift package (defined by Package.swift) by using xcodebuild:
xcodebuild -scheme "package-name-Package" -configuration "Debug" -sdk "iphonesimulator14.5" -arch "x86_64" test`
Unfortunately, I keep getting this error:
xcodebuild: error: Failed to build workspace package-name with scheme package-name-Package.
Reason: Cannot test target “Target1Tests” on “Any iOS Simulator Device”: Tests must be run on a concrete device
Cannot test target “Target2Tests” on “Any iOS Simulator Device”: Tests must be run on a concrete device
Cannot test target “Target3Tests” on “Any iOS Simulator Device”: Tests must be run on a concrete device
I'm not sure what -sdk to use. I've read the output of xcodebuild -showsdks and chosen appropriately (I need to build/ test for iOS). I've tried iphoneos iphonesimulator, iphoneos15.0, iphonesimulator15.0, iphonesimulator14.5, iphoneos14.5 as the sdk. (both Xcode 12 and Xcode 13 beta, by using xcode-select)