Why my APNs push certificate did not work?
2014-08-08 21:52
423 查看
我的Apple 消息推送程序在开发环境中工作得很好,但当我使用生产环境时,悲剧产生了,无论如何设备都不能收到任何消息。为这个问题我已经 dig 很久了。stackoverflow 上有许多答案,但没有找到任何答案能解决我的问题。直到我找到这篇文章:http://stackoverflow.com/questions/7737343/push-notification-issue-in-adhoc-distribution/7737640#7737640
这真正帮到了我。原来,App 如果未上架,APNs 不会接收任何开发证书发送的消息,所以根本不可能发送给以 ad-hoc 方式发布的 app。于是,当我从商店上安装 app 之后,生产证书发送的消息如期而至。原来,为了方便测试,我的 release 部署采用的就是 ad-hoc。Nekto 还发现了以下规律:1、下载 Ad-hoc provision profile。2、用任意编辑器打开它。3、查找键 <key>aps-environment</key>4、它的值是否为 <string>production</string>?5、如果是,则可以用生产的证书发送消息给 ad-hoc app。如果是 development 则应该用开发证书来发送消息给 ad-hoc app。
这真正帮到了我。原来,App 如果未上架,APNs 不会接收任何开发证书发送的消息,所以根本不可能发送给以 ad-hoc 方式发布的 app。于是,当我从商店上安装 app 之后,生产证书发送的消息如期而至。原来,为了方便测试,我的 release 部署采用的就是 ad-hoc。Nekto 还发现了以下规律:1、下载 Ad-hoc provision profile。2、用任意编辑器打开它。3、查找键 <key>aps-environment</key>4、它的值是否为 <string>production</string>?5、如果是,则可以用生产的证书发送消息给 ad-hoc app。如果是 development 则应该用开发证书来发送消息给 ad-hoc app。
相关文章推荐
- Why does my Authorize Attribute not work-
- Why does my Authorize Attribute not work-
- Why my setting does not work?
- Why my update method dose not work?
- Why does my shared clipboard not work?
- Why does my Authorize Attribute not work?
- Why does my Authorize Attribute not work-
- Why does my Authorize Attribute not work-
- Why does my Authorize Attribute not work-
- Why Copied Yocto Cross Toolchain Not Work
- The ultimate SO_LINGER page, or: why is my tcp not reliable
- Why C Is Not My Favourite Programming Language
- why tuckey UrlRewriteFilter outbound-rule mapping did not work?
- git问题小结:ssh方式push代码时出现did not exit cleanly (exit code 128)
- freeradius 错误: error:140890C7:SSL routines:ssl3_get_client_certificate:peer did not return a certificate
- 【IoT】SSL3_GET_CLIENT_CERTIFICATE:peer did not return a certificate
- [导入]Why does my Windows Form project not use visual styles in XP even when I call Application.EnableVisualStyles?
- error: failed to push some refs to ‘http://git.du.com/目录/项目名称.git’ [ git did not exit cleanly (exit
- Why is &quot;opatch auto&quot; not patching my RAC database home?
- Why Pascal is Not My Favourite Programming Language