Как узнать дату предстоящего уведомления?IOS

Программируем под IOS
Anonymous
Как узнать дату предстоящего уведомления?

Сообщение Anonymous »


Я могу получить следующее уведомление с помощью следующего кода:

Код: Выделить всё

let center = UNUserNotificationCenter.current()
center.getPendingNotificationRequests { (notifications) in
let pendingNotifications : [UNNotificationRequest] = notifications
let notification = pendingNotifications[0]
let trigger = notification.trigger
let content = notification.content
}
gets me: But I can't call

Код: Выделить всё

trigger.dateComponents
How do I get this date?


Источник: https://stackoverflow.com/questions/471 ... tification

Вернуться в «IOS»