What is Notification Error "no valid 'aps-environment' entitlement string found for application?

TiPb's getting a lot of questions about Notification Error "no valid 'aps-environment' entitlement string found for application, what it means, and what can be done about it. Reason being, Google released their new Gmail for iPhone and iPad app today today, and subsequently pulled it due to some launch-time bugs involving Push Notifications.

Short answer: Google messed up Push Notifications and there's nothing you can do about it until Google fixes it and Apple pushes out that fix.

Long answer: We reached out to Paul Haddad of Tapbots and Tweetbot fame to get a better informed idea of what's going on, and this is what he was kind enough to share:

In the iOS Provisioning Portal you need to various different certificates. For all apps you'll normally generate a Development, AdHoc distribution and Store distribution certificates. For push enabled apps you also need to generate Development and Production Push certificates.

What I think happens is that most people start by generating and downloading the 3 standard certificates and at some later point generate the Push certificates. However when you create the Push certificates it modifies the standard certificates in some way that tells the OS that it can be used for push notifications. You'll often re-generate/download the Development and AdHoc certificates as you add new devices for testing, but you only have to re-genrate the Store certificates once a year when renewing with Apple.

So again what Google probably did is create the standard certificates, then create the Push certificates and didn't re-generate/download the Store certificate. It's a really easy mistake to make and there's no indication of a problem anywhere within the submission process to Apple. It's also a pretty trivial thing to fix and I'd expect Google to re-submit and Apple to expedite the release pretty quickly.

It does make me wonder why Apple didn't catch this issue, my guess is something about the way they run apps prevents this error from showing up.

As far as I know the only way to see if this is a problem or not is to run the following command

Reader comments

What is Notification Error "no valid 'aps-environment' entitlement string found for application?

From Alex Gawley, Google's Gmail Product Manager:
"The iOS app we launched today contained a bug which broke notifications and caused you to see an error message when first opening the app. We’ve removed the app while we correct the problem, and we’re working to bring you a new version soon. In the meantime, everyone who’s already installed the app can continue to use it.
We want to bring you a great Gmail experience, and we're sorry we messed up here"

I hope this error was also causing the horrible lag that was plaguing the app. As far as I'm concerned, it's unusable as is. I also wish you could have more than one account! There's no way this replaces iOS mail in its current form.

This does seem like an easy error to make, and Google is certainly at fault for making it, but why would Apple not be able to catch it? One of the virtues of a closed App Store is the QA that Apple purportedly undertakes before allowing admittance into the store. This seems exactly the sort of developer mistake curation should catch automatically.
Given that Apple knows upon submission if an app will make use of push, Apple should certainly as part of its testing grep through the output of codesign for the string Paul identified. I am surprised as part of their final QA they do not vet all certificates before allowing it onto the app store.

Darn. I missed a chance to download a Google App that works as "well" as Android and gripe about it. LOL!!! Using Gmail through Exchange as well as the web app. Don't need a native Gmail app. But whenever they get it working, I'll give it a shot.

Darn. I missed a chance to download a Google App that works as "well" as Android and gripe about it. LOL!!! Using Gmail through Exchange as well as the web app. Don't need a native Gmail app. But whenever they get it working, I'll give it a shot.

Darn. I missed a chance to download a Google App that works as "well" as Android and gripe about it. LOL!!! Using Gmail through Exchange as well as the web app. Don't need a native Gmail app. But whenever they get it working, I'll give it a shot.