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

6

44

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

Mcnully answered 10/9, 2015 at 14:15 Comment(0)
B
94

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

Biysk answered 11/9, 2015 at 4:55 Comment(6)
I look like this is working. But remember to clean the build folder.Brigidbrigida
I had this same issue. We had some build automation software that was setting this path in a Project.xcconfig file. Commented that out and everything built and submitted just fine. //CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plistArchfiend
Had the same error with Cordova. Commented out CODE_SIGN_RESOURCE_RULES_PATH in the file platforms/ios/cordova/build.xcconfig. That fixed itIllyria
@Archfiend how did you manage to get your automation software to build without the CODE_SIGN_RESOURCE_RULES_PATH ? I'm using Jenkins, and I got code signing errors when I remove CODE_SIGN_RESOURCE_RULES_PATH.Incendiary
Delete the value is ok. But the itunes connece show that the build is invaildAsclepius
Please check @MikeVosseller answer to SO 32763288 for a proper solution.Outer
N
57

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.

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

  1. Remove CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist
  2. 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});
    
Nonetheless answered 24/9, 2015 at 13:17 Comment(8)
This helped me tremendously. I finally have my Jenkins buildscript working again.Kirkwall
This helped me also, I feel it should be the accepted answer, as it's more complete.Placate
Just encountered the issue, found this answer, I didn't do the first step but did the second step, it resolved my issue. Building a Cordova project on Mac OSX 10.10.3 with XCode 6.4 using a manual shell script. Thanks!Douglass
This works for me too. Is there a better option, rather than updating private files in the xcode package?Myrlmyrle
Just updated to El Capitan (10.11 / XCode 7.0.1); as expected, needed to re-apply the same fix.Douglass
Looks like dirty solution. Its easy to fix Jenkins in its setting? Please look at https://mcmap.net/q/282472/-build-ios-app-and-distribute-ipa-via-testflight-with-jenkins-and-xcode-7Twyla
modifying Xcode internal files is highly discouraged. you need to be able to verify Xcode integrity and maintain some kind of sanity: (see xcodeghost for example). instead, do NOT rely on the jenkins plugins' packaging facility, and package your .ipa manually. (see my answer) |K<Skyway
This is a hack. PackageApplication is deprecated and it's probably just a matter of time until it stops working for a different reason. I also agree with kent on modifying internal XCode files. The true solution, as stated by Apple themselves, is to use xcodebuild -exportArchive -exportPlistOptions: #32763788Loidaloin
S
5

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?"

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

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.

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... )

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:

/bin/mkdir $(PWD)/build/OUTPUT    
/usr/bin/xcrun -sdk iphoneos PackageApplication -v $(PWD)/build/MyApplication.app -o $(PWD)/build/OUTPUT/MyApplication.ipa
Skyway answered 15/12, 2015 at 13:1 Comment(2)
Embedding of the provisioning profile is required for adhoc distribution, is it not?Congeal
@JDL: yes. but at this stage in the build process the provisioning profile has already been embedded.Skyway
C
2

Check in your info.plist if you have the voice CFBundleResourceSpecification empty and if you not need it so remove it.

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

Corinthians answered 10/9, 2015 at 17:4 Comment(4)
Facing same issue and I do not have CFBundleResourceSpecification in my info.plist?Biysk
Do you have something in your Code Signing Resource Rules Path? Check under the build settings, if it's empty just delete it.Corinthians
I added Code Signing Resource Rules Path in Build Settings and got the same CFBundleResourceSpecification error from iTunesConnect. :(Incendiary
@KaushalPanjwani Delete the value is ok. But the itunes connect show that the build is invaild. how to solve the problem.Asclepius
E
0

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.

Errantry answered 23/9, 2015 at 14:44 Comment(0)
E
0

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

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

Edi answered 25/9, 2015 at 21:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.