Warm tip: This article is reproduced from stackoverflow.com, please click
apple-push-notifications ios swift devicetoken

what happens behind the scenes of executing `UIApplication.shared.registerForRemoteNotifications()`

发布于 2020-05-04 23:28:40

I'm wondering what's happening behind the scenes when registering ios applications for push notifications and how the ios device receives device-token in application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) callback. I need to know the complete scenario and protocol communication.

Questioner
Jafar Khoshtabiat
Viewed
21
Jafar Khoshtabiat 2020-02-19 15:28

the most related things I could find are:

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

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

what I could understand is that most of the work is done by os that establishes a direct and persistent connection to apple's servers. no more information about any protocols or request-responses.