No valid 'aps-environment' entitlement string found for application on app store

Jessiah picture Jessiah · Dec 5, 2014 · Viewed 84.3k times · Source

So I have this app called Dripper that I put out about a month ago and then an update a couple days ago. The update added push notifications and a few little tweaks. I tested it with the sandbox-apn using the development profile and things worked great. Then I switched things to the production-apn and pushed it to test-flight, again things worked perfectly. Once I put update on the market and ran it I noticed I wasn’t getting any new push registrations on the server. I looked at the console logs for the device and found this:

Dec 4 17:55:15 Ina-touch-it coffco[1210] : Registering for remote notifications
Dec 4 17:55:15 Ina-touch-it SpringBoard[52] : No valid 'aps-environment' entitlement string found for application 'Dripper': (null). Notifications will not be delivered.
Dec 4 17:55:15 Ina-touch-it coffco[1210] <Warning>: Failed to register with error : Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x174270900 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}

I am a bit confused because I thought that the production-apn would function the same between ad-hoc and app store builds.

Here is my app id and its entitlements -> http://i.stack.imgur.com/uf4pB.png

Here is the provisioning profile for the apps store -> http://i.stack.imgur.com/AYOV5.png

Answer

wei picture wei · Oct 8, 2015

I fix this problem by enabling push notification capability.

Click on .xcodeproj -> Capabilities -> Enable Push Notification