I have created provisioning profile and app id and certificates & all of the process to enable push notification for one of my app, if I want to enable apns service for my second app shall I use same certificate or shall I create other provisioning profile and appid & certificates. I am using same certificates but I am getting following error.
Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x1cd26cb0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
Even I am creating new certificate I am getting same error.where iam going wrong?i was struggling from few days help me
Siva, what matters for establishing an Apple Push Notification Service is:
- App Id
- Bundle Id of the app which is unique to each app.
- Provisioning profile [development/distribution] depends on your enviornment.
Then the SSL certificates.
So for your first question- you cannot use same certificates for two apps,which are having different bundle Id's. Because an SSL certificate is creating for a particular bundle Id. You can see that from your key chain.
For the new app I would suggest you to create new Id, new bundle Id, new provisioning profile and offcourse new certificates. So there is no reason for any sought of confusions.
If the above mentioned error still prevails, you can refer these links- these are really worthy answers.
How to fix "no valid 'aps-environment' entitlement string found for application" in Xcode 4.3?
Getting an error from push notification
no valid 'aps-environment' entitlement string found for application