Skip to content

Instantly share code, notes, and snippets.

@Scankiran
Last active March 28, 2020 12:34
Show Gist options
  • Save Scankiran/ea4de8d09007abbdc9cfd330d6b70a44 to your computer and use it in GitHub Desktop.
Save Scankiran/ea4de8d09007abbdc9cfd330d6b70a44 to your computer and use it in GitHub Desktop.
registerPushNotification function.
func registerPushNotifications() {
UNUserNotificationCenter.current()
.requestAuthorization(options: [.alert, .sound, .badge]) {(granted, error) in
print("Permission granted: \(granted)")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment