Pubnub iOS push notification filtering?

According to this post , the best practice is filtering channel messages on the client side. I did not find a possible way to do this when the push notification is still enabled. Right now, our iOS client is notified of a large number of useless messages when the application is down.

+4
source share
1 answer

Filter PubNub Messages and Push Notifications

This is a flaw with APNS, not PubNub. PubNub works in such a way that all channel subscribers receive all messages published on this channel. But when the application is in the background on iOS or does not work at all, your application does not have the ability to process a push notification before it is displayed by the iOS device. Android / GCM allows your application to intercept a message before it is displayed.

Fortunately, there is only one scenario (which I can think of) where the sender of the msg message will receive its push version of the message (this means that you cannot intercept and not display it).

  • User posts
  • then immediately (quickly) leaves the application (the "home" button, switches to another application, etc.).
  • push msg appears

( push-), push-. UUID, push-, didReceiveRemoteNotification, .

( PubNub), , , , , , / , " uuid! =", uuid . push-, .

push- . APNS GCM API

, push- . SDK.

, . , push- iOS . Android, , push- .

+4

Source: https://habr.com/ru/post/1609718/


All Articles