【问题标题】:Error: The Info.plist in the package must contain the CFBundleIdentifier key错误:包中的 Info.plist 必须包含 CFBundleIdentifier 键
【发布时间】:2015-12-30 18:18:12
【问题描述】:

我正在尝试使用 altool 提交我的 iphone 应用程序。但是却提示如下错误:

altool[18508:507] *** Error: (
    "Error Domain=ITunesConnectFoundationErrorDomain Code=-27000 \"The Info.plist in the package must contain the CFBundleIdentifier key.\" UserInfo=0x7f {NSLocalizedDescription=The Info.plist in the package must contain the CFBundleIdentifier key., NSLocalizedFailureReason=Unable to validate your application.}",
    "Error Domain=ITunesConnectFoundationErrorDomain Code=-27001 \"The Info.plist in the package must contain the CFBundleVersion key.\" UserInfo=0x7f {NSLocalizedDescription=The Info.plist in the package must contain the CFBundleVersion key., NSLocalizedFailureReason=Unable to validate your application.}",
    "Error Domain=ITunesConnectFoundationErrorDomain Code=-27002 \"The Info.plist in the package must contain the CFBundleShortVersionString key.\" UserInfo=0x7f {NSLocalizedDescription=The Info.plist in the package must contain the CFBundleShortVersionString key., NSLocalizedFailureReason=Unable to validate your application.}",
    "Error Domain=ITunesConnectFoundationErrorDomain Code=-27000 \"The package does not contain an Info.plist.\" UserInfo=0x7f{NSLocalizedDescription=The package does not contain an Info.plist., NSLocalizedFailureReason=Unable to validate your application.}"

我已经验证了这些键(CFBundleIdentifierCFBundleVersionCFBundleShortVersionString)在 Info.plist 中。此外,我从 .ipa 文件(使用 xcodebuild 和 xcrun - 命令行生成)打开了 Payload,可以确认这些键也在 Info.plist 文件中。

我使用 XCode 编译、归档和提交时的验证通过。

有什么帮助吗?

我的 Xcode 版本:6.1.1 (6A2008a) OSX 10.9.5

【问题讨论】:

  • 你找到答案了吗?
  • @Jordan 嗨。你能展示你的构建脚本来导出*.ipa 文件吗?我已经解决了类似的问题。
  • @Mozilla 我也解决了 - 我会添加答案。
  • @Mozilla 哦,您遇到了完全相同的问题。不错!

标签: ios iphone xcode continuous-integration continuous-deployment


【解决方案1】:

我遇到了同样的问题。

"Error Domain=ITunesConnectFoundationErrorDomain Code=-27000 \"Could not find a CFBundlePackageType within the Info.plist; or the package is missing an Info.plist.\" UserInfo=0x7fe72051f3a0 {NSLocalizedDescription=Could not find a CFBundlePackageType within the Info.plist; or the package is missing an Info.plist., NSLocalizedFailureReason=Unable to validate your application.}"

当我使用新的exportOptionsPlist 选项重新编写用于导出*.ipa 的脚本时,出现了此问题。旧脚本在 altool 上运行良好。新的没有。

旧脚本:

xcodebuild -exportArchive -exportFormat ipa -archivePath "MyApp.xcarchive" -exportPath "MyApp.ipa" -exportProvisioningProfile "appstore-provision"

新脚本:

xcodebuild -exportArchive -exportOptionsPlist "tools/export-options.plist" -archivePath "MyApp.xcarchive" -exportPath "MyApp.ipa"

问题是xcodebuild 现在创建MyApp.ipa/MyApp.ipa 而不是MyApp.ipa

我换了-exportPath:

xcodebuild -exportArchive -exportOptionsPlist "tools/export-options.plist" -archivePath "MyApp.xcarchive" -exportPath "."

【讨论】:

    猜你喜欢
    • 2023-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-27
    相关资源
    最近更新 更多