Just upgraded to Xcode 6.1 today, and guess what: Now I'm having trouble submitting builds using the TestFlight desktop app. Here's the error I'm getting while the app starts building the IPA:
error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign 854059d45eed724593debef577a562e1ba96ab55 --resource-rules=/tmp/QYFSJIvu7W/Payload/XX.app/ResourceRules.plist /tmp/QYFSJIvu7W/Payload/XX.app failed with error 1. Output: Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)! Warning: --resource-rules has been deprecated in Mac OS X >= 10.10! /tmp/QYFSJIvu7W/Payload/XX.app/ResourceRules.plist: cannot read resources
The 'Support Article' has no idea what is going on.
It does not seem to be a TestFlight problem because the same thing happens in a CI environment like Jenkins using the xcrun or similar tools.
The app wasn't updated for months, so I know that I shouldn't be expecting for any updates to fix this anytime soon. It used to work really well for me and my clients so I'm not really keen on abandoning it for something else either.
Any ideas for what this error is about, and how to fix it would be very appreciated.
The answer by Tim Gostony no longer works since the release of Xcode 7. Now the App Store submission process fails when resource rules are present. The solution is to clear your Code Signing Resource Rules Path and replace xcrun with xcodebuild tool:
The simplest Options.plist for exporting ad-hoc distribution ipa files looks like this:
There are other options available for this plist file regarding bitcode, app thinning, etc. That's why I think xcodebuild tool is the right tool for exporting ipa files for iOS 9 and above.
More details about options plist are available with xcodebuild -help command.
I wish I knew why it works, but here's a fix that worked for me:
I emailed TestFlight support and got this response:
The suggested workaround did work.
As specified in another answer, you can also just not specify the distribution certificate to sign with and it will package correctly. TestFlight would need to update their app to do this.
On Yosemite w/ XCode 6.4 even using the SDKROOT patch the codesigning fails. The following article explains how to patch the XCode script to get around this. Note that this is patching XCode, so it is version specific, but fixes the problem.
http://www.jayway.com/2015/05/21/fixing-your-ios-build-scripts
The following patch for PackageApplications fixed it for me, I removed resource-rules as it says it's deprecated on 10.10.
Testflight builds work without it. Appstore builds too.