Is it possible to make a UNNotification expire or disappear after a certain amount of time?

时间:2018-03-25 19:25:51

标签: ios usernotifications

Say I have a local notification for a time-sensitive event, and would like to notify my user about it on iOS.

Is there a way to present a notification, and then after a certain amount of time, if the user has not viewed the notification to simply clear it? (i.e. set an expiration time or something of the sort on it)

If there is no way to do this with local notifications, is it possible with remote notifications?

1 个答案:

答案 0 :(得分:0)

Nope, sorry, the system handles appearance and disappearance of notifications.