Question

Is there a way I can choose the destination folder (directory) for when I build an iOS app via command line using xcodebuild?

Right now I am using a command like

xcodebuild -sdk iphonesimulator -workspace /<path_to_project>/ios-app/CompanyName-iOS.xcworkspace -scheme AppName -configuration Debug RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES ONLY_ACTIVE_ARCH=NO clean build 2>&1

In the output I see something like

GenerateDSYMFile /Users/<username>/Library/Developer/Xcode/DerivedData/CompanyName-iOS-fcvhojqctgtmvgdaavahmjutbfyy/Build/Products/Debug-iphonesimulator/AppNAme.app.dSYM

Is there a way I could get this location where the app is output to or even specify where I would rather have the app be sent to? I need access to the app to run Appium selenium tests and just having a build execute and run tests is not helpful. Also trying to incorporate jenkins into the mix and need to have commands to fully automate the process

Était-ce utile?

La solution

Set the CONFIGURATION_BUILD_DIR Build Setting to be the directory you want.

https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW40

So in your example:

xcodebuild ...cut... CONFIGURATION_BUILD_DIR=<desired dir> ...cut...

Autres conseils

use -derivedDataPath path to get compiled output onto specific folder.

xcodebuild -scheme xxx -workspace xxx.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug -derivedDataPath ./build  build 

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top