4
솔루션 코드 :iOS 10 UNUserNotificationCenter를 사용하여 보류중인 알림 목록을 보는 방법은 무엇입니까?
이let center = UNUserNotificationCenter.current()
print(center.getPendingNotificationRequests(completionHandler: { error in
// error handling here
}))
내 원래의 게시물 : 나는 UIApplication.shared.scheduledLocalNotifications
감가 상각되면서 UNUserNotificationCenter를 통해 대기 알림 목록을 얻기 위해 노력하고
.
let center = UNUserNotificationCenter.current()
print(UNUserNotificationCenter.getPendingNotificationRequests(center))
그러나이 인쇄 "(기능)"
이
내가 사용하고 코드입니다. getPendingNotificationRequests에는 UNUserNotificationCenter 매개 변수가 필요하며 그 외에 무엇이 될지 생각할 수 없습니다.감사
전화, 콜백 핸들러 https://developer.apple.com/reference/usernotifications/unusernotificationcenter/1649513-getpendingnotificationrequests을 제공 – Paulw11