0

The XCode error generated:

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

I have generated App ID with APNS enabled (the Development one).
And have created a new provisioning profile with this App ID, and installed it in XCode for use.

I think the problem is the "iOS Team Provisioning Profile: *" profile. Its AppID is the one which I generated several months ago, with no APNS enabled, and I don't use it anymore.
But the problem is, I can't edit/delete it! Everytime I "deleted" it by clicking delete in the apple portal, it would appear again.

The reason why I think the problem comes from this is because I opened this provisioning profile to see the text, I can't find the aps-environment, while I can find this tag in the provisioning profile that is newly created with the new APNS-enabled App ID.

I have also included the new provisioning profile in my iPhone in which my app is installed. But I feared that it's because of that old provisioning profile(i.e. iOS Team Provisioning Profile: *) always appear in the device, too.

Or it may be because of other reasons. Hope someone can give me ideas to tackle the problem.

dannail
  • 455
  • 2
  • 10
  • 27
  • You can remove old profiles from iPhone too From Settings->Profiles Just select profile to be removed and click on remove profile button from detailed view of profile. – Janak Nirmal Feb 01 '12 at 07:31

2 Answers2

0

The Apple documentation that explains creating the provisioning profile for an application that is enabled for push notifications mentions that the "wildcard" application ID can't be used. This means that a Team Provisioning profile can't be used to sign an application that is registering for push notifications (there is no aps-environment key in a Team Provisioning Profile).

You can't remove application id. See this post. And as long as there is a "wildcard" AppID XCode will automatically create a Team Provisioning Profile for that ID any time you try to refresh the provisioning profile in XCode Organizer. So looks like it is not possible to to get rid of the Team Provisioning Profile in XCode once it has been created.

Community
  • 1
  • 1
Greg
  • 8,230
  • 5
  • 38
  • 53
0

I got this error message once and figured out I did not assigned the newly generated profile in my app

You do that by going to your Projects Build Settings. Search for Code Signing Identity and in your case set the mentioned development profile with APNS enabled under Debug according to your needs. (You can find similar setting in your Targets Build Settings)

Code Signing

reggian
  • 627
  • 7
  • 21