Xcodebuild'ing a workspace and setting a custom build path

后端 未结 3 434
醉话见心
醉话见心 2020-12-28 12:58

I\'m trying to use xcodebuild to build a multi-project project in a workspace. When XCode builds a workspace it automatically places all build artifacts in a co

3条回答
  •  心在旅途
    2020-12-28 13:15

    The best solution i have found so far is to use the CONFIGURATION_BUILD_DIR parameter with an ABSOLUTE path (e.g. /tmp/$PROJECT/build). Like this:

    xcodebuild -scheme "scheme" -configuration Debug -sdk iphoneos clean build CONFIGURATION_BUILD_DIR=$ABSOLUTE_BUILD_PATH
    

    I use Jenkins and there I have an variable named $WORKSPACE. With $WORKSPACE/build as my CONFIGURATION_BUILD_DIR I have a solution I'm happy with.

    The relative paths don't seem to work as expected. We should file a bug report.

提交回复
热议问题