0
votes

I have set up a Notification Service Extension to download a clip every time we get an event with url. The events are generated from a 3rd party, usually the last two events are duplicates (same payloads). I would like to ignore the notification with duplicate payload.

General flow:

  • first push(no clip in payload)
  • second push (clip added)
  • third push(duplicate)

the same notification is being updated using the collapse-id

What we have observed is we are able to successfully download the clip at the second push but when we get to the third notification the Notification Service Extension times out(hits the serviceExtensionTimeWillExpire) and no more processing can be done.

I would like to ignore the notification updates after we successfully download the clip. So no more updates after the second notification.

What would be the best way to handle this? Would com.apple.developer.usernotifications.filtering work? or would that remove my previous notification?