Keep UNNotificationContent some seconds
问题 I'm doing an app in Swift 3 for iOS 10. I have done an UNNotificationContent to simulate a call in my app but it disappears approximately five seconds after being launched. I need to keep it more seconds, while the "calling" is in process. I want to keep the local notification until I call the removeAllPendingNotificationRequests method. Can I do it? This is my code now: let content = UNMutableNotificationContent() content.body = "\(userName) is calling..." content.sound = UNNotificationSound