如何清除命令行中的IOS Xcode目标?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (1)
  • 关注 (0)
  • 查看 (15)

我正在使用以下命令从命令行构建/运行一个IOS应用程序:

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"

是否有任何命令来清除目标。或者这些命令负责清理自己。

提问于
用户回答回答于

来自xcodebuildman页面:

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

扫码关注云+社区