Xcode 4.1 - Archiving app gives me Entitlments.plist error
I am using Xcode 4.1 and MacOSX Lion 10.7. I am trying to archive my Mac app so I can upload my app to iTunes connect but it gives me this error:
ProcessProductPackaging /Developer/Platforms/MacOSX.platform/Entitlements.plist /Users/username/Library/Developer/Xcode/DerivedData/appname/Build/Intermediates/appname.build/Debug/appname.build/appname.xcent cd "/Volumes/Apps/iOS/Mac app store/appname" builtin-productPackagingUtility /Developer/Platforms/MacOSX.platform/Entitlements.plist -entitlements -format xml -o /Users/username/Library/Developer/Xcode/DerivedData/appname/Build/Intermediates/appname.build/Debug/appname.build/appname.xcent
error: error reading property list '/Developer/Platforms/MacOSX.platform/Entitlements.plist' - property list has no object Command builtin-productPackagingUtility failed with exit code 1
This error does not occur if I don't sign the code. I was able to submit my apps properly before upgrading to Xcode 4.1. I can't seem to find any documentation on how to sign an app in xcode 4 and I have no idea what the new Enable entitlements and sandbox does.
When I somehow get it to work, I get this email from iTunes connect with the following error:开发者_运维知识库 Invalid Code Signing Entitlements - The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile:
According to the provisioning profile, the bundle contains a key value that is not allowed: "appname" for the key "com.apple.application-identifier" in appname.app/Contents/MacOS/appname
What do I need to do to properly submit my app to iTunes connect?
Turns out, there is an issue with packaging apps if you are using a new Macbook manufactured after June of 2010. To package your app, follow these steps:
1) Build and Archive
2) Open the Organizer - Archives, find the new archive.
3) Right-click the archive "Show in Finder"
4) Right-click the archive in the finder to "Show Package Contents"
5) drill down to your app (>Products/Applications/YourApp)
6) Right-click your app, "Show Package Contents"
7) Delete the _CodeSignature directory
8) Edit Info.plist
a) Change BuildMachineOSBuild to "11A511"
b) Save, close
9) Go back to the Products/Applications/YourApp directory in the finder
10) Open Keychain Access.app
a) Find your certificate "3rd Party Mac Developer Application: Your Name"
b) double click to inspect it
c) Copy the full Common Name "3rd Party Mac Developer Application: Your Name"
11) Open a terminal and enter the following:
codesign -s "<paste your cert common name here>" -fv <drag the archived app from the finder to the terminal window here>
12) verify the output:
"...path to app...: replacing invalid existing signature"
"...path to app...: signed bundle with Mach-O universal (i386 x86_64)"
13) Close all them windows.
14) Open the Organizer - Archives in XCode
15) Validate... yep.
16) Submit... yay!
This method actually worked for me too!
This was my error, iTunes Connect kept kicking it out, not rejecting...just almost instant kick-out. So anyway...this method worked for me! now app is sitting In Review. As he said Yay!
Invalid Code Signing Entitlements - Your application bundle's signature contains code signing entitlements that are not supported on Mac OS X; this may happen if your Mac OS X project was ported from iOS. Please check your Xcode project's code signing entitlements configuration, and remove any unneeded entitlements.
Specifically, key "keychain-access-groups" in [YourAppName] is not supported. Invalid Code Signing Entitlements - Your application bundle's signature contains code signing entitlements that are not supported on Mac OS X; this may happen if your Mac OS X project was ported from iOS. Please check your Xcode project's code signing entitlements configuration, and remove any unneeded entitlements. Specifically, key "application-identifier" in [YourAppName] is not supported.
Just want to add in there...that I also had a black MacBook, that was manufactured BEFORE 2010...I still went ahead and added the key "BuildMachineOSBuild to "11A511" like the instructions said. :)
精彩评论