Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcodebuild: find where the output app file is

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

like image 489
hzxu Avatar asked Dec 09 '13 01:12

hzxu


People also ask

Where is .app file located in Xcode?

app file is in Product > Applications folder.

Where does Xcode build output?

It should by located in: ~/Library/Developer/Xcode/DerivedData .

How do I open an .app file in Xcode?

Importing into XcodeOpen Xcode and select Open Another Project or File, Open. Open the folder you unzipped from your Dropsource download and locate the file with “. xcodeproj” extension in the root directory. Select the file and click Open.


1 Answers

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/

like image 149
Nathaniel Irons Avatar answered Oct 22 '22 15:10

Nathaniel Irons