0
我有一種情況,我想要獲取iOS 10通知數據(來自字典),但我不想在鎖定屏幕上顯示任何通知。在鎖定屏幕上隱藏iOS 10通知
任何解決方案?這可能嗎 ?
if #available(iOS 10.0, *)
{
let content = UNMutableNotificationContent()
content.body = "Test"
var userInfo = [String:String]()
userInfo["identifier"] = Identifier as String
userInfo["Time"] = DateString as String
content.userInfo = userInfo
}
我想從字典中獲取數據,但它顯示鎖定屏幕上的警報通知。
let trigger = UNCalendarNotificationTrigger.init(dateMatchingComponents: components, repeats: false)
let request = UNNotificationRequest.init(identifier: "hello", content: content, trigger: trigger)