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

作者: shaneZhang 分类: ios技术 发布时间: 2016-07-14 13:57

今天在发布上传IPA软件包的时候,出现了这样一个错误。经过搜索后得知是由于我们用jenkins打包的时候在BuildSetting中添加了一个键值所以才出现的问题。

由于Xcode7在升级的过程中,废弃了该功能,而又由于没有更改Xcode打包时候的签名组件导致的问题,那么问题出现了,如果不添加这个jenkins打包出错,那么添加这个提交App Store审核出错。。。。。

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

解决方案如下:


Remove CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist
Find the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication script 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});

经过了这个事情,也从侧面可以看出来,苹果支持用 xcodebuild 替换 PackageApplication

Step 1- remove the build setting CODE_SIGN_RESOURCE_RULES_PATH if you have anything set there.

If you build and export using the Xcode UI then this should fix your problem. If you build from the command line continue.

Step 2- if you build from the command line then as of Xcode 7 you should use xcodebuild (instead of PackageApplication) to produce the .ipa file. xcodebuild has a new -exportArchive option to create an .ipa that works more like Xcode Organizer. See answer here for details:

本页面支持AMP友好显示:Error Itms-90339: This bundle is invalid . The info.plist contains an invalid key ‘CFBundleResourceSpecification’ in app bundle

如果觉得我的文章对您有用,请随意打赏。如果有其他问题请联系博主QQ(909491009)或者下方留言!

发表评论

电子邮件地址不会被公开。 必填项已用*标注