Swift Clear Specific Remote Notifications

We are currently developing an IOS application. The app should mainly inform the employee about new events / requests and the employee has the option to cancel or accept the event (for example, the client asks: "I like coffee", the employee says: "Okay, I'll" do it "or" sorry, I can't do it "). The idea is that the request appears on several smartphones (from several employees) at the same time and that the notification has buttons to enable / disable.

The point is, we would like to resolve this using alerts (remote). But there is one thing that we do not understand. Let's say I am getting three requests / notifications. But until I have time to check them, other employees have already approved one of these requests. Is it possible that this data can be deleted / deleted from all employees' phones? Because otherwise I am processing a request that has already been resolved?

And what would be the best option to solve it.

  • Push remote notifications for every request
  • Push "silent" notification for every request and then clear all notifications on the client, get new / current requests using REST (GET) and add a local notification for every request?

Many thanks for your help.

Hello

+3


source to share


3 answers


I think the second option is good.



you can refresh data using REST api after receiving silent push.

0


source


I think the best option is to use Push silent notification , because the end user (Application Holder) will not know about it and this is better for us.



0


source


I would recommend the 1st option

  • Send remote notification for every request
  • Handle duplicate request from backend

I think the second option is not reliable

APN treats silent notifications as a low priority and can completely disable their delivery if the total becomes excessive. Actual limits are dynamic and may change depending on conditions, but try not to send more than a few notifications per hour - source

And the individual notification cannot be removed - Check this:

0


source







All Articles