2

I have this error:

Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x18cb70 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}

I can't figure this out. I did everything.I reinstalled the certificates a thousand times and this i still have this error.I have set aps-environment in the Entitlements.plist file.My Apple Development Push Certificate is in the keychain. The provisioning profiles has the push notification enabled. I have set the correct bundle. What can i do.I need solutions.Thanks.

4
  • Does this occur when you are registering for Notifications i.e. when calling registerForRemoteNotificationTypes? The Push certificate has nothing to do with the device and is only used by the server that is trying to push the message. Commented Apr 18, 2011 at 9:45
  • Yes.This is when error occurs . Commented Apr 18, 2011 at 9:57
  • See the other question I posted in my answer. This deals with the same issues you are experiencing. Commented Apr 18, 2011 at 9:58
  • So how can i check with what provisioning profile i am signing the app. Commented Apr 18, 2011 at 10:01

4 Answers 4

1

One thing I've not seen in the answers to many of the APNS questions is:

If your project has multiple targets, make sure you are selecting the target you are RUNNING and changing the Code Signing Identity in that target !

Sign up to request clarification or add additional context in comments.

Comments

1

Simple,

Delete the old provisioning profile and

Create a new provisioning file, after you enable push in the App ID.

This will work for sure.

Comments

0

I saw this once... here's what I did to fix it:

  1. Click on your project (to access its settings)
  2. Go to "Build Settings"
  3. On "Code signing" select the exact profile you want to use

You should have a full AppId (not a wildcard one). If it's XXXXXX.*, you should create a new AppId so that it becomes XXXXXX.com.example.YourApp, generate a profile for it, and use it to sign your app.

Comments

0

Check below points before you build an application:

  1. Open your provisional profile which you are using to build the app in TextEdit.

  2. Make sure that provisional profile consists of key: "aps-environment". It can have 2 values i.e., "development" and "production" based upon the environment of the profile. If not then you have to make new provisional profile by adding APNS certificate to its AppId.

If the above things on place then try to build the app. Hope this helps.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.