AVR
AVR

Reputation: 139

How to replace push notification with new received notification (containing same notification id) in IOS 12

I am working on ios rich push notifications. And want to replace previously received notification in notification tray with newly received notification if the key (e.g "notification_id") is same in payload. I have tried solution mentioned in "https://medium.com/the-guardian-mobile-innovation-lab/how-to-replace-the-content-of-an-ios-notification-2d8d93766446" and it is working with ios 11 but not with ios 12.

Upvotes: 3

Views: 757

Answers (1)

Taimoor Suleman
Taimoor Suleman

Reputation: 1626

Pass same collapse_id with the notification you want to replace. Here is the description of collapse_id

Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters.

Upvotes: 1

Related Questions