Warm tip: This article is reproduced from serverfault.com, please click

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

发布于 2014-12-05 20:18:42

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:

enter image description here

Here is the provisioning profile for the apps store:

enter image description here

Questioner
Jessiah
Viewed
0
wei 2015-10-08 20:03:23

I fix this problem by enabling push notification capability.

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