I\'ve read Where does xcode take application's Identifier from? , XCode bundle identifier formatting from {PRODUCT_NAME} , and loads more but...
I\'m trying to g
Make the profile right and this work for me.Hope this help.
Essentially the answer is the same vague one everyone else says
Repeat these steps calmly until it works, took me about five goes of various combinations. I also switched from Development to Ad-hoc which apparently isn't necessary but did guarantee a new mobileprovision file.
I had this problem, the scenario was:
I had setup an app id without push notifications support. I'm using Xcode 5.1 + iOS 7.1
Later, edited the app id to add push notifications in development and production.
Created the APNs certificates for both.
When you test PN using your device attached to Xcode, everything works ok. The problem appears when you release the app to production, you keep getting:
"Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string
found for application" UserInfo=0x15b200 {NSLocalizedDescription=no valid
'apsenvironment' entitlement string found for application}" error.
The solution that worked for me was:
Under 'Project' -> 'Build Settings' -> 'Code Signing', make sure you have selected the correct Provisioning profile (the one with push enabled).
That was all I needed to change in order to make it work.
Make sure that you are using the app in the correct way with the provisioning profile.
What I mean is that if you've enabled your app for Push notifications for Distribution only, and you are trying to get push notifications to work via building with XCode, this will not work.
I ran into this problem, and by enabling push notification for Development for the App ID, and then using the development provisioning profile I no longer got the error and the correct alert view asked if I wanted to get push notifications.
Actually your provisional profile deleted from apple developer site.& you get error for