28

Is there a way to determine from the command line what the location of your derived data folder is after building with xcodebuild?

For example, after running xcodebuild:

xcodebuild -project projectname -target targetname

I want to be able to find out which folder the app is in. I would like to do this without changing the output path with CONFIGURATION_BUILD_DIR or within the project settings.

Any ideas?

1 Answer 1

47
xcodebuild -project myapp.xcodeproj -showBuildSettings

prints all build settings and values, in particular the folder where the app is build:

BUILT_PRODUCTS_DIR = /path/to/myapp/DerivedData/myapp/Build/Products/Release

Sign up to request clarification or add additional context in comments.

4 Comments

There was a similar question shortly after yours: stackoverflow.com/questions/13826375/…, perhaps that is also of interest.
I got what I wanted with some grepping like this: xcodebuild -project projectname -target targetname -showBuildSettings | grep -m 1 "CONFIGURATION_BUILD_DIR" | grep -oEi "\/.*"
unfortunately the path differs in the random postfix :/. I have no idea why… Any ideas?
If you mean "Release" at the end, add -configuration Debug or the like to control that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.