Xcode DerivedData Command Line Option

I know a way to change location DerivedDatausing Xcode (Preferences-> Locations-> DerivedData ..).

However, the Mac I'm trying to build is in a remote location with only ssh access. I want to create a specific project in which I want to keep the location of DerivedData relative to the project.

Whenever I create a project using xcodebuild, the files are eventually generated under /Users/builduser/Library/Developer/Xcode/DerivedData, but I want them to be under "$ PROJECT / target / DerivedData"

What is the command line equivalent to changing the location settings of DerivedData, how is this done through Xcode?

+4
source share
1 answer

The value of the DerivedData Xcode UI parameter is passed in xcodebuildwith an argument -derivedDataPath. From man xcodebuild:

-derivedDataPath path
   Overrides the folder that should be used for derived data when performing a build action on a scheme in a workspace.

While it is unclear what your goal is in changing the DerivedData path, you should be aware that there are some additional parameters that you can configure in your application assembly configuration to influence the deployment of the final assembly. One of the phases of the assembly is the phase installthat can move the final artifact to another location. The parameters that control this behavior can be found in the Deployment assembly settings group. See DSTROOT, INSTALL_PATHand DEPLOYMENT_LOCATIONfor additional options that may be useful for reorganizing where your products will be deployed.

+3
source

Source: https://habr.com/ru/post/1611001/


All Articles