2013-09-30 55 views
18

我建立/從命令行運行iOS應用程序與下面的命令:清潔IOS Xcode目標在命令行

xcodebuild -sdk "${TARGET_SDK}" -xcconfig "${CONFIG_FILE_PATH}" -configuration Release 

/usr/bin/xcrun -sdk "${TARGET_SDK}" PackageApplication -v "${PROJECT_BUILD_DIR}/${APPLICATION_NAME}.app" -o "${OUTPUT_DIR}/${APPLICATION_NAME}.ipa" 

是否有任何命令清除目標。或者這些命令會自行清理。

回答

29

從xcodebuild聯編手冊頁:

xcodebuild [-project projectname] [-target targetname ...] [-configuration configurationname] [-sdk [sdkfullpath | sdkname]] [buildaction ...] [setting=value ...] [-userdefault=value ...] 

,並建立行動可以採取以下值:

buildaction ... 
     Specify a build action (or actions) to perform on the target. Available build actions are: 

     build  Build the target in the build root (SYMROOT). This is the default build action. 

     archive  Archive a scheme from the build root (SYMROOT). This requires specifying a workspace and 
        scheme. 

     installsrc Copy the source of the project to the source root (SRCROOT). 

     install  Build the target and install it into the target's installation directory in the distribution 
        root (DSTROOT). 

     clean  Remove build products and intermediate files from the build root (SYMROOT). 

在你的情況

xcodebuild -sdk "${TARGET_SDK}" -xcconfig "${CONFIG_FILE_PATH}" -configuration Release clean