xcode iOS 应用程序提交 - 存档不包含 info.plist

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26132038/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 05:45:08  来源:igfitidea点击:

iOS app submission - archive does not contain an info.plist

iosxcodeapp-store

提问by JMD

I am trying to submit an archive to the app store with an old app i was given. I keep receiving two errors CFBundleShortVersionString key must be in the plist and more troubling 'the package does not contain a plist'

我正在尝试使用我收到的旧应用程序向应用程序商店提交存档。我不断收到两个错误 CFBundleShortVersionString 键必须在 plist 中,更令人不安的是“包不包含 plist”

Both of these items exist in the app. I added the CFBundleShortVersionString key to the plist, and the plist file most definitely exists or I could never build it. What is the issue here?

这两个项目都存在于应用程序中。我将 CFBundleShortVersionString 键添加到 plist 中,并且 plist 文件绝对存在,否则我永远无法构建它。这里有什么问题?

采纳答案by ttarik

If the upload tool isn't finding your .plist file, that would be why it doesn't think it contains a CFBundleShortVersionString key. For some reason, apps can compile without any plist file at all!

如果上传工具没有找到您的 .plist 文件,这就是它认为它不包含 CFBundleShortVersionString 键的原因。出于某种原因,应用程序可以在没有任何 plist 文件的情况下进行编译!

First, make sure that your plist file exists in your project navigator, and that it's not highlighted in red. (in case it has been removed or renamed on disc, for whatever reason)

首先,确保您的 plist 文件存在于您的项目导航器中,并且它没有以红色突出显示。(如果它已在光盘上被删除或重命名,无论出于何种原因)

In your project in Xcode, select your app's target, and then select the "Build Settings" tab. Search for "plist" to filter the results. Under "Packaging", check the value of "Info.plist". This should be the name of your plist file, relative to your Xcode project. For example, "MyApp/MyApp-Info.plist". If it is blank, change it to the name of your plist file and rebuild.

在 Xcode 的项目中,选择应用程序的目标,然后选择“构建设置”选项卡。搜索“plist”以过滤结果。在“Packaging”下,检查“Info.plist”的值。这应该是您的 plist 文件的名称,相对于您的 Xcode 项目。例如,“MyApp/MyApp-Info.plist”。如果为空,请将其更改为 plist 文件的名称并重建。

回答by ゴスエン ヘンリ

I had the same problem.

我有同样的问题。

I just added a new row with the key Bundle versions string, shortto the Info.plist with the version for a value and then it passed validation with no further errors.

我刚刚Bundle versions string, short在 Info.plist 中添加了一个带有键的新行,其中包含一个值的版本,然后它通过了验证而没有进一步的错误。

回答by Andrew Barr

In my case I had an wrong/errant entry in the info.plist for Executable File name, I replaced it with ${EXECUTABLE_NAME} and that cleared the problem.

在我的情况下,我在 info.plist 的可执行文件名中有一个错误/错误的条目,我将其替换为 ${EXECUTABLE_NAME} 并解决了问题。

回答by Apneist

In my case : i got this error message the first time I tried to upload the archive. However the 2nd time I tried to compile again, the computer was out of hard disk space and it seems like it didn't write to the plist file because of that reason the first time as well.

就我而言:我第一次尝试上传档案时收到此错误消息。然而,第二次我再次尝试编译时,计算机的硬盘空间不足,并且第一次似乎也因为这个原因没有写入 plist 文件。

After freeing hard disk space and trying again (after restarting XCode too), it worked fine.

释放硬盘空间并重试后(也重新启动 XCode 后),它工作正常。

回答by Wonka Gollum

When you have app extensionsembedded in your app, you must check (enable) the target membership of MainApp-Info.plist to those app extensionsas well as the main app. Do it in the Xcode file inspector.

当您的应用程序中嵌入了应用程序扩展程序时,您必须检查(启用)MainApp-Info.plist 的目标成员资格到这些应用程序扩展程序以及主应用程序。在 Xcode 文件检查器中执行此操作。

回答by coffeebreaks

Apple has published a technical document that lists the possible issues that can cause this. As of today:

Apple 已发布了一份技术文档,其中列出了可能导致此问题的问题。截至今日:

  • missing CFBundlePackageType
  • missing CFBundleShortVersionString
  • missing CFBundleVersionString
  • 缺少 CFBundlePackageType
  • 缺少 CFBundleShortVersionString
  • 缺少 CFBundleVersionString

回答by Hardik Shah

I have already "Bundle versions string, short" in my info.plist but the problem for me was "Bundle Display Name" is not in info.plist so i added that and it works.

我的 info.plist 中已经有“Bundle versions string, short”,但对我来说问题是“Bundle Display Name”不在 info.plist 中,所以我添加了它并且它可以工作。

Hope this will help you.

希望这会帮助你。

Thanks

谢谢

回答by ecume des jours

for me, I had duplicated a Target a while back and the build settings were referencing a non-existing binary "myApp copy"

对我来说,我之前复制了一个 Target 并且构建设置引用了一个不存在的二进制“myApp copy”

回答by fieres

I had the same problem with the same two error messages. The Info.plist was in fact in the package, but it did not contain the CFBundleShortVersionString. The first error (Archive does not contain Info.plist) is given by the Apple system by mistake.

我对相同的两条错误消息遇到了同样的问题。Info.plist 实际上在包中,但它不包含 CFBundleShortVersionString。第一个错误(Archive不包含Info.plist)是苹果系统错误给出的。

In my case I had several targets in the project, and I had added the CFBundleShortVersionString to the wrong target (not the one I was validating with Apple).

就我而言,我在项目中有多个目标,并且我已将 CFBundleShortVersionString 添加到错误的目标(不是我与 Apple 验证的目标)。

To be extra-sure, do

为了更加确定,请执行

  • export the archive in question for ad-hoc distribution
  • unzip the *.ipa file
  • Inspect the Payload/your.app/Info.plist file
  • Check whether it contains the CFBundleShortVersionString
  • 导出有问题的档案以进行临时分发
  • 解压 *.ipa 文件
  • 检查 Payload/your.app/Info.plist 文件
  • 检查它是否包含 CFBundleShortVersionString

回答by Alexander Belyavskiy

I managed to get meaningful error from uploader:

我设法从上传者那里得到了有意义的错误:

  1. Install https://github.com/nomad/shenzhen
  2. Create IPA: ipa build
  3. Submit IPA: ipa distribute:itunesconnect -e -w -a ACCOUNT_NAME -p PASSWORD -f ./AppName.ipa -i APPLE_ID_OF_THE_APP --verbose
  1. 安装https://github.com/nomad/shenzhen
  2. 创建 IPA:ipa build
  3. 提交 IPA: ipa 分发:itunesconnect -e -w -a ACCOUNT_NAME -p PASSWORD -f ./AppName.ipa -i APPLE_ID_OF_THE_APP --verbose

By doing this I received the following error: ERROR ITMS-90183: "Invalid Bundle OS Type Code. The value of 'Bundle OS Type Code' [CFBundlePackageType] in your application bundle's Info.plist file must be one of [APPL]."

通过这样做,我收到了以下错误:错误 ITMS-90183:“无效的捆绑操作系统类型代码。应用程序捆绑的 Info.plist 文件中‘捆绑操作系统类型代码’[CFBundlePackageType] 的值必须是 [APPL] 之一。”

Added CFBundlePackageType and my app passed validation!

添加了 CFBundlePackageType 并且我的应用程序通过了验证!

I think this way you can find other issue if any during submission with more meaningful message.

我认为通过这种方式,您可以在提交过程中发现其他问题,并提供更有意义的信息。