There are lots of questions/answers about controlling where to put the 'build' directory when building Xcode projects from the command line, but rather than trying to fight this is there a way to get the path that Xcode is using?
I know it puts the files in ~/Library/Developer/Xcode/DerivedData/APPNAME-xxx/Build/
where xxx is some random-looking string. I want to be able to get this directory from the command line so that I can archive my .app
and .dSYM
files, and also re-sign and package my .app
using xcrun PackageApplication
, which I currently use to create an over-the-air installable version directly form the build-server (hudson).
It should by located in: ~/Library/Developer/Xcode/DerivedData . Save this answer. Show activity on this post. You can configure the output directory using the CONFIGURATION_BUILD_DIR environment variable.
By default projects are saved in User/Documents/xCode.
xcodebuild is a command-line tool that allows you to perform build, query, analyze, test, and archive operations on your Xcode projects and workspaces from the command line. It operates on one or more targets contained in your project, or a scheme contained in your project or workspace.
From command line
xcodebuild -project yourproj.xcodeproj -showBuildSettings | grep TARGET_BUILD_DIR
Remove the grep pipe, to see a list of all build settings, and choose one that is most appropriate for what you are looking for
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With