由于公司业务需求,以前一直做PHP开发,突然让我研究push notification ,一下子迷糊啦,不知所措,抓狂!但是在自己的努力下还是初有成效!现拿出来显摆一下!

1:push notification 的流程及其原理

  1. 应用启用推送通知功能,需要用户确认;
  2. 应用收到设备识别ID(device token),相当于接收推送通知的地址;
  3. 应用将设备识别ID发送到你开发的服务器;
  4. 当有推送通知的需要时,你就可以通过你开发的服务组件发送信息到苹果的服务器上;
  5. 苹果推送通知服务将信息推送到用户的设备上。

2:生成证书文件

这部分是有我们的制作人生成,提供以.cer和.p12文件并且包含.p12文件的密码,然后使用php生成以.cer结尾的证书和密码,为将来发送push做准备!具体PHP代码如下:

<1>:cer文件生成pem文件

  system('openssl x509 -in .cer证书文件 -inform der -out .cer生成的文件名.pem');

 <2>:p12文件生成pem文件 

   system('openssl pkcs12 -nocerts -out .p12文件生成文件名.pem -in .p12文件名 -passin pass:.p12文件密码 -passout pass:.p12生成文件密码);

<3>:将第一步和第二步生成的文件合并最终文件

  system('cat  .cer生成的文件名.pem  .p12文件生成文件名.pem > 最终文件名.pem);

3:获取用户device token

如果是自己开发的app,则只需要写一个接口,用来收集用户的device token,如果使用adodb的发布系统则使用一下方法来转换device token,进而搜集用户的device token。

4:

push notification for iphone的更多相关文章

  1. iOS上简单推送通知(Push Notification)的实现

    iOS上简单推送通知(Push Notification)的实现 根据这篇很好的教程(http://www.raywenderlich.com/3443/apple-push-notification ...

  2. 远程通知APNs(Apple Push Notification Server)

    推送通知是由应用服务提供商发起的,通过苹果的APNs(Apple Push Notification Server)发送到应用客户端.下面是苹果官方关于推送通知的过程示意图: 推送通知的过程可以分为以 ...

  3. (转)How to renew your Apple Push Notification Push SSL Certificate

    转自:https://blog.serverdensity.com/how-to-renew-your-apple-push-notification-push-ssl-certificate/ It ...

  4. (转)How to build an Apple Push Notification provider server (tutorial)

    转自:https://blog.serverdensity.com/how-to-build-an-apple-push-notification-provider-server-tutorial/ ...

  5. (转)Apple Push Notification Services in iOS 6 Tutorial: Part 2/2

    转自:http://www.raywenderlich.com/32963/apple-push-notification-services-in-ios-6-tutorial-part-2 Upda ...

  6. (转)Apple Push Notification Services in iOS 6 Tutorial: Part 1/2

    转自:http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1 Upda ...

  7. (转)苹果推送通知服务教程 Apple Push Notification Services Tutorial

    本文译自http://www.raywenderlich.com/.原文由iOS教程团队 Matthijs Hollemans 撰写,经原网站管理员授权本博翻译. 在iOS系统,考虑到手机电池电量,应 ...

  8. Push Notification总结系列(一)

    Notification系列概括: 1.Push Notification简介和证书说明及生成配置 2.Push Notification的iOS处理代码和Provider详解 3.Push Noti ...

  9. 陌陌架构分享 – Apple Push Notification Service

    http://blog.latermoon.com/?p=878 先描述下基本概念,标准的iPhone应用是没有后台运行的,要实现实时推送消息到手机,需要借助Apple提供的APNS服务. iPhon ...

随机推荐

  1. Centos自动登录系统并自动打开VNC Server

    系统自动登录 修改配置文件 sudo vim /etc/gdm/custom.conf 增加配置 [daemon] AutomaticLogin=spark AutomaticLoginEnable= ...

  2. 我cnblogs的主题

    我的cnblogs主题 这里记录的是本博客的主题存档 主题代码参考自:流云诸葛的博客 博客皮肤选择 选择 LessIsMore 页面定制CSS代码 div.post div.entry { font- ...

  3. Linux shell 脚本攻略之生成任意大小的文件

    摘自:<Linux shell 脚本攻略>

  4. PHP.9-HTML+CSS(三)-CSS样式

    CSS样式 CSS是Cascading Style Sheets的简写,它除了可以轻松设置网页元素的显示位置和格式处,甚至还能产生滤镜,图像淡化,网页淡入淡出的渐变效果.CSS就是要对网页的显示效果实 ...

  5. SSH Spring3\Java1.8 “Unable to instantiate Action, xxAction, defined for 'xxAction_login' in namespace '/'null”

    1.Stacktraces Unable to instantiate Action,xxAction, defined for 'xxAction_login' in namespace '/'nu ...

  6. uva 699 The Falling Leaves dfs实现

    额,刘汝佳小白里面的配套题目. 题目求二叉树同垂直线上结点值的和. 可以用二叉树做,挺水的其实. 尝试使用dfs实现了:开一个大点的数组,根节点为最中间那点,然后读取时就可以进行和的计算了. 代码: ...

  7. 关于JDK中采用单例模式的类

    JDK设计模式应用——单例模式(Singleton) <JDK源码分析>的分支,讲解设计模式在jdk中使用. 我们从三个方面讲述,一是:jdk源码中的设计模式:二是:讲解设计模式(UML图 ...

  8. Linux 命令 - head: 打印文件的开头部分

    命令格式 head [OPTION]... [FILE]... 命令参数 -c, --bytes=[-]K 显示每个文件的前 K 字节内容. -n, --lines=[-]K 显示每个文件的前 K 行 ...

  9. Linux 命令 - rm: 删除文件和目录

    命令格式 rm [OPTION]... FILE... 命令参数 -f, --force 强制删除,忽略不存在的文件,不会提示. -i, --interactive 没次删除文件时,提示用户确认. - ...

  10. Java -- Thread中start和run方法的区别

    一.认识Thread的 start() 和 run() 1.start(): 我们先来看看API中对于该方法的介绍: 使该线程开始执行:Java 虚拟机调用该线程的 run 方法. 结果是两个线程并发 ...