Does apns needs certificates for each app development?

半城伤御伤魂 提交于 2019-12-23 05:12:35

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/17229276/does-apns-needs-certificates-for-each-app-development

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!