ios 错误 Itms-90339:此捆绑包无效。info.plist 在应用程序包中包含无效的键“CFBundleResourceSpecification”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32504355/
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-08-31 07:35:35  来源:igfitidea点击:

Error Itms-90339: This bundle is invalid . The info.plist contains an invalid key 'CFBundleResourceSpecification’ in app bundle

iosxcode

提问by Anupam Mishra

I am trying to upload my application on iTunes for iOS 9. I used Xcode 7 beta 6 to build my IPA , but iTunes failed to upload my IPA by following error message .enter image description here

我正在尝试在 iTunes 上为 iOS 9 上传我的应用程序。我使用 Xcode 7 beta 6 来构建我的 IPA,但 iTunes 未能通过以下错误消息上传我的 IPA。在此处输入图片说明

回答by Kaushal Panjwani

Project settings under Build Settings > Code Signing > Code Signing Resource Rules Path - Delete the value for Code Signing Resource Rules Path. That fixed issue for me

Build Settings > Code Signing > Code Signing Resource Rules Path 下的项目设置 - 删除 Code Signing Resource Rules Path 的值。对我来说这个固定的问题

回答by Rishi Goel

I am the same boat as DongHui Li. I am using Jenkins too. If I remove CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plistI am NOT able to build. And if I add it, I can build but NOT able to submit to Apple.

我和李东辉同舟共济。我也在使用詹金斯。如果我删除,CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist我将无法构建。如果我添加它,我可以构建但不能提交给 Apple。

UPDATE-> I am able to build and upload to apple using Jenkins now.
What I did is:

更新-> 我现在可以使用 Jenkins 构建并上传到苹果。
我所做的是:

  1. Remove CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist
  2. Find the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplicationscript and update it.
    Find the lines including the following code in the script

    my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements,resource-rules",
                      "--sign", $opt{sign},
                      "--resource-rules=$destApp/ResourceRules.plist");
    

    change it to:

    my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements",
                      "--sign", $opt{sign});
    
  1. 消除 CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist
  2. 找到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication脚本并更新它。
    在脚本中找到包含以下代码的行

    my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements,resource-rules",
                      "--sign", $opt{sign},
                      "--resource-rules=$destApp/ResourceRules.plist");
    

    将其更改为:

    my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements",
                      "--sign", $opt{sign});
    

回答by kent

The problem lies in the Xcode integration plugin for Jenkins. Specifically, there is a checkbox in build details pane called : "Pack application and build .ipa?"

问题在于 Jenkins 的 Xcode 集成插件。具体来说,构建详细信息窗格中有一个复选框,名为:“打包应用程序并构建 .ipa?”

This feature will call 'xcrun PackageApplication' with the optional '--embed' and '--sign' flags set.

此功能将调用带有可选的“--embed”和“--sign”标志集的“xcrun PackageApplication”。

for the most part you will have already run codesign, and also in most cases the embedding of the provisioning profile is redundant. unfortunately the author of the plugin has not taken this into consideration, and these two optional parameters are not configurable through the GUI of the jenkins plugin.

在大多数情况下,您已经运行了 codesign,而且在大多数情况下,配置文件的嵌入是多余的。遗憾的是插件的作者并没有考虑到这一点,而且这两个可选参数是无法通过jenkins插件的GUI进行配置的。

the solution:

解决方案:

DO NOT SELECT THIS OPTION!

不要选择这个选项!

This option has three parameters:

这个选项有三个参数:

  • '.ipa filename pattern' : ex: MyApplication

  • 'Output directory' : ex: OUTPUT

  • 'manifest plist URL' ( I've not used this... )

  • “.ipa 文件名模式”:例如:MyApplication

  • '输出目录':例如:OUTPUT

  • 'manifest plist URL'(我没有用过这个...)

instead, manually package your .ipa file by adding the 'execute shell' after the build using the parameters you would in the 'pack' option of the GUI:

相反,通过在构建后使用 GUI 的“pack”选项中的参数添加“execute shell”来手动打包 .ipa 文件:

/bin/mkdir $(PWD)/build/OUTPUT    
/usr/bin/xcrun -sdk iphoneos PackageApplication -v $(PWD)/build/MyApplication.app -o $(PWD)/build/OUTPUT/MyApplication.ipa

回答by Massimo Polimeni

Check in your info.plistif you have the voice CFBundleResourceSpecificationempty and if you not need it so remove it.

如果您的声音为空,请检查您的info.plistCFBundleResourceSpecification,如果您不需要它,请删除它。

If you need it so you need to check the value that you use under Code Signing Resource Rules Pathin build setting.

如果您需要它,那么您需要检查您Code Signing Resource Rules Path构建设置中使用的值。

回答by Donghui Li

As I use Jenkins to build automatically, remove CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist leads to a fail build. But with xcode building, it works.

当我使用 Jenkins 自动构建时,删除 CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist 会导致构建失败。但是使用 xcode 构建,它可以工作。

回答by quellish

Applications built with developer tools betas cannot be submitted to iTunes Connect.

使用开发者工具测试版构建的应用程序无法提交到 iTunes Connect。

Try it with the GM or release version of the tools.

使用工具的 GM 或发布版本尝试一下。