Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: provisional notifications for iOS #18

Open
avnerh1 opened this issue Jun 23, 2021 · 0 comments
Open

Feature request: provisional notifications for iOS #18

avnerh1 opened this issue Jun 23, 2021 · 0 comments

Comments

@avnerh1
Copy link

avnerh1 commented Jun 23, 2021

Hi,
It would be very helpful to take advantage of iOS' provisional notification authorization. This allows skipping the permission pop-up for low-priority local notifications.

To request provisional authorization, add the provisional option when requesting permission to send notifications.

let center = UNUserNotificationCenter.current()
center.requestAuthorization(options: [.alert, .sound, .badge, .provisional]) { granted, error in
    
    if let error = error {
        // Handle the error here.
    }
    
    // Provisional authorization granted.
}

Thanks for the diligent work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant