c#上iOS apns p12文件制作记录 iOS推送证书制件
2016-02-01 10:42
405 查看
前期一些准备工作可参考:http://jingyan.baidu.com/article/7082dc1c6bb86de40a89bd1a.html
1.在桌面上建一个"apns_p12"文件夹,所有的保存和生成文件都放在这里
2.从钥匙串中生成CertificateSigningRequest.certSigningRequest
打开钥匙串访问(钥匙串访问--->证书助理--->从证书颁发机构请求证书...)
3.从服务器上下载aps_development.cer和aps_production.cer文件,并双击导入到本机
到Identifiers中建一个App IDs,要选择打开Push Notifications功能,建好App IDs后,再到Certificates(证书)里面新建Development和Production对应的推荐证书。
4.从将"系统"钥匙串中“证书”的:Apple Development iOS Push Services:com.xxx.xxx和Apple Production iOS Push Services:com.xxx.xxx两项,拖到“登录”钥匙串中(因为在“系统”中时,无法导出成p12文件)
5.将以上两项分别,导出p12文件,将设置好密码,命名为:apns_development.p12和apns_Production.p12
6.打开“终端”命令行工具,输入:
7.最终生成了,final_push_development.p12和final_push_production.p12文件,把他们放在网站的根目录中就可以了
1.在桌面上建一个"apns_p12"文件夹,所有的保存和生成文件都放在这里
2.从钥匙串中生成CertificateSigningRequest.certSigningRequest
打开钥匙串访问(钥匙串访问--->证书助理--->从证书颁发机构请求证书...)
3.从服务器上下载aps_development.cer和aps_production.cer文件,并双击导入到本机
到Identifiers中建一个App IDs,要选择打开Push Notifications功能,建好App IDs后,再到Certificates(证书)里面新建Development和Production对应的推荐证书。
4.从将"系统"钥匙串中“证书”的:Apple Development iOS Push Services:com.xxx.xxx和Apple Production iOS Push Services:com.xxx.xxx两项,拖到“登录”钥匙串中(因为在“系统”中时,无法导出成p12文件)
5.将以上两项分别,导出p12文件,将设置好密码,命名为:apns_development.p12和apns_Production.p12
6.打开“终端”命令行工具,输入:
cd /users/bill/desktop/apns_p12 openssl x509 -in aps_development.cer -inform der -out push_development.pem openssl x509 -in aps_production.cer -inform der -out push_production.pem openssl pkcs12 -nocerts -out push_p12_development.pem -in apns_development.p12 //需要输入密码 openssl pkcs12 -nocerts -out push_p12_production.pem -in apns_production.p12 //需要输入密码 openssl pkcs12 -export -in push_development.pem -inkey push_p12_development.pem -certfile CertificateSigningRequest.certSigningRequest -name "final_push_development" -out final_push_development.p12 //需要输入密码 openssl pkcs12 -export -in push_production.pem -inkey push_p12_production.pem -certfile CertificateSigningRequest.certSigningRequest -name "final_push_production" -out final_push_production.p12 //需要输入密码 复制代码
7.最终生成了,final_push_development.p12和final_push_production.p12文件,把他们放在网站的根目录中就可以了
相关文章推荐
- iOS 引导页
- iOS 关于信鸽推送点击推送通知的处理
- (NO.00005)iOS实现炸弹人游戏(九):游戏主角(二)
- (NO.00005)iOS实现炸弹人游戏(九):游戏主角(二)
- (NO.00005)iOS实现炸弹人游戏(九):游戏主角(二)
- ios创建画笔的样例(双笔画效果)
- iOS中的webView加载HTML
- 07-应用管理(字典转模型)
- 转载:IOS 进入前台后台调用方法说明
- iOS常见错误整理
- ios 正則表達式替换
- 对于iOS 7 隐藏特性和解决之道
- (NO.00005)iOS实现炸弹人游戏(八):游戏主角(一)
- (NO.00005)iOS实现炸弹人游戏(八):游戏主角(一)
- (NO.00005)iOS实现炸弹人游戏(八):游戏主角(一)
- iOS用三种途径实现一方法有多个返回值
- IOS使用Launch Screen.storyboard制作广告启动界面
- IOS开发之——蓝牙通信浅谈
- IOS-51-改变字符串中指定字符的颜色
- ios9 第三方SDK无法回调问题