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

ios
circle.yml

#1

I set circle.yml like below:

      - run:
          name: "environment information"
          command: |
              xcrun simctl list devices

      - run:
          name: Build and run tests
          command: |
            sudo gem install fastlane
            export LC_ALL=en_US.UTF-8
            export LANG=en_US.UTF-8
            fastlane scan
          environment:
            SCAN_DEVICE: iPhone 5 (10.3.1)
            SCAN_SCHEME: SampleApp
            SCAN_DERIVED_DATA_PATH: $(pwd)/DerivedData

and fail with logs like below:

== Devices ==
-- iOS 10.3 --
    iPhone 5 (8F2C2658-0F4D-4A82-98BF-11A2D550EA3D) (Shutdown)

... ... ...

[05:20:29]: ▸ Loading...
[05:20:30]: ▸ xcodebuild: error: Unable to find a destination matching the provided destination specifier:
[05:20:30]: ▸ { platform:iOS Simulator, id:8F2C2658-0F4D-4A82-98BF-11A2D550EA3D }
[05:20:30]: ▸ Ineligible destinations for the "SampleApp" scheme:
[05:20:30]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[05:20:30]: ▸ { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:iOS Simulator, id:8F2C2658-0F4D-4A82-98BF-11A2D550EA3D }

I’m sure that 8F2C2658-0F4D-4A82-98BF-11A2D550EA3D is in CircleCI’s environment, but it can’t load 8F2C2658-0F4D-4A82-98BF-11A2D550EA3D .
Why???


#2