我正在使用XCode 8.3。如果我在终端中触发此命令以进行存档,如下所示。它显示了这种错误。你能帮我找出解决方案吗?
xcodebuild -configuration Release -exportArchive -exportFormat ipa -archivePath "/Users/Desktop/Demo.xcarchive" -exportPath "/Users/Desktop/Demo.ipa" -exportProvisioningProfile "Demo Development"
xcodebuild: error: invalid option '-exportFormat'
Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild [-project <projectname>] -scheme <schemeName> [-destination <destinationspecifier>]... [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild -workspace <workspacename> -scheme <schemeName> [-destination <destinationspecifier>]... [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild -version [-sdk [<sdkfullpath>|<sdkname>] [<infoitem>] ]
xcodebuild -list [[-project <projectname>]|[-workspace <workspacename>]] [-json]
xcodebuild -showsdks
xcodebuild -exportArchive -archivePath <xcarchivepath> -exportPath <destinationpath> -exportOptionsPlist <plistpath>
xcodebuild -exportLocalizations -localizationPath <path> -project <projectname> [-exportLanguage <targetlanguage>...]
xcodebuild -importLocalizations -localizationPath <path> -project <projectname>
答案 0 :(得分:6)
更改了一些内容:-exportFormat
和-exportProvisioningProfile
不再存在。此外,-exportPath
现在指向实际路径,而不是文件。
您必须使用导出选项创建plist文件。这是一种简单的命令行方式:
echo "{\"method\":\"app-store\"}" | plutil -convert xml1 -o /tmp/exportOptions.plist -- -
然后在致电-exportOptionsPlist /tmp/exportOptions.plist
时使用xcodebuild
。