Last Updated: February 25, 2016
·
1.484K
· acoomans

Xcode build from command line (or CI)

if [[ "$sdk" =~ "iphonesimulator" && "$target" =~ "Test" ]] ; then
  settings="$settings TEST_AFTER_BUILD=YES"
fi

xcodebuild \
  -target $target \
  -configuration $config \
  -sdk $sdk \
  -jobs `sysctl hw.ncpu | awk '{print 2*$2}'` \
  -verbose \
  build \
  $settings