Separate build directory using xcodebuild

前端 未结 5 2168
情深已故
情深已故 2021-02-07 09:11

The man page for xcodebuild reads:

Run xcodebuild from the directory containing your project (i.e. the directory containing the project

5条回答
  •  别那么骄傲
    2021-02-07 10:07

    In my project, setting SYMROOT turned out to be sufficient to build the project in a different location, leaving other locations untouched.

    From Apple's Xcode Build Setting Reference (which I came across via another answer here, thanks!):

    SYMROOT (Build Products Path)

    Description: Directory path. Identifies the root of the directory hierarchy that contains product files and intermediate build files. Product and build files are placed in subdirectories of this directory.

    ...

    Affects: BUILT_PRODUCTS_DIR, CONFIGURATION_BUILD_DIR (...)

    This setting is also mentioned a few times in the xcodebuild man page:

    Available actions are:

    build: Build the target in the build root (SYMROOT)...

    clean: Remove build products and intermediate files from the build root (SYMROOT)....

提交回复
热议问题