Why my APNs push certificate did not work?
来源:互联网 发布:excel 数据连接 编辑:程序博客网 时间:2024/06/06 18:37
我的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。
0 0
- Why my APNs push certificate did not work?
- Why my update method dose 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 does my Authorize Attribute not work-
- Why "RefreshRecord" does not work
- Why NOT Use My Index
- Not get deviceToken yet. Maybe: your certificate not configured APNs?
- why will unity not work with %AppData%
- 【IoT】SSL3_GET_CLIENT_CERTIFICATE:peer did not return a certificate
- Why won't my ASP pages work in IIS 6.0?
- Why did the size of my indexes expand when I rebuilt my indexes?
- Afaria服务器配置APNS Push Certificate (for Mobile Device Management)失败
- Why does “extern const int n;” not work as expected?
- C# The designer loader did not provide a root component but has not indicated why.
- Why Pascal is Not My Favourite Programming Language
- LeetCode OJ算法题(五十九):Permutation Sequence
- ios--UITabBarController的基本用法3
- c#程序以管理员身份运行(三种办法)
- hdu 1565 方格取数(1)
- Qt构建及编译出错问题及解决方案
- Why my APNs push certificate did not work?
- 嵌入式 tasklet使用workqueue示例
- 一个可以自动生成静态库,自动安装程序的Makefile
- gcc常用命令
- ACdream区域赛指导赛之手速赛系列(4) A Bad Horse
- C语言思想14
- ubuntu 14.04 添加 CPU 温度 在面板标题栏上
- Android中使单选项列表框默认选中前次保存的值(即setSingleChoiceItems方法的使用)
- 析构函数不能抛出异常