I created a sample project (having a simple unit test case) to test on CircleCI. Hosted the project on github and linked the github with my circleci, created the config.yml file also, but getting this error:
xcodebuild: error: Failed to build project CircleCISampleProject with scheme CircleCISampleProject.: Cannot test target “CircleCISampleProjectTests” on “Any iOS Device”: Tests must be run on a concrete device
Config.yml:
version: 2.1
jobs:
build:
macos:
xcode: "15.2.0"
steps:
- checkout
# Install dependencies if needed
# - run:
# name: Install Dependencies
# command: |
# # Your dependency installation commands go here
- run:
name: Build and Test
command: |
xcodebuild clean test -project CircleCISampleProject.xcodeproj -scheme CircleCISampleProject -destination 'platform=iOS Simulator,OS=17.0.1,name=iPhone 15 Pro' CODE_SIGNING_REQUIRED=NO
workflows:
version: 2
build:
jobs:
- build
Please suggest me some fix to resolve it.
It looks like a mismatch between the xcode 15.2.0 image you use and the simulator you are trying to run on. This image seems to have simulators running iOS 17.2. Check the list of installed software here