I have an app that I’m building with XCode 4.2. It has push, and I’ve re-downloaded the certificate and provisioning profile since modifying the App ID to include Push Notification services. I have both an Ad Hoc target that I’ve used for testing, and a Release target that I’m currently trying to build with (to submit to the app store). I’ve verified that all of these settings are correct (eg that it’s actually using the App Store provision). I have an Entitlements.plist file in the project, which includes the key-value pair “aps-environment, production” among three other keys (Can be debugged, application-identifier, and keychain-access-groups).
When I do an Archive, I get a warning:
warning: Application failed codesign verification. The signature was invalid,
or it was not signed with an iPhone Distribution Certificate. (-19011)
Illegal entitlement key/value pair: aps-environment, production
If I blank out the “Code Signing Entitlements” line in the build settings, the app will build and I can submit, but Push doesn’t work. What’s the 4.2 magic checklist for getting Push to work?
Read that
Your need to check "Creating and Installing the Provisioning Profile" part, there is a solution of your problem. Seems like Apple knows about this problem and does nothing.