I want to remove a notification of a terminated app from server; I know about UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: )
but I need to call it when app is terminated.
We all know that silent notifications are not able to execute code when app is terminated, and also there is no way to stop a normal push notification from having sound or vibration since iOS 11, however I need to remove it silently. Do anyone know any solution?
Asked
Active
Viewed 178 times
0

Ali Samaiee
- 301
- 6
- 14
-
There is no way. If the app is terminated the notification will remain on the device until the user clears it or your app runs – Paulw11 Jun 28 '20 at 07:13
-
@Paulw11 is it possible to replace notification using "apns-collapse-id' with empty title in order to remove it? (notifications with no title would not be shown) – Ali Samaiee Jun 28 '20 at 07:42