- 浏览: 2551913 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
APNS(1)Apple Push Notification Service
APNS is Apple Push Notification Service.
A Push Notification and Its Path
Apple Push Notification service transports and routes a notification from a given provider to a given device. A notification is a short message consisting of two major pieces of data: the device token and the payload.
A device token is analogous to a phone number.
The payload is a JSON-defined property.
A push notification from a provider to a client application.
Provider ---notification------> APNS -------notification-----> IPhone ---notification---> ClientApp
Service-to-Device Connection Trust
Device APNS
TLS initiation ----->
<--------- Server certificate
Validate server certificate
Device certificate ------>
Validate device certificate
<----------TLS established
Provider-to-Service Connection Trust
Provider APNS
TLS initiation----------->
<----------------Server Certificate
Validate server certificate
Provider certificate ------>
Validate provider certificate
<----------------TLS established
Token Generation and Dispersal
An iOS-based application must register to receive push notifications. It does this right after it is installed on a device.
Provider Device APNS
-----Connect(Token--->
Generate token package
Generate device ID from device certificate
Encrypt token with token key
<--------Token ------------
<-----Token-----
This token will be used every time when we connect with APNs.
Token Trust(Notification)
Provider APNS Device
<----------Connect(Token…)--------
Encrypt token and
validate
with device certificate
-------------Response(OK)------------>
-------Token, Payload----->
Decrypt token with token key
------------- Payload --------------------->
The Notification Payload
The maximum size allowed for a notification payload is 256 bytes. And delivery of notifications is "best effort" and is not guaranted.
If the target application isn't running when the notification arrives, the alert message, sound, or badge value is played or shown.
Example of JSON Payloads
{
"aps" : {
"alert" : "You got your emails.",
"badge" : 9,
"sound" : "bingbong.aiff"
},
"acme1" : "bar",
"acme2" : 42
}
References:
http://code.google.com/p/javapns/
http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html
http://mobile.51cto.com/iphone-284849.htm
http://www.oschina.net/ios/293/ios-msg?type=3&sort=time
http://my.oschina.net/u/557242/blog/88751
http://www.cnblogs.com/hubj/archive/2012/06/14/2549816.html
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html
APNS is Apple Push Notification Service.
A Push Notification and Its Path
Apple Push Notification service transports and routes a notification from a given provider to a given device. A notification is a short message consisting of two major pieces of data: the device token and the payload.
A device token is analogous to a phone number.
The payload is a JSON-defined property.
A push notification from a provider to a client application.
Provider ---notification------> APNS -------notification-----> IPhone ---notification---> ClientApp
Service-to-Device Connection Trust
Device APNS
TLS initiation ----->
<--------- Server certificate
Validate server certificate
Device certificate ------>
Validate device certificate
<----------TLS established
Provider-to-Service Connection Trust
Provider APNS
TLS initiation----------->
<----------------Server Certificate
Validate server certificate
Provider certificate ------>
Validate provider certificate
<----------------TLS established
Token Generation and Dispersal
An iOS-based application must register to receive push notifications. It does this right after it is installed on a device.
Provider Device APNS
-----Connect(Token--->
Generate token package
Generate device ID from device certificate
Encrypt token with token key
<--------Token ------------
<-----Token-----
This token will be used every time when we connect with APNs.
Token Trust(Notification)
Provider APNS Device
<----------Connect(Token…)--------
Encrypt token and
validate
with device certificate
-------------Response(OK)------------>
-------Token, Payload----->
Decrypt token with token key
------------- Payload --------------------->
The Notification Payload
The maximum size allowed for a notification payload is 256 bytes. And delivery of notifications is "best effort" and is not guaranted.
If the target application isn't running when the notification arrives, the alert message, sound, or badge value is played or shown.
Example of JSON Payloads
{
"aps" : {
"alert" : "You got your emails.",
"badge" : 9,
"sound" : "bingbong.aiff"
},
"acme1" : "bar",
"acme2" : 42
}
References:
http://code.google.com/p/javapns/
http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html
http://mobile.51cto.com/iphone-284849.htm
http://www.oschina.net/ios/293/ios-msg?type=3&sort=time
http://my.oschina.net/u/557242/blog/88751
http://www.cnblogs.com/hubj/archive/2012/06/14/2549816.html
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html
发表评论
-
ionic UI(4)ionic2 framework - basic and components and native
2016-03-24 02:33 1261ionic UI(4)ionic2 framework - b ... -
ionic UI(3)TypeScript - handbook
2016-03-22 23:21 634ionic UI(3)TypeScript - handboo ... -
ionic UI(2)ionic2 framework - TypeScript - tutorial
2016-03-22 06:52 1656ionic UI(2)ionic2 framework - T ... -
Parse and Heroku Service(3)Parse Server and Parse Dashboard
2016-03-22 06:30 967Parse and Heroku Service(3)Pars ... -
Parse and Heroku Service(2)Mail Templates and Push Notification
2016-03-22 02:45 583Parse and Heroku Service(2)Mail ... -
ionic UI(1)Introduction
2016-03-19 03:18 723ionic UI(1)Introduction 1 Inst ... -
Parse and Heroku Service(1)Heroku Installation and Play
2016-03-19 00:13 824Parse and Heroic Service(1)Hero ... -
Hybrid(5)Customize Meteor Directly Google Login
2015-09-01 02:33 911Hybrid(5)Customize Meteor Direc ... -
Hybrid(4)Favorite Places - Google Login
2015-09-01 02:02 1343Hybrid(4)Favorite Places - Goog ... -
Hybrid(3)More Meteor Example - Social
2015-08-11 05:04 757Hybrid(3)More Meteor Example - ... -
Hybrid(2)meteor Running Android and iOS
2015-07-28 23:59 1050Hybrid(2)meteor Running Android ... -
Create the Google Play Account
2015-07-18 06:42 1101Create the Google Play Account ... -
Secure REST API and Mobile(1)Document Read and Understand OAUTH2
2015-07-14 00:36 764Secure REST API and Mobile(1)Do ... -
Screen Size and Web Design
2015-07-11 01:11 726Screen Size and Web Design iPh ... -
Hybrid(1)ionic Cordova meteor
2015-06-25 05:49 471Hybrid(1)ionic Cordova meteor ... -
Android Fire Project(1)Recall Env and Knowledge
2015-02-11 12:28 688Android Fire Project(1)Recall ... -
Android Content Framework(1)Concept
2014-06-14 13:54 1081Android Content Framework(1)Con ... -
Feel Android Studio(1)Install and Update Android Studio
2014-04-11 03:12 2031Feel Android Studio(1)Install a ... -
IOS7 App Development Essentials(2)iBeacon
2014-03-05 05:55 890IOS7 App Development Essentials ... -
IOS7 App Development Essentials(1) Persistent Store
2014-03-05 05:54 1327IOS7 App Development Essentials ...
相关推荐
### Apple Push Notification Service (APNS) 简介 #### 一、APNS 概述 Apple Push Notification Service(简称 APNS)是苹果公司提供的一种推送通知服务,它允许开发者向用户设备上的应用发送实时更新的信息。...
在Android平台上,实现即时通知通常会借助Google的云消息推送服务(Google Cloud Messaging,简称GCM),但在iOS系统中,对应的则是Apple Push Notification service(APNs)。然而,这里提到的"android apns"可能是...
apns Go程序包可与Apple Push Notification Service交互特征该库实现了一些我们在其他任何一个库中都找不到的功能: 客户端寿命长-Apple的文档说,您应该保持而不是为每个有效负载创建新的连接新协议的使用-Apple...
这是一个用于与Apple Push Notification Service(APNS)进行交互的小型C ++ 11项目。 您可以将推送通知发送到iOS设备或Safari浏览器(仅适用于OS X 10.9)。 它还处理反馈服务。 安装 首先在global.hpp中设置证书...
用于与Apple Push Notification Service(APN)交互的Python库 安装 从GitHub下载源代码或使用easy_install: $ easy_install apns 样品用法 import time from apns import APNs , Frame , Payload apns = APNs ( ...
围绕 Apple Push Notification Service 和 Google Cloud Messaging Service 的简单 HTTP 包装器 安装 安装 Node.js(0.10.x,不是 0.11.x) 安装Redis 克隆源 运行npm install 运行 Pushlet $ 节点pushlet.js ...
APNS(Apple Push Notification Service)苹果推送通知服务。该技术由苹果公司提供的APNS服务。工作原理:首先,APNS会对用户进行物理连接认证,和设备令牌认证(简言之就是苹果的服务器检查设备里的证书已确定其为...
APNS(Apple Push Notification service)是苹果公司提供的一项服务,用于向iOS、iPadOS、watchOS、tvOS以及macOS设备发送远程通知。通过APNS,应用开发者可以在他们的应用程序不在前台运行时,仍然能够向用户发送...
Laravel 提供了一个方便的工具来处理这一过程,特别是与 Apple Push Notification Service (APNS) 和 Google Cloud Messaging (GCM) 集成。 首先,我们需要安装 "laravel-push-notification" 扩展包。在 Laravel ...
Apple Push Notification service (APNS) 是苹果公司提供的服务,允许开发者向iOS、iPadOS、watchOS和tvOS设备发送远程通知。Notificato是一个开源的PHP库,它简化了与APNS的交互过程,帮助开发者更高效地在他们的...
PyAPNs2 用于通过HTTP / 2协议与Apple Push Notification Service(APN)进行交互的Python库安装从GitHub下载源代码或使用pip: $ pip install apns2样品用法 from apns2 . client import APNsClientfrom apns2 . ...
Erlang库,用于使用Apple Push Notification Service。 。 。 。 如何使用 在您的rebar.config中设置依赖项: {deps, [ {dp_push, ".*", {git, "https://github.com/yzh44yzh/dp-push.git", "v1.0"}} ]}. ...
苹果推送消息服务调试应用 Knuff ,Knuff 是 APNs(Apple Push Notification Service,苹果信息推...
iPush - Framewok:registered: 内部 推送技术是一种通信类型,其中服务器在有新信息或通知时向客户端(例如移动设备)发起请求,与传统的拉取技术相比,可以显着节省资源和时间。 理解推送技术的一个非常简单的例子...
这通常涉及解析证书,连接到APNs(Apple Push Notification service)接口,构造推送消息(包括payload),并发送给指定的设备Token。 4. **客户端接收**:客户端需要监听并处理接收到的推送消息。在`AppDelegate....
使用带有JSON Web令牌的新HTTP / 2协议连接到Apple的Push Notification Service的节点客户端。 创建客户 使用签名密钥创建一个APNS客户端: const { APNS } = require ( 'apns2' ) const client = new APNS ( { ...
推送技术是基于APNs(Apple Push Notification Service)的,APNs是Apple提供的一种推送服务,允许应用程序在后台运行时接收来自服务器的消息。APNs使用了基于证书的身份验证机制来确保推送消息的安全性。 推送技术...
apns4j 是 Apple Push Notification Service 的 Java 实现!Maven: <groupId>com.github.teaey</groupId> <artifactId>apns4j <version>1.0.1 示例代码:KeyStoreWraper keyStore = ...
特征轻松地将推送通知发送到APNS(Apple推送通知服务)(根本不需要配置) 加载/保存文档,包括令牌和JSON负载直接从钥匙串中获取证书自动获取设备令牌; 无需再通过日志记录或类似技术手动获取设备令牌。 不在沙盒...
Apple Push Notification Service (APNs) 是苹果公司提供的一项服务,允许开发者向运行iOS、iPadOS、watchOS、macOS以及tvOS的应用程序发送实时的通知。在这个场景中,我们讨论的是一个名为“pu.sh”的Bash脚本,它...