15

Is there anyway to specify where to put the output file (ie .app) for xcodebuild? By default it is in:

/Users/myusername/Library/Developer/Xcode/DerivedData/Project-crkyjjbuqqnqqvfxehsjsarzlbbr/Build/Products/Release-iphoneos/Project.app

As I need to find the output Project.app file, if there is no way to specify the path, can I use a script to look for that "/Users/myusername/Library/Developer/Xcode/DerivedData/" folder and inside it find the one with latest modified date and prefix "Project-"? What does the script look like?

Thanks

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
hzxu
  • 5,753
  • 11
  • 60
  • 95

1 Answers1

19

Override the CONFIGURATION_BUILD_DIR environment variable in an xcodebuild argument. For instance, this command would put its build products under "/tmp/sportsball/":

xcodebuild -workspace Sportsball.xcworkspace -scheme "Sportsball Debug" -configuration Debug clean build CONFIGURATION_BUILD_DIR=/tmp/sportsball/

Nathaniel Irons
  • 547
  • 5
  • 9