如何使用终端创建IPA [英] How to create IPA using terminal

查看:159
本文介绍了如何使用终端创建IPA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用XCode 8.3.如果我在终端中触发此命令以进行存档,如下所示.它显示了这种错误.您能帮我找出解决方案吗?

I'm using XCode 8.3. if I fire this command in Terminal for making an archive as shown below. It shows this kind of error. Can you help me to find out the solution?

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>

推荐答案

几处更改:-exportFormat-exportProvisioningProfile不再存在.另外,-exportPath现在指向实际路径,而不是文件.

A few things changed: -exportFormat and -exportProvisioningProfile don't exist anymore. Also, -exportPath now point to an actual path, not to a file.

您将必须使用导出选项创建一个plist文件.这是一种简单的命令行方法:

You will have to create a plist file with your export options. This is an easy command-line way to do this:

echo "{\"method\":\"app-store\"}" | plutil -convert xml1 -o /tmp/exportOptions.plist -- -

然后在呼叫xcodebuild时使用-exportOptionsPlist /tmp/exportOptions.plist.

这篇关于如何使用终端创建IPA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆