OS X build image update: Xcode 8.2.1

In the next few days we will roll out the new OS X build image. The update replaces Xcode 8.2 beta with the release version, Xcode 8.2.1.

Once we fully release the image (we will announce this separately), you will be able to select Xcode 8.2.1 in your build by adding the following to your circle.yml:

machine:
  xcode:
    version: 8.2

In this iteration we have also fixed the issue where chruby was not selecting the correct Ruby version during the build. The Ruby environment now works as expected.

Using simulator names in your circle.yml instead of UUIDs

We currently advise against hard-coding simulator UUIDs in your circle.yml, as using specific UUIDs can lead to failing builds on image updates.

Instead, we suggest that you use simulator names in your circle.yml. Simulator names can be used with a raw xcodebuild command. For example, an xcodebuild command for using iPhone 7 simulator with iOS 10.1 would look like this:

test:
  override:
    - set -o pipefail &&
      xcodebuild
        CODE_SIGNING_REQUIRED=NO
        CODE_SIGN_IDENTITY=
        PROVISIONING_PROFILE=
        -sdk iphonesimulator
        -destination 'platform=iOS Simulator,OS=10.1,name=iPhone 7'
        -workspace MyWorkspace.xcworkspace
        -scheme "My Scheme"
        clean build test |
      tee $CIRCLE_ARTIFACTS/xcode_raw.log |
      xcpretty --color --report junit --output $CIRCLE_TEST_REPORTS/xcode/results.xml

Some tools like scan only allow you to specify a device by name.

scan --scheme SchemeName --device "iPhone 7 (10.1)"

If you were using the UUID to pre-start the simulator before running the tests, it can be done using the simulator name as well:

dependencies:
  pre:
    # pre-start the simulator
    - xcrun instruments -w "iPhone 7 (10.1)" || true

Update Jan 13 2017:
We have replaced the list of updated iOS 10.2 simulator UUIDs with the notice suggesting using simulator names in circle.yml instead of UUIDs.

Update Jan 18 2017:
On Jan 13 we released Xcode 8.2 and not 8.2.1 to production—right now Xcode 8.2.1 is out on all production machines. The post has been updated to reflect this change. Thank you for your understanding.

6 Likes

I see that you guys updated the container image this evening, however the version of Xcode that is installed is 8.2 (8C38) rather than 8.2.1 (8C1002). The details in this post, as well as the announcement email, state that the version should be 8.2.1, so is there another container update coming shortly after this one?

1 Like

Hi there, thanks a lot for raising this. The added version of Xcode is indeed 8.2 (8C38) and not 8.2.1 as we said previously.

We decided to split the update into two iterations and haven’t updated the post accordingly. Thank you for your patience with this. We will update the post now and follow up with more details once Xcode 8.2.1 is present in the production image.

2 Likes

Any update on this? We were expecting it a while ago and our workflow is blocked while we wait for the new Xcode version

Thanks for your patience. I’m one of the support engineers here.

We’re wrapping up testing and should have it deployed today or tomorrow.

1 Like

Xcode 8.2.1 is now out on all machines in production. Specifying

machine:
  xcode:
    version: 8.2

will automatically choose Xcode 8.2.1 for your build—so no need to add the minor version.

Thank you for your patience once again. Please let us know if you have any questions.

3 Likes

Thank you for your support.

I think it would be great if you follow xcode release much faster.
For our case, that’s the only concerns about CircleCI.

I’m not seeing errors yet on 8.2.1. This is a huge improvement!

Note: To pre-start the 10.2 simulator I needed to add " [" to the end of the device name

dependencies:
  pre:
    - xcrun instruments -w "iPhone 7 (10.2) [" || true

If I don’t add it I get the following error:

$ xcrun instruments -w "iPhone 7 Plus (10.2)" || true
Instruments Usage Error: Ambiguous device name/identifier 'iPhone 7 Plus (10.2)':
iPhone 7 Plus (10.2) [7514CD81-9BA9-4FE7-9A3E-6C8058C50ABA]
iPhone 7 Plus (10.2) + Apple Watch Series 2 - 42mm (3.1) [163C9F48-2C4E-46AF-950C-FAA89705048E]
7 Likes

@alexey @tadwhitaker The ambiguous device name fix should really be added to the documentation.

1 Like