Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"no valid aps-environment entitlement found for application"

I am encountering this error when I am loading an Ad Hoc build of my Push Notification enabled iPhone app onto my device:

no valid aps-environment entitlement found for application

What does it mean, and how do I repair it?

like image 500
Simon Woodside Avatar asked Mar 16 '10 04:03

Simon Woodside


People also ask

What is APS environment entitlement?

APS Environment (macOS) Entitlement. The environment for push notifications in macOS apps. Key: com.apple.developer.aps-environment. com.apple.developer.usernotifications.filtering. Enable receiving notifications without displaying the notification to the user.

Does not include APS environment entitlement?

Missing Push Notification Entitlement - Your app includes an API for Apple's Push Notification service, but the aps-environment entitlement is missing from the app's signature. To resolve this, make sure your App ID is enabled for push notification in the Provisioning Portal.


2 Answers

I found the solution. In my project info under Build > Code Signing Identity I had it set to automatic, and it was selecting an AdHoc distribution profile which did not have push notifications enabled. (It was the wrong one.) I have selected the correct profile and the error is gone.

like image 152
Simon Woodside Avatar answered Oct 03 '22 12:10

Simon Woodside


Push Notifications must be enabled for your App ID before creating a Provision Profile.

So, in this order:

Create your APP ID

Enable APNS

Create the Provisioning Profile

like image 43
Gianluca Esposito Avatar answered Oct 03 '22 10:10

Gianluca Esposito