利用pyapns进行ios推送
openssl x509 -in aps_development.cer -inform der -out push_cert.pem
openssl pkcs12 -in pushdevelopment.p12 -out push_key.pem -nodes
cat push_cert.pem push_key.pem > jt_develop.pem
openssl s_client -connect gateway.sandbox.push.apple.com: -cert jt_develop.pem
- a9 7e 8c f5 ac-e5 1d 6e 9f e9 .~'!.....#n..x.
- a5 ee 2c b0 4e- d5 1e 1b ab ...,.8cN).....p
- c5 7a b6 cc -9e 6b b2 a3 F.z....q.ke.W...
- b7 bd f3 c3 -da af e0 a3 8a b8 2f .....8ue...y.../
- 2f 4d d0 de 3e 3c dd 4d-d8 3b b5 ca /M..><.M..;.U...
05a0 - c0 e3 4d 1f b3 - 7e 2d bd 8a e0 ...M..ib2~-..b..
05b0 - ae 4d 1e c7 e7 5b 2b fe-5b a2 6e 0c 5f f7 .M...[+.[.%n._..
05c0 - d6 dd e1 7a-cc 0b ef 9c 8f 9c B...#..z...G8...
05d0 - 2e dd af b4 0a - dc ae d6 e8 c9 .e.....0YF....V.
05e0 - bb d2 f7 ab 2c-a1 d1 f0 aa 8d .E.v..,...&.@..
05f0 - 0b c7 a8 bd f1 -5f d0 8f b5 .U.V...$_...B.W.
- d8 1c b4 f4- 5c 7a a8 .).C..d.FG..\z5.
- 7d e6 ae e0 0e -cf e0 5d f5 b1 }...V..q..]X....
- 1b b0 a1 f8 4b-0c c8 c9 ......%K....A...
- 0f 7a ca b8 ec f0 6f-e9 cf 6a 9d 5b .z.t...o..uj...[ Start Time:
Timeout : (sec)
Verify return code: (ok)
---
pip install twisted
pip install pyapns
中间可能需要安装其他库,总之缺少什么就安装什么。
twistd -r epoll web --class=pyapns.server.APNSServer --port=
这样就启动了,运用的时候,直接像它介绍的,就几条命令
from pyapns import configure, provision, notify
configure({'HOST': 'http://localhost:7077/'})
provision('com.test1.ddd', open('jt_develop.pem').read(), 'sandbox')
notify('com.test1.ddd', 'hexlified_token_str', {'aps':{'alert': 'Hello!'}})
利用pyapns进行ios推送的更多相关文章
- python使用pyapns进行ios推送消息
Pyapns 提供了通用的Apple Push Notification Service (APNS).该解决方案使用了开源的Twisted server,支持原生的Python和Ruby API. ...
- iOS 推送全解析
本文旨在对 iOS 推送(以下简称 推送)进行一个完整的剖析,如果你之前对推送一无所知,那么在你认真地阅读了全文后必将变成一个推送老手,你将会对其中的各种细节和原理有充分的理解.以下是 pikacod ...
- iOS推送证书转pem文件
iOS推送证书转 .pem文件. 推送证书转pem文件openssl x509 -in apns_miaobozhibo.cer -inform der -out apns_miaobozhibo.p ...
- IOS 推送-客户端处理推送消息
IOS 推送-客户端处理推送消息 1.推送调用顺序 APN push的消息到达后,UIApplicationDelegate有两个方法和处理消息有关: 1)application:didReceive ...
- IOS 推送-配置与代码编写
IOS 推送配置与代码编写 这里介绍IOS的推送,本文章已经在IOS6/7/8上都能运行OK,按照道理IOS9应该没问题. 大纲: 1.文章前提 2.推送介绍 3.推送文件账号设置 4.推送证书介绍 ...
- IOS 推送消息 php做推送服务端
IOS推送消息是许多IOS应用都具备的功能,最近也在研究这个功能,参考了很多资料终于搞定了,下面就把步骤拿出来分享下: iOS消息推送的工作机制可以简单的用下图来概括: Provider是指某个iPh ...
- 友盟iOS推送配置(从真机调试到推送)
下面我来讲解一下友盟iOS的推送配置,其实友盟只是一个示例,换做其余的第三方推送服务也会适用,只是第三方的后面服务变了而已. iOS推送(包括真机调试)所需要的步骤和文件如下: 备注:这里我将省略掉一 ...
- “iOS 推送通知”详解:从创建到设置到运行
这是一篇编译的文章,内容均出自Parse.com的iOS开发教程,同时作者还提供了视频讲解.本文将带领开发者一步一步向着iOS推送通知的深处探寻,掌握如何配置iOS推送通知的奥义. 介绍一点点背景资料 ...
- 转载:iOS 推送的服务端实现
参考网址1: iOS消息推送机制的实现 http://www.cnblogs.com/qq78292959/archive/2012/07/16/2593651.html 参考网址2: iOS 推送的 ...
随机推荐
- android EditText内嵌图片
如下所示: 主要用到的属性:android:drawableLeft <EditText android:layout_width="match_parent" androi ...
- CSS之Position详解
CSS的很多其他属性大多容易理解,比如字体,文本,背景等.有些CSS书籍也会对这些简单的属性进行大张旗鼓的介绍,而偏偏忽略了对一些难缠的属性讲解,有避重就轻的嫌疑.CSS中主要难以理解的属性包括盒型结 ...
- 交叉编译环境以及开发板上-/bin/sh: ./hello: not found(使用arm-linux-gcc -static -o 来进行静态编译)
目标板是S3C2440.至于交叉编译环境的搭建就不多说了,网上很多教程. 搭建好了交叉编译环境后,第一件事就是传说中的”Hello,World!”. 一. 主机编译环节 我使用的系统是ubuntu10 ...
- Getting Text Metrics in Firemonkey(delphiscience的博客)
Firemonkey’s abstract TCanvas class has been providing the dimensions of the bounding rectangle of s ...
- 子句判断、启动强度和去模糊化--AForge.NET框架的使用(三)
原文:子句判断.启动强度和去模糊化--AForge.NET框架的使用(三) 使用AForge.NET进行模糊运算 上一篇说来一些模糊运算的数学问题,用AForge.NET做相关运算就很简单了. 1.联 ...
- Android手势操作
xml文件 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:to ...
- CCF 送货 + 欧拉路模板
#include <bits/stdc++.h> using namespace std; stack<int> st; vector<]; ][]; ],cp[]; i ...
- SQL Server 各任务所维护
SQL Server 正在运行的代码查看 SELECT [Spid] = session_id , ecid , [Database] = DB_NAME(sp.dbid) , [User] = nt ...
- NetAnalyzer笔记 之 十 通过邮件方式打造自己的bug反馈模块(C#)
在软件发布后,有个好的反馈系统,对我们后续的软件开发有着至关重要的影响,现今软件异常反馈功能模块已经成了软件中重要的组成部分了.但是对于个人软件开发者,尤其是对于我这种贫民个人软件开发者却是个不小的难 ...
- (转)iOS如何取得APP的版本信息跟服务器对比进行升级提示?
关键是自动取版本信息: [NSString stringWithFormat:@"Version %@",[[NSBundle mainBundle] objectForInfoD ...