我正在使用以下代码请求推送和本地通知权限:
let application = UIApplication.shared
let settings: UIUserNotificationSettings = UIUserNotificationSettings( types: [.alert, .badge, .sound], categories: nil )
application.registerUserNotificationSettings( settings )
application.registerForRemoteNotifications()
在我采取行动之前,我需要等待用户接受或拒绝通知。我怎样才能做到这一点?