refactor: 重构提醒通知系统
This commit is contained in:
@@ -18,16 +18,4 @@ import UserNotifications
|
||||
}
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
override func userNotificationCenter(
|
||||
_ center: UNUserNotificationCenter,
|
||||
didReceive response: UNNotificationResponse,
|
||||
withCompletionHandler completionHandler: @escaping () -> Void
|
||||
) {
|
||||
let userInfo = response.notification.request.content.userInfo
|
||||
if let payloadString = userInfo["payload"] as? String {
|
||||
UserDefaults.standard.set(payloadString, forKey: "pending_notification_payload")
|
||||
}
|
||||
completionHandler()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user