1. If APNs attempts to deliver a notification but the device is offline, the notification is stored for a limited period of time, and delivered to the device when it becomes available.

假如用户手机不在线。可能没有信号或者关机吧。APNs会存储转发。等用户在线时再发送

 

2.Only one recent notification for a particular application is stored. If multiple notifications are sent while the device is offline, each new notification causes the prior notification to be discarded. This behavior of keeping only the newest notification
is referred to as coalescing notifications.

假设用户不在线,通知会合并,仅仅会保留最新的一条。

假如你给用户发了两条通知,但用户反馈说。仅仅收到了一条,那么非常可能是用户当时不在线,APNs的合并策略生效。仅仅保留了近期一条

 

3.If the device remains offline for a long time, any notifications that were being stored for it are discarded

 

4.The maximum size allowed for a notification payload is 256 bytes; Apple Push Notification Service refuses any notification that exceeds this limit.

这个非常重要。payload。就是最后生成的那段Json。不得超过256字节。

假设超过了,建议去掉一些不须要的參数,把alert,就是提示信息的字数降低

 

5.don’t repeatedly open and close connections. APNs treats rapid connection and disconnection as a denial-of-service attack.

6.If you send a notification that is accepted by APNs, nothing is returned.

发送成功的木有返回,仅仅有发送失败的才会返回

 

7.If you send a notification that is malformed or otherwise unintelligible, APNs returns an error-response packet and closes the connection. Any notifications that you sent after the malformed notification using the same connection are discarded, and must
be resent.

这条非常重要,假设有error-response,那么这条之后的通知都须要重发。有非常多开源的库。在发苹果通知时都没有检測error-response,假设你不小心用了。那么用户非常可能反馈“怎么没有通知啊”

 

8.The notification identifier in the error response indicates the last notification that was successfully sent(实际情况不是,实际上返回的是出错的那条通知的ID). Any notifications you sent after it have been discarded and must be resent.When you receive this status code, stop using
this connection and open a new connection.

这是对上一条的补充。假设出错了,须要关闭当前的连接,而且又一次连接再发。error-response中返回的通知ID。能够帮助我们找出哪条出错了,这样就能知道哪些须要重发了

 

9.When a push notification cannot be delivered because the intended app does not exist on the device, the feedback service adds that device’s token to its list.

APNS的feedback service会返回那些已经卸载的设备的token--device_token。存储这些token。下次就不用再给他们发了,能够节省点资源。须要注意的是:feedback的接口读取一次,APNS就会清空它的列表。下次再读取时,返回的就是这两次读取之间这段时间新产生的device_token。

 

仅仅有把这些搞清楚。才方便我们理解苹果推送的规则,知道自己推送上的一些不足之处

苹果通知推送服务(APNS)关键特性摘要的更多相关文章

  1. 苹果通知推送服务(APNS)一些关键特性摘要

    http://ramosli.iteye.com/blog/1940843 前段时间,仔细研究了APNS的文档,把一些关键的地方记录了下来,弄懂这些对于理解APNS的规则,至关重要. 1. If AP ...

  2. ZPush--基于netty4实现的苹果通知推送服务(APNs)Javaclient

    简单说下实现苹果通知推送服务(APNs)client的一些要注意的地方: 使用长连接: sanboxserver是无用的,调试时直接用"gateway.push.apple.com" ...

  3. 手把手教你配置苹果APNS推送服务|钿畑的博客 | 钿畑的博客

    http://www.360doc.com/content/15/0118/17/1073512_441822850.shtml# 钿畑的文章索引 1. 什么是推送通知 2. 什么是APNS? 3. ...

  4. IOS学习笔记—苹果推送机制APNs

    转自:唐韧_Ryan http://blog.csdn.net/ryantang03/article/details/8482259 推送是解决轮询所造成的流量消耗和 电量消耗的一个比较好的解决方案, ...

  5. 基于APNs最新HTTP/2接口实现iOS的高性能消息推送(服务端篇)

    1.前言 本文要分享的消息推送指的是当iOS端APP被关闭或者处于后台时,还能收到消息/信息/指令的能力. 这种在APP处于后台或关闭情况下的消息推送能力,通常在以下场景下非常有用: 1)IM即时通讯 ...

  6. 消息推送之APNS

    利用APNS进行消息推送 原理 APNS 是Apple Push Notification Service(Apple Push服务器)的缩写,是苹果的服务器. APNS推送可以分为三个阶段: 第一阶 ...

  7. Android推送服务——百度云推送

    一.推送服务简介 消息推送,顾名思义,是由一方主动发起,而另一方与发起方以某一种方式建立连接并接收消息.在Android开发中,这里的发起方我们把它叫做推送服务器(Push Server),接收方叫做 ...

  8. .NET向APNS苹果消息推送通知

    一.Apns简介: Apns是苹果推送通知服务. 二.原理: APNs会对用户进行物理连接认证,和设备令牌认证(简言之就是苹果的服务器检查设备里的证书以确定其为苹果设备):然后,将服务器的信息接收并且 ...

  9. APNS push server端 SSL3.0 转 TLS (iPhone苹果推送服务)

    (转载此文,请说明原文出处) 苹果的官方公布 Update to the Apple Push Notification Service October 22, 2014 The Apple Push ...

随机推荐

  1. HDU 6052 To my boyfriend(悬线法)

    [题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=6052 [题目大意] 给出一个数字矩阵,求子矩阵期望数字种数 [题解] 我们统计[x,y]为其所表示 ...

  2. 【2-SAT(tarjan)】BZOJ1997-[Hnoi2010]Planar

    [题目大意]给出一张存在哈密顿回路的无向图,判断是否是平面图.[思路]首先平面图的一个性质:边数<=点数*3-6因为存在哈密顿回路,可以将回路看作是一个圆,考量不再哈密顿回路中的边.如果两天边相 ...

  3. [洛谷P3809]【模板】后缀排序

    [洛谷P3809][模板]后缀排序 题目大意: 对于给定的长度为\(n(n\le10^6)\)的字符串求后缀数组\(sa[i]\). 思路: 倍增+快排构造后缀数组.代码参考<挑战程序设计竞赛& ...

  4. django邮件相关设置

    EMAIL_HOST = 'smtp.mxhichina.com' # 阿里云企业邮箱 EMAIL_HOST_PORT = 25 # 邮箱服务器端口 EMAIL_HOST_USER = '****** ...

  5. mysql交叉表查询解决方案整理

    交叉表是一种常用的分类汇总查询.使用交叉表查询,可以显示表中某个字段的汇总值,并将它们分组,其中一组列在数据表的左侧,另一组列在数据表的上部.行和列的交叉处可以对数据进行多种汇总计算,如:求和.平均值 ...

  6. python框架django中结合vue进行前后端分离

    一:创建django项目 1.django-admin startproject mysite # 创建mysite项目 2.django-admin startapp app01# 创建app01应 ...

  7. (转)c#中判断是不是数字和字母

    一.判断字母string str = Console.ReadLine();if (char.isLetter(str)){ }else if (char.IsDigit(str)){ }if(ch& ...

  8. win7注册表损坏的修复方法

    win7注册表损坏的修复方法 发布时间:2013-07-19 09:31发布者:系统城-小薇浏览数:3129 注册表是window系统中的一个非常重要的数据库,用于存储电脑系统和应用程序的设置信息,我 ...

  9. java jar包 log4j不能输出解决方法

    今天运行一个jar包,jar包中使用了springContext进行加载bean和log4j配置,但是发现不能正常输入日志. 代码中增加 Xxx.class.getResource("/&q ...

  10. [转]Sql Server参数化查询之where in和like实现详解

    本文转自;http://www.cnblogs.com/lzrabbit/archive/2012/04/22/2465313.html 文章导读 拼SQL实现where in查询 使用CHARIND ...