Код: Выделить всё
private func scheduleNotification() {
NotificationManager.shared.removeAllPendingNotifications()
let content = UNMutableNotificationContent()
content.title = "######"
content.body = "##### "
content.sound = UNNotificationSound.default
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 5, repeats: false)
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)
UNUserNotificationCenter.current().add(request) { error in
if let error = error {
print("Error scheduling notification: \(error)")
}
}
}
Я попробовал отправить из глобальной очереди и увеличил триггер Время, но все равно бесполезно
Подробнее здесь: https://stackoverflow.com/questions/785 ... n-backgrou