下記でローカル通知が可能
import UIKit
import UserNotifications
...
let content = UNMutableNotificationContent()
content.title = "Notification Title(BG)"
content.subtitle = "Notification Subtitile(BG)"
content.body = "Notification Body"
// content.body = myLabel.text!
content.badge = 5
content.sound = UNNotificationSound.default
if let path = Bundle.main.path(forResource: "DL", ofType: "jpeg") {
content.attachments = [try! UNNotificationAttachment(identifier: "renchon", url: URL(fileURLWithPath: path), options: nil)]
}
let interval_time : TimeInterval = 10 //sec
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: interval_time, repeats: false)
let request = UNNotificationRequest(identifier: "later", content: content, trigger: trigger)
UNUserNotificationCenter.current().add(request, withCompletionHandler: nil)