Answer the question
In order to leave comments, you need to log in
How does Push Notification Service know where to send push?
We all know the general principles of how push notifications work. And I'm interested in this question: How does the server know where to send push?
I assume that it works like this:
- On the client side (Android / IOS / WP device), a certain process is constantly running in the background. Let's call it getPush. When an internet connection appears, getPush wakes up and establishes a connection with the Push Notification Service (PNS). Next, getPush sends a request for new data, if there is no data then getPush falls asleep, if there is data, it receives them, transfers them to the application and falls asleep. Then after a certain period of time getPush wakes up and the process repeats.
- Or when an Internet connection appears, getPush wakes up, establishes a connection with the PNS and, without terminating the connection, getPush goes into the "Listening" state (i.e. listens to messages from the PNS). As soon as there is new data, PNS sends it to getPush. Next, getPush receives this data, passes it to the application, and goes back to the "Listening" state.
What do you think is the correct option? Or maybe I'm wrong and the principle of operation is completely different?
Answer the question
In order to leave comments, you need to log in
Start here https://developer.apple.com/library/ios/documentat... and read in depth.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question