Build uses xCode 7 no matter what

Hello,
I am facing an issue on the xcode build implementation.

Every time I build I have this error showing up:

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

I also realise that my container is always using xCode 7.0:

sudo xcode-select --switch /Applications/Xcode-7.0.app && xcodebuild -version
Xcode 7.0
Build version 7A220

Here is my config.yml file:

# .circleci/config.yml
version: 2
jobs:
  build:
    docker:
      - image: circleci/ruby:2.4.1
    macos:
      xcode: "9.2.0"
    environment:
      FL_OUTPUT_DIR: output
    shell: /bin/bash --login -o pipefail
    steps:
      - checkout
      - run: bundle install
      - run:
          name: Fastlane
          command: bundle exec fastlane scan
          environment:
            SCAN_DEVICE: iPhone 6
            SCAN_SCHEME: Heer 2

No matter what I put in SCAN_DEVICE it will always try to use iPhone 6.

I also connected to the container with ssh. And going into /Applications/ I realised Xcode9.2 wasn’t installed

I am not sure at this point if xcodebuild can’t find the simulator because of the Xcode version or not but I think I would have a better idea if the used Xcode version would be 9.2 as expected.

Does anyone have an idea of what the problem could be?

Thanks

Please remove docker and try using just macos in your config. Let us know if you are still facing issues. Thanks!

I just tested with this config.yml instead:

# .circleci/config.yml
version: 2
jobs:
  build:
    macos:
      xcode: "9.2.0"
    environment:
      FL_OUTPUT_DIR: output
    shell: /bin/bash --login -o pipefail
    steps:
      - checkout
      - run: bundle install
      - run:
          name: Fastlane
          command: bundle exec fastlane scan
          environment:
            SCAN_DEVICE: iPhone 8
            SCAN_SCHEME: Heer 2

And it still have the same issue.

1 Like

I am facing the same issue, Please help

My config file.

version: 2
jobs:
  build-and-test:
    macos:
      xcode: "9.0"
    working_directory: /Users/distiller/project
    environment:
      FL_OUTPUT_DIR: output
      FASTLANE_LANE: test
    shell: /bin/bash --login -o pipefail
    steps:
      - checkout
      - run: bundle install
      - run:
          name: Fastlane
          command: bundle exec fastlane $FASTLANE_LANE
	   environment:
            SCAN_DEVICE: iPhone 6
            SCAN_SCHEME: CircleCIPOC
      - store_artifacts:
          path: output
      - store_test_results:
          path: output/scan

  alpha:
    macos:
      xcode: "9.0"
    working_directory: /Users/distiller/project
    environment:
      FL_OUTPUT_DIR: output
      FASTLANE_LANE: alpha
    shell: /bin/bash --login -o pipefail
    steps:
      - checkout
      - run: bundle install
      - run:
          name: Fastlane
          command: bundle exec fastlane $FASTLANE_LANE
      - store_artifacts:
          path: output/CircleCIPOC.ipa

  beta:
    macos:
      xcode: "9.0"
    working_directory: /Users/distiller/project
    environment:
      FL_OUTPUT_DIR: output
      FASTLANE_LANE: beta
    shell: /bin/bash --login -o pipefail
    steps:
      - checkout
      - run: bundle install
      - run:
          name: Fastlane
          command: bundle exec fastlane $FASTLANE_LANE
      - store_artifacts:
          path: output/CircleCIPOC.ipa

workflows:
  version: 2
  workflow:
    jobs:
       	- alpha:
        - beta:

1 Like

Can you check now ?

OK, great. So your build error is:

Unable to find a destination matching the provided destination specifier

So, it’s a popular error! Research time… :smile_cat:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.