苹果推送通知服务 |
---|
|
產品類型 | 通知 |
---|
持有者 | Apple Inc. |
---|
國家/地區 | 美国 |
---|
建立 | 2009 |
---|
目標市場 | 世界 |
---|
網站 | https://developer.apple.com/notifications/ |
---|
「Apple 推送通知服务」的各地常用名稱 |
---|
中国大陸 | Apple 推送通知服务 |
---|
臺灣 | Apple 推播通知服務 |
---|
Apple 推送通知服务(英語:Apple Push Notification service,英語:APNs)是苹果公司于2009年6月17日随iOS 3推出的一项服务。它通过长连接推送技术从第三方应用向苹果设备提供推送通知服务(英语:Notification Service),通知中可能包括标记、声音、提醒/横幅。在iOS 5中,通知中心加强了推送和本地通知的用户体验。Apple 推送通知服务也以API的形式添加到了Mac OS X Lion(10.7)中供开发者使用,并在OS X 10.8 “Mountain Lion”中加以改进成为通知中心。
在Mac OS X Lion上,应用也可以使用与iOS相同的API来向Mac OS X上的程序推送信息。OS X Mountain Lion发布后,用户可以通过通知中心收取推送通知。如果推送信息时应用并未运行,则会有数字标记出现且应用并会被添加至dock中(直到标记被清除)来提醒用户。
Mac OS X 服务器使用 Apple 推送通知服务向联网用户推送服务器邮件、日历和联系信息。像是iPhone一类的设备和邮件、日历一类的应用都能收到来自 Mac OS X 服务器的推送通知。
使用 Apple 推送通知服务推送单条通知的体积最大为 256 字节。
历史
苹果公司于2008年6月9日宣布推出这项服务,原定于当年 9 月发布;正如斯科特·福斯特尔在2009年3月17日的 iOS 3.0 预览活动上所说,由于 APNs 的发布据称引起了"压倒性"的反响,出于可扩展性目的,苹果公司决定重组 APNs,从而推迟了这项服务的推出。在这两次活动中,福斯特尔表示,推送技术比后台进程(用于拉取技术)推送通知更节省电量。[1]
APNs 于2009年6月17日与 iOS 3.0 一起首次推出。[2]iOS 5.0 的发布包含了一个通知中心,增加了在一个地方接收和读取本地通知的支持。[3]
APNs 还作为 API 添加到 Mac OS X 10.7("Lion")中,这样开发人员就可以开始更新他们的第三方应用程序并开始使用该服务。[4][5]后来,OS X 10.8("Mountain Lion")通过引入通知中心得到了改进。与 iOS 5.0 一样,这一改进允许用户在一个位置管理和阅读收到的通知。[6][7]OS X 10.9("Mavericks")版本包含 Safari 7.0,该版本增加了对接受和接收来自用户授权网站的 APNs 通知的支持。[8][9]
2023年12月,有关通过 APNs 发送推送通知的潜在隐私和监控漏洞引起了关注。美国参议员罗恩·怀登在致司法部的一封信中透露,美国政府和外国执法部门都可能要求苹果公司提供与推送通知相关的用户数据。 [10]
技术细节
通过二进制接口发送通知的有效载荷在2014年从256字节增加到2千字节。2015年12月,苹果发布了一个新的HTTP/2 API,取代了原先的二进制接口。使用HTTP/2 API发送通知的最大有效载荷为4千字节。[11]苹果在2021年3月底关闭了原先的二进制接口。[12]
APNs 的HTTP/2接口使用了TCP 443端口作为主要通信端口。当443接口的外向访问被防火墙阻断,开发者也可以使用TCP 2197端口代替。[13]
参见
参考资料
- ^ iPhone push notification service for devs announced. Engadget. June 9, 2008 [2023-07-06]. (原始内容存档于2024-05-18) (美国英语).
- ^ Apple Push Notification Service. Apple Inc. March 21, 2016 [April 8, 2016]. (原始内容存档于2016-03-04).
- ^ iOS 5: Notifications and Notification Center. Gigaom. October 12, 2011 [April 8, 2016]. (原始内容存档于October 4, 2016).
- ^ OS X Lion v10.7. Apple Inc. December 8, 2015 [April 8, 2016]. (原始内容存档于2014-12-19).
- ^ Troubleshooting. Apple Inc. October 1, 2014 [April 8, 2016]. (原始内容存档于2016-06-04).
- ^ Apple Releases OS X Mountain Lion Developer Preview with Over 100 New Features. Apple Inc. February 16, 2012 [April 8, 2016]. (原始内容存档于2012-11-27).
- ^ OS X Mountain Lion features coming in iOS 6: Notification Center 'Do Not Disturb' toggle, Safari iCloud Tabs, and Mail VIPs. 9to5Mac. June 4, 2012 [April 8, 2016]. (原始内容存档于2012-08-05).
- ^ Safari 7.0 to bring web notifications to OS X Mavericks. Appleinsider. June 28, 2013 [April 8, 2016]. (原始内容存档于2016-04-19).
- ^ Now websites can send push notifications — not just apps. Niemanlab. June 10, 2013 [April 8, 2016]. (原始内容存档于2016-11-27).
- ^ Couts, Andrew. Police Can Spy on Your iOS and Android Push Notifications. Wired. [5 April 2024]. (原始内容存档于2024-05-25).
- ^ Local and Remote Notification Programming Guide: Creating the Remote Notification Payload. Apple Inc. October 24, 2016 [November 29, 2016]. (原始内容存档于2018-06-01).
- ^ Updated APNs provider API deadline - Latest News - Apple Developer. developer.apple.com. [2022-12-08]. (原始内容存档于2023-04-16) (英语).
- ^ Apple Developer Documentation. developer.apple.com. [2022-12-08]. (原始内容存档于2023-05-20).
外部链接
- Notifications for Developers - Apple Developer(页面存档备份,存于互联网档案馆)
- 使用 iPhone、iPad 或 iPod touch 上的“通知”(页面存档备份,存于互联网档案馆)
|
硬件 | iPhone | |
---|
iPod Touch | - 第一代(英语:iPod Touch (1st generation))
- 第二代(英语:iPod Touch (2nd generation))
- 第三代(英语:iPod Touch (3rd generation))
- 第四代
- 第五代
- 第六代
- 第七代
|
---|
iPad | - 第一代
- 2
- 第三代
- 第四代
- 第五代
- 第六代
- 第七代
- 第八代
- 第九代
- 第十代
- Mini
- Air
- Pro
- 第一代
- 第二代
- 第三代
- 第四代
- 第五代
- 第六代(英语:iPad Pro (6th generation))
- 第七代(英语:iPad Pro (7th generation))
|
---|
其他 | |
---|
| |
---|
软件 | |
---|
服务 | |
---|
其他 | - Apple Silicon
- 争议
- FairPlay(英语:FairPlay)
- 自由及开放源代码程序(英语:List of free and open-source iOS applications)
- 遊戲(英语:List of iOS games)
- iFund(英语:iFund)
- iPhone历史(英语:History of the iPhone)
- iPhone硬件(英语:Hardware of the iPhone)
- Metal
- Swift
- WWDC
|
---|
|
|
---|
版本 | | |
---|
应用程序 | |
---|
实用工具 | - 活動監視器
- AirPort实用工具
- 音频MIDI设置
- 蓝牙文件交换
- BOMArchiveHelper(英语:BOMArchiveHelper)
- 色彩同步实用工具
- 控制台
- Crash Reporter(英语:Crash Reporter)
- 数码测色计(英语:Digital Color Meter)
- 目錄工具程式
- DiskImageMounter
- 磁盘工具程序
- Grab(英语:Grab_(software))
- Help Viewer(英语:Help Viewer)
- 图像捕捉(英语:Image Capture)
- 安裝程式
- 钥匙串访问
- 系統移轉輔助程式(英语:Migration Assistant)
- 网络实用工具(英语:Network Utility)
- ODBC Administrator(英语:ODBC Administrator)
- 螢幕共享(英语:Screen Sharing)
- 系统偏好设置(英语:System Preferences)
- 系统信息(英语:System Information)
- 终端
- 輔助使用;(英语:Universal Access)
- 旁白
- Apple X11
| 停止開發 | |
---|
|
---|
技術與 使用者界面 | |
---|
|