Xcode 12 Beta 4 Released

The Xcode 12 Beta 4 image has just been released and can be selected as follows:

    xcode: 12.0.0

Xcode 12 Beta Status

Since Xcode 12 beta 3, Apple has “merged” Xcode 12 and Xcode 12 for Universal Apps into a single release.

Users who were selecting Xcode 12 for Universal Apps with the 12.0.0-UA image identifier will be automatically redirected to the new Xcode 12 beta 3 image (12.0.0).

As a result of Xcode now being a Universal App, and including the Apple Silicon tooling, the resulting size of Xcode itself has grown, meaning there is around 6GB less free space on the new Xcode 12 images.

We are now shipping Cocoapods 1.10 beta as the default Cocoapods version. Cocoapods 1.9 has some incompatibility issues with Xcode 12, whereas 1.10 has much better Xcode 12 support.

Additionally, the underlying macOS version has been bumped up to 10.15.5 from 10.15.4.

CircleCI Xcode Beta Support Policy

For information on what CircleCI Support can, and can’t, help you with via support tickets, please see the following article: What is CircleCI’s Xcode Beta Image Support Policy?

We would encourage the the use of the beta image announcement threads to discuss any issues you may encounter with Apple’s beta software releases.

Major Software Changes from 11.x series

We will no longer be shipping Python 2 in our images due to it hitting EOL status and causing issues during installation as it is no longer maintained by Homebrew. If you require Python 2, we would suggest moving to a previous Xcode image, or creating your own tap for the Python 2 package.

We have bumped OpenJDK to version 11 (LTS) from OpenJDK 8 due to the latter being deprecated.

Image Info

Xcode 12.0 Build version 12A8179i is installed at /Applications/Xcode-12.beta.4.app

The following runtimes are installed:

  • iOS 13.5
  • iOS 14.0
  • tvOS 13.4
  • tvOS 14.0
  • watchOS 6.2
  • watchOS 7.0

The full manifest of installed software can be found here.

Hi @bytesguy :wave:

I’m facing an issue with Beta 4 (same issue in Beta 3) where I’m unable to install gems with native extensions.
I’m using Ruby 2.6.3 . Was wondering if this was something you are aware of or is there something I can do to solve this.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20200806-859-ak50ao.rb extconf.rb
creating Makefile

current directory:
make "DESTDIR=" clean

current directory:
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from
fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
note: did not find header 'config.h' in framework 'ruby' (loaded from
1 error generated.
make: *** [generator.o] Error 1

make failed, exit code 2

@bboyle18 Hey! :wave: So I have been seeing issues like this regarding gems with native extensions since Beta 3 and it also happens locally. I believe there have been some changes to Clang which are causing it - most likely to do with making Xcode & Command Line Tools universal to support Apple Silicon.

We actually faced some similar issues when trying to build the image, where using the beta Command Line Tools caused native extension gems to fail - the workaround for this was to build everything with the 11.6 Command Line Tools.

Using a different Ruby version (such as 2.6.6 which is bundled in the image) may help. The system Ruby is problematic at the best of times!

If you want to downgrade the Command Line Tools in the image to see if this helps, you could use my fork of xcode-install to automate this (though I believe this also relies on a gem that requires native extensions): https://github.com/xcpretty/xcode-install/pull/378

Thanks @bytesguy
I’ve switched to using chruby 2.6.6 and it seems get get passed this.
However, using the chruby 2.6.6 command doesn’t seem to set my ruby version globally in my container.
I have my gemfile and .ruby-version set as 2.6.6 as well but on commands further along in my circle.yml file it seems to be picking up the system ruby of 2.6.3.

Screenshot 2020-08-06 at 16.11.43

Do you have any best practices for using chruby? I’ve looked on the circleCI help/forums but there doesn’t seem to be any examples.



Great news :slight_smile:

So you will need to set this as per: https://circleci.com/docs/2.0/testing-ios/#images-using-macos-1015-xcode-112-and-later

  name: Set Ruby Version
  command: echo 'chruby ruby-2.6' >> ~/.bash_profile

Basically a new shell is used for each step of the job, so this is why chruby won’t stick unless you add it to the bash profile - otherwise it just gets set for the duration of that shell being active.

Hope that helps!

1 Like

That makes sense. Cheers!

1 Like

@bytesguy I think you might have seen this issue from me iOS Fastlane build fails on bundle install `digest-crc` dependency on Xcode 12 beta 3 image

Where exactly should I put

  name: Set Ruby Version
  command: echo 'chruby ruby-2.6' >> ~/.bash_profile

in my config.yml file?

Should it be run as a command? Or can I just add it on the top of the file?

Hi @iur-kaia!

It should be an additional run step added to your job, usually towards the start of the job run process. As an example, something like this:

      xcode: 11.6.0
      - checkout
      - run:
          name: Set Ruby Version
          command: echo 'chruby ruby-2.6' >> ~/.bash_profile
      - run: bundle install
1 Like

@nbialostosky thanks a lot. That seems to work.

Also for others: setting ruby version to 2.7 seems to resolve the issue for gems with native extensions. At least it solved the issue for me with digest-crc.


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