Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

GitHub Actions running iOS app using xcodebuild

Hi Everyone 👋

 

I’m trying to run iOS tests using xcodebuild on macOS-10.14. But for some reason all I can get is error like this:

 

xcodebuild: error: Unable to find a destination matching the provided destination specifier:

{ platform:iOS Simulator, OS:latest, name:iPhone X }

 

My workflow is defined here https://github.com/mikina/TodoSampleApp/blob/master/.github/workflows/test.yml

 

I’ve tried a lot of different destination settings, all of them ends up with this error.

 

I got list of devices by running:

 

xcrun instruments -s devices

 

Results here: https://github.com/mikina/TodoSampleApp/commit/7bead23b21eea9e27c093b8d1b9657a9dd90d570/checks

 

Xcode version: Xcode 10.2.1 https://github.com/mikina/TodoSampleApp/commit/12bd22aa9b1288470c3d99d19286f7798c6f3ac9/checks

 

I also checked xcrun simctl list

Results here: https://github.com/mikina/TodoSampleApp/commit/89b06dfa944b8f59892cdaadfdf7ea08c3edb528/checks

 

Anyone tried and succeeded running tests for iOS app on GitHub actions?

2 Replies
GitHub Staff
Message 2 of 3

Re: GitHub Actions running iOS app using xcodebuild

This works for me:

 

 - name: Test
      run: |
        xcodebuild test -project Proj.xcodeproj -scheme ProjTests -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6,OS=12.2"

What I haven't done is a proper build, which will be trickier thanks to provisioning profiles and distribution certificates.  (Isn't that always the way?)

Copilot Lvl 2
Message 3 of 3

Re: GitHub Actions running iOS app using xcodebuild

Thanks for the help. Unfortunately it’s not working for me, even with the same destination values and same parameters as yours.