apns 是否需要为每个应用程序开发提供证书? [英] Does apns needs certificates for each app development?

查看:30
本文介绍了apns 是否需要为每个应用程序开发提供证书?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了配置文件和应用程序 ID 以及证书 &为我的一个应用程序启用推送通知的所有过程,如果我想为我的第二个应用程序启用 apns 服务,我应该使用相同的证书还是创建其他配置文件和 appid &证书.我正在使用相同的证书,但出现以下错误.

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.

获取令牌失败,错误:错误域=NSCocoaErrorDomain Code=3000没有为应用程序找到有效的‘aps-environment’授权字符串" UserInfo=0x1cd26cb0 {NSLocalizedDescription=没有为应用程序找到有效的‘aps-environment’授权字符串}

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,建立 Apple Push Notification Service 的关键在于:

Siva, what matters for establishing an Apple Push Notification Service is:

  • 应用 ID
  • 应用的捆绑 ID,每个应用都是唯一的.
  • 配置文件 [开发/分发] 取决于您的环境.
  • 然后是 SSL 证书.

  • 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.

所以对于您的第一个问题 - 您不能为两个应用程序使用相同的证书,这两个应用程序具有不同的捆绑 ID.因为 SSL 证书是为特定的捆绑 ID 创建的.你可以从你的钥匙链上看到这一点.

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.

对于新应用,我建议您创建新 ID、新捆绑 ID、新配置文件和非课程新证书.所以没有理由寻求任何混淆.

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.

如果上述错误仍然存​​在,您可以参考这些链接——这些都是非常有价值的答案.如何修复无效"为应用程序找到的 aps-environment' 授权字符串在 Xcode 4.3 中?

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?

从推送通知中获取错误

找不到有效的aps-environment"授权字符串申请

这篇关于apns 是否需要为每个应用程序开发提供证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆