iOS APNS配置(转)
Introduction
To send Push notification to an application/device couple you need an unique device token (see the ObjectiveC page) and a certificate.
Generate a Push Certificate
To generate a certificate on a Mac OS X:
- Log-in to the iPhone Developer Program Portal
- Choose App IDs from the menu on the right (or click here)
- Create an App ID without a wildcard. For example 3L223ZX9Y3.com.armiento.test
- Click the Configure link next to this App ID and then click on the button to start the wizard to generate a new Development Push SSL Certificate (Apple Documentation: Creating the SSL Certificate and Keys)
- Download this certificate and double click on aps_developer_identity.cer to import it into your Keychain
- Launch Keychain Assistant (located in Application, Utilities or search for it with Spotlight) and click on My Certificates on the left
- Expand Apple Development Push Services and select Apple Development Push Services AND your private key (just under Apple Development Push Services)
- Right-click and choose "Export 2 elements..." and save as server_certificates_bundle_sandbox.p12 (don't type a password).
- Open Terminal and change directory to location used to save server_certificates_bundle_sandbox.p12 and convert the PKCS12 certificate bundle into PEM format using this command (press enter when asked for Import Password):
openssl pkcs12 -in server_certificates_bundle_sandbox.p12 -out server_certificates_bundle_sandbox.pem -nodes -clcerts
- Now you can use this PEM file as your certificate in ApnsPHP!
Verify peer using Entrust Root Certification Authority
Download the Entrust Root Authority certificate directly from Entrust Inc. website:
- Navigate to https://www.entrust.net/downloads/root_index.cfm
- Choose "Personal Use"
- Download the Entrust CA (2048) file (entrust_2048_ca.cer) https://www.entrust.net/downloads/binary/entrust_2048_ca.cer for the Sandbox environment; download the Entrust Secure Server CA file (entrust_ssl_ca.cer) https://www.entrust.net/downloads/binary/entrust_ssl_ca.cer for the Production environmentuntil December 22nd (after December 22nd, 2010 you have to use entrust_2048_ca.cer also for the Production Environment as Apple said: "To ensure you can continue to validate your server's connection to the Apple Push Notification service, you will need to update your push notification server with a copy of the 2048-bit root certificate from Entrust's website.").
If you want to use the same file for the Sandbox and the Production environment please concat the two certificates. For example:
wget https://www.entrust.net/downloads/binary/entrust_2048_ca.cer -O - > entrust_root_certification_authority.pem
echo >> entrust_root_certification_authority.pem
wget https://www.entrust.net/downloads/binary/entrust_ssl_ca.cer -O - >> entrust_root_certification_authority.pem
Otherwise (for use only in a Mac OS X environment), export the Entrust Root Authority certificate:
- Launch Keychain Assistant (located in Application, Utilities or search for it with Spotlight) and click on System Root Certificate on top-left and Certificates on the bottom-left
- Right-click on Entrust Root Certification Authority and export with entrust_root_certification_authority.pem file name and choose as document format Privacy Enhanced Mail (.pem).
- Now you can use this PEM file as Entrust Root Certification Authority in ApnsPHP to verify Apple Peer!
iOS APNS配置(转)的更多相关文章
- iOS APNs实战分享
序言: 因为App的功能需要,最近一直在调研苹果的APNs推送,开始时觉得超麻烦,现在感觉还是比较easy,“难者不会,会者不难”,自己踩过了这么多的坑终于会了,不出来吐槽(装X)一下对不起自己,23 ...
- IOS APP配置.plist汇总(转自coolweather )
IOS APP配置.plist汇总(转自coolweather ) 此文转自http://www.cocoachina.com/bbs/read.php?tid=89684&page=1 作者 ...
- erlang -- ios apns provider -- erlang 实现
os apns-apple notification server 与第三方provider的通信原理网上已有很多介绍,这里不再介绍,有想了解的大家可以去IOS官网https://developer. ...
- Apache Cordova for ios环境配置
原文:Apache Cordova for ios环境配置 1.安装针对iOS的工具 https://technet.microsoft.com/ZH-cn/library/dn757054.aspx ...
- iOS 应用配置及证书生成教程
简介 首先你需要有一个苹果的开发者帐号,一台苹果电脑.点击查看苹果开发者账号注册流程 本教程需完成应用信息配置,包括如下两个基本配置: AppID Bundle ID 同时,生成 如下三个证书文件及对 ...
- 光程科技IOS签名配置
光程科技IOS签名配置,APICloudAPP签名时config配置必须加上: <preference name="appCertificateVerify" value=& ...
- jenkins自动化构建iOS应用配置过程中遇到的问题
最近配置jenkins来自动构建iOS应用,期间遇上不少问题.在这里分享给大家,也给自己留个底,方便下次解决问题. 首先说明下基本情况,我们因为部署jenkins的机器不是Mac,所以不能安装Xcod ...
- iOS - Xcode 配置
1.Xcode 配置 1.1 OS X 1)main 文件注释修改路径: /Applications(应用程序) ▸ Xcode.app ▸ Contents ▸ Developer ▸ Librar ...
- vue.js 配置移动端的url Scheme和iOS端配置url Scheme
假如urlScheme:baibai:// 一.vue.js端的配置: 1.通过html标签跳转: <p href="baibai://"></p> 2.通 ...
随机推荐
- c中的进制与内存分析
一. 进制 1. 什么是进制 l 是一种计数的方式,数值的表示形式 数一下方块的个数 汉字:十一 十进制:11 二进制:1011 八进制:13 l 多种进制:十进制.二进制.八进制.十六进制. ...
- 基于 LocalAuthentication 框架的指纹解锁
效果 想必大家对 iPhone 的指纹解锁功能已经相当的熟悉了.来看看效果吧! Local Authentication 概述 Local Authentication 框架提供了按照指定的安全策略请 ...
- rabbitmq_management 安装失败
安装rabbitmq_management的时候出现错误 不能连接rabbit,所以查看状态 看意思感觉好像是rabbit没有运行,但是安装的时候都是默认安装的,所以安装完以后服务的名字就是Rabbi ...
- flashdevelop生成swc库
flashdevelop没有直接支持生成swc的工程,但flashdevelop生成swc也比较方便,不用任何插件. swc库是由 flexsdk的compc.exe生成的,其实我们通过这个命令行也可 ...
- 关于<appSettings file="app.config" >引用外部文件的配置值
web.config文件中,appSetting节点引用了外部的配置文件, <appSettings file="app.config"> </appSettin ...
- (视频)《快速创建网站》 3.3 国际化高大上 - WordPress多语言支持
本文是<快速创建网站>系列的第7篇,如果你还没有看过之前的内容,建议你点击以下目录中的章节先阅读其他内容再回到本文. 访问本系列目录,请点击:http://devopshub.cn/tag ...
- css3:盒模型以及box-sizing属性
文档中的每个元素被描绘为矩形盒子.渲染引擎的目的就是判定大小,属性——比如它的颜色.背景.边框方面——及这些盒子的位置.在CSS中,这些矩形盒子用标准盒模型来描述.这个模型描述了一个元素所占用的空间. ...
- Git笔记1
1.简介 1.1 GIT(分布式版本控制系统) Git是一款免费.开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目. Git是一个开源的分布式版本控制系统,用以有效.高速的处理从很小到非 ...
- [20140928]创建连接到MySQL的连接服务器
首先要安装 mysql odbc 然后 odbc下创建DSN,并且要在系统DSN下. 最后执行 exec sp_addlinkedserver @server= 'XY', --这是链 ...
- android Eclipse执行项目提示错误: unable to execute dex: GC orerhead limit exceeded
Eclipse执行项目提示错误: unable to execute dex: GC orerhead limit exceeded 解决方法: 找到Eclipse安装目录的文件,\eclipse\e ...