Hi,
I'm trying to learn how to use asynchronous functions in Swift. I've used async functions in other languages such as C#, so I understand the general concept.
I want to call getPendingNotificationRequests on UNUserNotificationCenter asynchronously, so I wrote this:
let notificationCenter = UNUserNotificationCenter.current()
let requests = await notificationCenter.getPendingNotificationRequests()
This seems to match the examples I see in documentation, but it doesn't work. All I get is a compiler error that says "Missing argument for parameter 'completionHandler'". What am I doing wrong?