I am new to coding and GitHub. I keep getting the below error with GitHub – I’ve just set up the project. I’ve checked my scheme and that’s aligned. I’ve also deployed the sim locally so it’s running fine in both Xcode and from the CLI. I’ve tried every combination of iPhone/OS variations per LLM suggestions. Note I am running Xcode 16.2 locally; however, Github runner is 16.1 or less. My .yml is reflecting 16.1.
name: iOS CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
build-and-test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.1'
- name: Build and Test
run: |
xcodebuild clean test
-scheme "Declutter"
-destination "platform=iOS Simulator,name=iPhone 14,OS=17.0"
-configuration Debug
CODE_SIGN_IDENTITY=""
CODE_SIGNING_REQUIRED=NO
CODE_SIGNING_ALLOWED=NO
- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results
path: ~/Library/Developer/Xcode/DerivedData/**/Logs/Test/*.xcresult
Error:
Run xcodebuild clean test
Command line invocation:
/Applications/Xcode_16.1.app/Contents/Developer/usr/bin/xcodebuild clean test -scheme Declutter -destination "platform=iOS Simulator,name=iPhone 14,OS=17.0" -configuration Debug CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
CODE_SIGN_IDENTITY =
CODE_SIGNING_ALLOWED = NO
CODE_SIGNING_REQUIRED = NO
2024-12-16 03:21:12.953 xcodebuild[1730:10807] Writing error result bundle to /var/folders/3s/b36dp_4s3wv3byw057j8bp940000gn/T/ResultBundle_2024-16-12_03-21-0012.xcresult
xcodebuild: error: Unable to find a device matching the provided destination specifier:
{ platform:iOS Simulator, OS:17.0, name:iPhone 14 }
The requested device could not be found because no available devices matched the request.
Available destinations for the "Declutter" scheme:
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:0000FE00-2C1CC63AF02D8E46, name:My Mac }
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
Error: Process completed with exit code 70.
Jordan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I couldn’t get my Xcode to run a prior version of iOS despite being able to download 18.1. Once I rolled back to 16.1 and was running iOS 18.1, I was able to successfully run the CI. 18.2 just came out so clearly it was just a version issue.
Jordan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.