iOS Swift project - error: unable to execute command: Segmentation fault: 11

Error:

...
<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
** ARCHIVE FAILED **


The following build commands failed:
	CompileSwift normal arm64
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
...

If you get Segmentation fault: 11 during the compilation of your Xcode project that means the compiler crashed.

The most common cause of this issue is if your project is written in Swift, and you try to compile the project with an Xcode version which is not compatible with that Swift version.

Please make sure that you set the same Xcode version on bitrise.io as the one you use on your Mac during development!

Where to set/change the Xcode version on bitrise.io?

  1. Open your app on bitrise.io
  2. Go to the Settings tab
  3. Scroll to the Stack Selector section
  4. Select the stack with the same Xcode version you use locally