本文介绍了使用xcodebuild -exportArchive(Xcode8.3,自动签名)时如何获取分发应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在更新Xcode8.3之后,选项' -exportSigningIdentity ',' -exportProvisioningProfile '和' -exportFormat '已从' xcodebuild -exportArchive ".

After update Xcode8.3, the options '-exportSigningIdentity', '-exportProvisioningProfile' and '-exportFormat' are removed from 'xcodebuild -exportArchive'.

当我尝试获取发行版应用程序时,出现以下错误:
xcodebuild:错误:无效的选项'-exportProvisioningProfile'.

When i try to get a distribution app, i get the error below:
xcodebuild: error: invalid option '-exportProvisioningProfile'.

当项目设置了自动签名已启用"时,如何从MyApp.xcarchive获取分发MyApp.ipa?

So how can i get distribution MyApp.ipa from MyApp.xcarchive, when the project has set Automatic Signing Enabled?

自动签名

推荐答案

听起来像您想从现有xcarchive在命令行上创建IPA的声音.从Xcode 7开始,执行此操作的首选方法是(来自 man xcodebuild ):

Sounds like you want to create an IPA on the command line from an existing xcarchive. Since Xcode 7, the preferred way to do this is (from man xcodebuild):

xcodebuild -exportArchive -archivePath xcarchivepath -exportPath destinationpath -exportOptionsPlist path

所以在您的情况下:

xcodebuild -exportArchive -archivePath MyApp.xcarchive -exportPath MyApp.ipa -exportOptionsPlist exportOptions.plist

exportOptions.plist是一个PLIST文件,其中包含配置IPA导出的各种参数.有关所有可用选项,请参见 xcodebuild -help .您必须至少指定方法的条目(应用商店,临时,企业等-默认为开发).如果您只想导出以进行App-Store分发,则文件应如下所示:

exportOptions.plist is a PLIST file that contains various parameters configuring the IPA export. See xcodebuild -help for all available options. You'll have to at least specifiy an entry for method (app-store, ad-hoc, enterprise etc. - defaults to development). If you just want to export for App-Store distribution, the file should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>method</key>
    <string>app-store</string>
</dict>
</plist>

这篇关于使用xcodebuild -exportArchive(Xcode8.3,自动签名)时如何获取分发应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 20:34