Reputation: 703
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.
Upvotes: 0
Views: 121
Reputation: 703
the most related things I could find are:
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.
Upvotes: 0
Reputation: 470
So this all works like this:
1) Your app asks to be registered with APNs.
2) On successful registration, APNs sends an app-specific device token to the device.
3) The system delivers the device to your app by calling a method in your app delegate.
For more information, check these links :- https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html
https://nshipster.com/apns-device-tokens/
Upvotes: 0