PackageApplication script uses now-banned --resource-rules flag, producing unsubmittable app bundles

Originator:seandreilly
Number:rdar://23106163 Date Originated:14-Oct-2015 11:23 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7.1 beta 3 (7B85)
Classification:Other Bug Reproducible:Always
 
Summary:
The --resource-rules flag has been deprecated for a while now and it's no longer possible to upload app bundles to iTunesConnect that have apps packaged using that flag.  However, the PackageApplication script bundled with Xcode still invokes that flag when building an app package, causing any apps built from the command-line using that script to fail.  The Xcode script which pushes the flag back into the app bundles is located at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication

Steps to Reproduce:
1) Make an iOS app, making sure that the deprecated --resource-rules parameter is not used.  In other words, make sure the build settings do not include the obsolete CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist setting.
2) Use jenkins or fastlane to build it (which invokes the PackageApplication script)
3) try to submit the app to the store

Expected Results:
Because the app is packaged by an official Apple tool, I'd expect it to be correct and ready for upload to iTC

Actual Results:
The app is bundled and codesigned with the --resource-rules parameter, which adds a CFBundleResourceSpecification to the Info.plist (along with other less-visible effects).  This results in any iTC uploads returning the following error:  ERROR ITMS-90339: "This bundle is invalid. The Info.plist contains an invalid key 'CFBundleResourceSpecification' in bundle SyncSpace [SyncSpace.app]

Regression:
The only problem seems to be when using command-line builds that invoke the PackageApplication script (possibly indirectly).  I assume that's quite a lot of people.

Notes:
The workaround is to edit the PackageApplication script as described in this stackoverflow answer: http://stackoverflow.com/a/32762413/68748
Seems like this would be a really quick and easy fix to make before the next beta?

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!