"no valid aps-environment entitlement found for application"
Asked Answered
A

10

46

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?

Anis answered 16/3, 2010 at 4:20 Comment(1)
Just had the same error with PhoneGap Build and the Notification plugin (because I was using Developer Cert which will not work with notifications). Anyway, solved by creating an AdHoc-distribution provisioning profile at developer.apple.com, then compiling in Phonegap Build with that+the distribution cert. But before, uninstall app from iPhone & remove related provisioning profiles from Settings>General>Profiles. Also see: community.phonegap.com/nitobi/topics/genericpush_ios_errorMorman
A
48

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.

Anis answered 16/3, 2010 at 4:22 Comment(0)
S
19

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

Spiel answered 18/10, 2012 at 16:1 Comment(0)
O
13

You have to enable Target—> capabilities—> push notification. I have faced this issue using Xcode 8.1.

enter image description here

Ore answered 9/12, 2016 at 6:5 Comment(1)
It worked for me! For Provisioning profile Developer and AdHoc. thanks.Scarification
H
10

In my case Xcode had invalidated the provisioning profile (it will say so in the Member Center).

What worked was to refresh all the provisioning profiles in Xcode after enabling Push for the app in the Member Center.

Here is Apples guide to refresh all the provisioning profiles on your computer. https://developer.apple.com/library/prerelease/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingProfiles/MaintainingProfiles.html#//apple_ref/doc/uid/TP40012582-CH30-SW26

In short open Xcode and do the following:

  1. In the Xcode Preferences window, click Accounts.

  2. Select your team, and click View Details.

  3. In the dialog that appears, click the Refresh button in the lower-left corner under the Provisioning Profiles table.

    Xcode updates the list of profiles in the Provisioning Profiles table.

Halonna answered 22/8, 2014 at 13:39 Comment(0)
I
3

Generate a Provision Profile specific for your App ID (Push Notifications Enabled), do not use the widlcard ones

Intorsion answered 1/4, 2014 at 14:13 Comment(0)
B
1

I kept going through the process over and over again with one mistake... the Provisioning profile i kept on using was DEVELOPMENT this WILL NOT WORK

you NEED to use ADHOC provisioning profile

Borszcz answered 7/12, 2013 at 0:5 Comment(1)
lostincompilation.co/2015/09/…Klement
F
0

if you didn't write the original code and aren't 100% sure on how it works, make sure that you have it set up to receive the right type of push notification token. had a problem where the app i was working on was only set up tokens on a release build. it's worth a try if nothing else works and you think your code is set up properly -- find the steps online somewhere to do a ad-hoc build and try it

Fanchie answered 9/1, 2013 at 17:23 Comment(0)
A
0

It'll work even with a development profile but if you add in APN (Apple Push Notifications) after the fact make sure to go into member center and open the provisioning profile again (my said invalid), just opening it and closing it made it valid again and then I updated my profiles in Xcode via settings and everything worked just fine.

Anneliese answered 27/3, 2014 at 17:14 Comment(0)
B
0

In my case, I renamed the App. So the provisioning profile was generated for the old App-ID. All I had to do, was to change the App-ID and add an new provisioning profile with the new App-ID.

Bixler answered 17/8, 2014 at 18:32 Comment(0)
H
0

For IONIC USERS:-

CAUSE:- If you are running your app in iphone using "ionic run ios" then this will also cause the same problem. SOLUTION:- instead you must run your ios app using XCODE to install app into iphone.

SOLVED MY PROBLEM!!!!

Hepzi answered 17/8, 2017 at 11:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.