本文介绍了xcodebuild -exportArchive:键“方法"的exportOptionsPlist错误:预期为{}之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用命令行xcodebuild工具从我的存档中导出临时分发ipa文件,如下所示:

I'm using command line xcodebuild tool to export ad-hoc distribution ipa file out of my archive like this:

xcodebuild -exportArchive -archivePath /path/Archive.xcarchive -exportPath /path -exportOptionsPlist /path/options.plist

但是,此命令失败,并显示错误

However, this command fails with error

exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc

没有其他我在导出选项plist中提供的方法",它总是会因此错误而失败.如果我从plist文件中删除方法"选项,它也会失败.

No mater what 'method' I provide in my export options plist, it always fails with this error. It also fails if I remove the 'method' option from the plist file.

推荐答案

我最初怀疑是xcodebuild工具,但事实证明归档文件是无效的.当我在Xcode中打开存档文件并尝试手动导出ipa文件时,我注意到上传到App Store"和验证"按钮被禁用.单击导出"按钮后,它给了我两个选项:保存内置产品"和导出为Xcode存档",但是没有导出"即席分发和其他常规选项.

I suspected xcodebuild tool initially, but it turned out the archive file was invaid. When I opened the archive file in Xcode and tried to export an ipa file manually, I noticed that "Upload to App Store" and "Validate" buttons were disabled. After clicking the "Export" button, it gave me two options: "Save Built Products" and "Export as an Xcode Archive", but there was no Export ad-hoc distribution and the other regular options.

事实证明,我的.app文件中的档案库文件很少. Xcode认为这是通用档案,而不是应用档案.检查项目设置中的构建阶段"以复制头文件和库文件.

It turned out there were few library files along my .app file in the archive. Xcode considers this a generic archive and not an app archive. Check the Build Phases in your project settings for copying header and library files.

有关更多详细信息,请参见 https://developer.apple. com/library/ios/technotes/tn2215/_index.html

For more details, see https://developer.apple. com/library/ios/technotes/tn2215/_index.html

这篇关于xcodebuild -exportArchive:键“方法"的exportOptionsPlist错误:预期为{}之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 20:34