xcode - iOS manage badge on server side -
in database store delivered message count in table field. every message sent particular device, increment value.
when device receive payloa badge set, display reddish circle on application icon.
this ok but, when launch application (from force or straight icon), how can inform server have reset counter ?
and, if application active, have inform server not increment badge (because user reading in real time).
to manage this, have call-back server every force receive ?
if want server know when user viewed new info (either launching app, or having app in foreground), way, figured out, call-back server every time app either launched (from notification or icon) or receives force notification while active.
if app active, can remove badge when handle force notification (so user never see it). in application:didreceiveremotenotification:
calling app.applicationiconbadgenumber = 0
.
ios xcode push-notification apple-push-notifications
No comments:
Post a Comment