Question

Issues between xcodebuild and Jenkins prompted me to try xcodebuild on a vanilla Empty Application template where it still fails:

>> xcodebuild -target FizzBuzz -sdk iphonesimulator7.0 -arch i386
The following build commands failed:
ProcessPCH /var/folders/64/<someHash>/C/com.apple.DeveloperTools/5.0-5A1413/\
Xcode/SharedPrecompiledHeaders/FizzBuzz-Prefix-<someHash>/FizzBuzz-Prefix.pch.pch
FizzBuzz/FizzBuzz-Prefix.pch 
normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

>> xcodebuild -version
Xcode 5.0
Build version 5A1413

What is the proper incantation of xcodebuild?

Was it helpful?

Solution

These 3 were the key issues for me:

  1. xcodebuild was still relying on gcc-4.7 (Command Line Tools installed or not). Check $CC and unset $CC to let clang do its job.
  2. Use the -scheme option with xcodebuild ...
  3. ... and ONLY_ACTIVE_ARCH=NO.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top