title: How does Facebook Messenger clear push notifications from the lock screen if you’ve read them on desktop?
body: <p>When I receive a message on Facebook I get a push notification on a lock screen (iOS). Then I read this message on desktop. Right after that this push notification disappear without any interactions with the phone. How can I implement the same thing myself for removing outdated notifications?</p>
  
  <p>The second usage could be stitching notifications together. For instance Instagram sends you a push when someone liked your photo. After 20 likes your notifications screen is ruined and unreadable. But using the same principal as Facebook does it seem to be possible remove previous notification of the same sort and create new with the increased counter. No "User A liked photo X, User B liked photo Y etc", but "20 users liked photo Z" instead.</p>
  
  <p>I've seen couple of treads on similar topics here, but still no answer so far. Thanks!</p>