Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
570 views
in Technique[技术] by (71.8m points)

push notification - iOS APNS "best-effort" fallback

I cannot seem the have my head around this. APNS as stated in the documentation has best-effort delivery, i.e. delivery is not guaranteed. However, if I am to use the push-notification model in my client/server application, I have to use them somehow.

The general model looks as follows: there is new data on the server -> the server then sends a push notification informing the client(s) that there is new data available -> client downloads new data.

The question is then, if I cannot rely 100% on the notification to be delivered, what kind of fallback mechanism can I use so that I can ensure that the client receives the new data available on the server ? What is the way to ensure that the client has the most-up-to-date data using APNS ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

What is the way to ensure that the client has the most-up-to-date data using APNS ?

There is no way to do this with just APNS. Your client needs to query your server when the app is brought to the foreground to see if there is new data, regardless of any push notifications you may have lost or received.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...