PermissionsKit
PermissionsKit copied to clipboard
Suggestion: add callback method to determine whether to authorize status
Steps to reproduce:
- Open the app for the first time and request notification permission. Click Allow
- Manually open the system settings page and turn off the App notification permission
- Open the app again and request notification permission. Calling the request method will still take the request callback scheme
Got bug. will research it.
I think you should completion (granted, error) in this code:
public override func request(completion: @escaping () -> Void) {
let center = UNUserNotificationCenter.current()
center.requestAuthorization(options:[.badge, .alert, .sound]) { (granted, error) in
DispatchQueue.main.async {
completion()
}
}
}
It's stored by system. can't update it. same troubles with location, system not provide right data always