skip to Main Content

I’ve recently started to learn swift and iOS development overall, since I’ve always been using GitHub to store my code, I decided to backup my little project there too and as I’ve done so, I found GitHub Actions, which immediately raised my attention, since it seemed like a great automatization, to have all my code tested each time I push a commit. I’ve decided to try the "iOS Starter workflow" offered by GitHub. Soon after however, I encountered an error, which stopped the Action run.

At first, it errored at Set default scheme part of the workflow, which failed at not finding my .xcodeproj file, which I was able to solve by "redoing" my project structure. As relieved as I was when I saw that the workflow succeeded in the part which it errored before, I soon realised that it stopped at the very next stage – Build – with following errors:

xcodebuild: error: Unable to find a destination matching the provided destination specifier: { platform:iOS Simulator, OS:latest, name:iPhone 11 Simulator }

The requested device could not be found because no available devices matched the request.

Ineligible destinations for the "My-Project" scheme:

{ 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.

I’ve then started googling, but was unsuccessful so far, could anyone tell me any information about what the error is saying or why is it happening in GitHub Actions or at the very best, tell me how to resolve the issue?

2

Answers


  1. I would suggest you to forget a "stater workflow" because its actually much more simpler than that.

    Can you run xcodebuild from command line ? If so that is all you need actually. I can run this from command line:

    xcodebuild clean build analyze test -scheme RenetikEvent -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11'
    

    So then github action that I have, I took also that starter I just removed almost everything so:

    name: Xcode - Build Analyze Test
    
    on:
      push:
        branches: [ "master" ]
      pull_request:
        branches: [ "master" ]
    
    jobs:
      build:
        name: Build and analyze and test using xcodebuild command
        runs-on: macos-latest
    
        steps:
          - name: Checkout
            uses: actions/checkout@v3
          - name: Build
            run: |
              xcodebuild clean build analyze test -scheme RenetikEvent -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' 
    
    Login or Signup to reply.
  2. Schemes are some type of xCode build configurations .. you can list them and you can run them that is important and this xcodebuild requires that scheme that you want to build of course .. My-Project is your scheme appearently and you can chack others by xcodebuild — list command.

    I would have to see what complete output gives you Github action for:

    xcodebuild clean build -scheme My-Project -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11'
    

    You can see here working github action: https://github.com/renetik/renetik-ios-layout/blob/master/.github/workflows/build_analyze.yml
    I have bunch of projects working like that.

    If this will not work there has to be some configuration error with what you are actually building.. In my case its quite simple I am just building swift package manager libraries so there is not project or something to be messed up so it can be that you are building some project that has some configuration that is somehow incompatible with GitHub Xcode installation that is trying to build it.

    If I am you I will try go opposite way around, create another project make working GitHub action like I have shown, for that and then add back things until you get it full or you find a problem or it will disappear 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search