Skip to content

Instantly share code, notes, and snippets.

@RameshAran
Created September 19, 2016 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RameshAran/a17e209b16d79369976315b592ff9e97 to your computer and use it in GitHub Desktop.
Save RameshAran/a17e209b16d79369976315b592ff9e97 to your computer and use it in GitHub Desktop.
let center = UNUserNotificationCenter.currentNotificationCenter()
center.requestAuthorizationWithOptions([.Alert, .Sound]) { (granted, error) in
// Enable or disable features based on authorization.
}
@RameshAran
Copy link
Author

UNUserNotificationCenter requesting authorization in Swift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment