Xcodebuild’ing a workspace and setting a custom build path

I’m not sure if this is a new option but the 5.0 release of xcodebuild has an option -derivedDataPath which allows you to specify the directory you’d like all the build products to sit in.

For instance, passing -derivedDataPath build creates the folder build relative to where you ran xcodebuild from, and you can find your app predictably in a subfolder like build/Build/Products/Release-iphoneos.

Documentation: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html

Leave a Comment