Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created May 11, 2020 14:54
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 BetterProgramming/4918c85c29392e98643a486d9a69ccaf to your computer and use it in GitHub Desktop.
Save BetterProgramming/4918c85c29392e98643a486d9a69ccaf to your computer and use it in GitHub Desktop.
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { success, error in
if success {
print("User Accepted")
} else if let error = error {
print(error.localizedDescription)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment