Возникла проблема при сборке для выпуска Apple Watch любой платформы Apple с xcodebuild
из командной строки с Xcode 10.2 и Swift 5.
$ xcodebuild -scheme MyApp-watchOS -configuration Release -destination 'OS=latest,name=Apple Watch Series 2 - 38mm' build analyze
[...]
error: Bus error: 10
<unknown>:0: error: unable to execute command: Bus error: 10
<unknown>:0: error: compile command failed due to signal 10 (use -v to see invocation)
[...]
The following build commands failed:
CompileSwift normal i386
CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
(2 failures)
Я пробовалс разными симуляторами, но ошибка сохраняется, как для команд build
, так и analyze
.
Сборка из XCode работает нормально в модели отладки, но не работает в режиме выпуска.
CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler (in target: MyApp-watchOS)
[...]
<unknown>:0: error: unable to execute command: Illegal instruction: 4
<unknown>:0: error: compile command failed due to signal 4 (use -v to see invocation)
и
CompileSwift normal i386 (in target: MyApp-watchOS)
[...]
error: Illegal instruction: 4
Очистка DerivedData в этом случае не помогла.