Reputation: 661
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.
Upvotes: 2
Views: 4439
Reputation: 1650
Check below points before you build an application:
Open your provisional profile which you are using to build the app in TextEdit.
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.
Upvotes: 0
Reputation: 6197
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.
Upvotes: 1
Reputation: 151
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 !
Upvotes: 1
Reputation: 19834
I saw this once... here's what I did to fix it:
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.
Upvotes: 0