Chris Chris - 8 months ago 43
Swift Question

Swift Local Notification

I want to ask how I can achieve to override an already displayed Local Notification with SWIFT? I just want one notification for a particular event where the value is changing from time to time, when a change for the event appear.

For the moment there is always a new notification created.

Thanks :)


If the documentation is correct, you can't alter an already scheduled notification. The doc states for -scheduleLocalNotification::

[…] Because the operating system copies notification, you may release it once you have scheduled it. The notification object is copied by the system and not accessible via any (public) method. So there's no other solution than canceling the notification.

Reference link