Xcode - Sharing app - PackageApplication failed with exit code 1
I've created an ad hoc distribution build for my iPhone app using Xcode 4.1. The target successfully builds and produces an archive file that I can see in Organizer. I then click 'Share' which allows me to select .ipa and my distribution profile. However, after i hit 'Next' the Organizer crashes with the error below. The error log appears to suggest that the error is related to the 'ResourceRules.plist'? I'm using CorePlot for graphing, might it be related to that?
For info, I have a valid distribution certificate and imported a distribution provisioning profile. Entitlements file is not needed anymore for ad hoc distribution apparently so I don't have one in the project. All of my other apps don't crash at the 'sharing' stage, so it doesn't appear to be a problem with Xcode, just this particular app.
Any help much appreciated.
Grant.
PackageApplication failed with exit code 1.
Packaging application: '/Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app'
Arguments: embed=/Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision verbose=1 output=/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/670E174E-0BCA-4F18-AB8D-5ACF3D7E569A-8458-000005FCA81C6AE5/开发者_开发技巧app.ipa sign=iPhone Distribution: Grant Abt
Environment variables:
HOME = /Users/gabt
LOGNAME = gabt
__CF_USER_TEXT_ENCODING = 0x1F5:0:0
DISPLAY = /tmp/launch-WoNf6c/org.x:0
COMMAND_MODE = unix2003
VERSIONER_PERL_PREFER_32_BIT = no
PATH = /Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHELL = /bin/bash
SSH_AUTH_SOCK = /tmp/launch-hHkBrJ/Listeners
Apple_PubSub_Socket_Render = /tmp/launch-P0dtgN/Render
TMPDIR = /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/
USER = gabt
VERSIONER_PERL_VERSION = 5.12
Output directory: '/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/670E174E-0BCA-4F18-AB8D-5ACF3D7E569A-8458-000005FCA81C6AE5/app.ipa'
Temporary Directory: '/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS' (will NOT be deleted on exit when verbose set)
+ /bin/cp -Rp /Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload
Program /bin/cp returned 0 : []
### Checking original app
+ /usr/bin/codesign --verify -vvvv /Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app
Program /usr/bin/codesign returned 0 : [/Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app: valid on disk
/Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app: satisfies its Designated Requirement
]
Done checking the original app
### Embedding '/Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision'
+ /bin/rm -rf /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/embedded.mobileprovision
Program /bin/rm returned 0 : []
+ /bin/cp -rp /Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/embedded.mobileprovision
Program /bin/cp returned 0 : []
+ /usr/bin/codesign -d --entitlements /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_rawMkZVbU5I /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app
Program /usr/bin/codesign returned 0 : [Executable=/private/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/myApp
]
+ /usr/libexec/PlistBuddy -c Set :get-task-allow NO /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_
Program /usr/libexec/PlistBuddy returned 0 : []
+ /usr/bin/plutil -lint /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_
Program /usr/bin/plutil returned 0 : [/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_: OK
]
### Codesigning '/Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision' with 'iPhone Distribution: Grant Abt'
+ /usr/bin/codesign --force --preserve-metadata --sign iPhone Distribution: Grant Abt --resource-rules=/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/ResourceRules.plist --entitlements /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_ /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app
Program /usr/bin/codesign returned 1 : [/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/ResourceRules.plist: cannot read resources
]
error: codesign failed with error 1
Had the same problem today.. The "Code Signing Resource Rules Path" was missing in the PROJECT - Build Settings
...
Opened the "Build Settings" tab of your project.
Searched "Code Signing Resource Rules Path", it was empty for me
and added
$(SDKROOT)/ResourceRules.plist
credits goes to Adams Blair who described this problem with SDK2.2
yeah, i think it's xcode6.1 problem (or bug?)
you can
1.add $(SDKROOT)/ResourceRules.plist
to "Code Signing Resource Rules Path"
or
2.use xcode-select back to 6.01 build
or
3.sign argument without
"sign=iPhone Distribution: Grant Abt"
to work
Check your code signing profiles again. Your developer profile should be set to the debug and for the release you must set your distribution profile. Make sure you select any iOS SDK under each category and set the respective profiles for them as well.
Encounter this issue when testing with Xcode 6.1 beta version. Back to Xcode 6.0.1 works.
精彩评论