Replace completion handlers with async/await. (#407)

This commit is contained in:
Doug
2023-01-05 16:43:41 +00:00
committed by GitHub
parent 51e300642c
commit e4d087a0a4
8 changed files with 70 additions and 109 deletions
@@ -19,7 +19,7 @@ import UserNotifications
protocol UserNotificationCenterProtocol: AnyObject {
var delegate: UNUserNotificationCenterDelegate? { get set }
func add(_ request: UNNotificationRequest, withCompletionHandler completionHandler: ((Error?) -> Void)?)
func requestAuthorization(options: UNAuthorizationOptions, completionHandler: @escaping (Bool, Error?) -> Void)
func add(_ request: UNNotificationRequest) async throws
func requestAuthorization(options: UNAuthorizationOptions) async throws -> Bool
func setNotificationCategories(_ categories: Set<UNNotificationCategory>)
}