温馨提示:本文翻译自stackoverflow.com,查看原文请点击:swift - what happens behind the scenes of executing `UIApplication.shared.registerForRemoteNotifications()`
apple-push-notifications ios swift devicetoken

swift - 在执行UIApplication.shared.registerForRemoteNotifications()幕后发生了什么

发布于 2020-05-07 14:27:05

我想知道为注册推送通知的ios应用程序时幕后发生的事情,以及ios设备如何在application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)回调中接收设备令牌我需要了解完整的方案和协议通信。

查看更多

提问者
Jafar Khoshtabiat
被浏览
26
Jafar Khoshtabiat 2020-02-19 15:28

我能找到的最相关的东西是:

https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html

https://developer.apple.com/library/archive/technotes/tn2265/_index.html

我能理解的是,大多数工作是由os完成的,它建立了与Apple服务器的直接持久连接。没有关于任何协议或请求响应的更多信息。