Skip to content

Instantly share code, notes, and snippets.

@ramakser
Created February 24, 2016 07:50
Show Gist options
  • Save ramakser/368c1d99339b044db8b8 to your computer and use it in GitHub Desktop.
Save ramakser/368c1d99339b044db8b8 to your computer and use it in GitHub Desktop.
class func requestPermission() {
let userNotificationTypes = UIUserNotificationType.Badge | UIUserNotificationType.Alert,
userNotificationSettings = UIUserNotificationSettings(forTypes: userNotificationTypes, categories: nil)
UIApplication.sharedApplication().registerUserNotificationSettings(userNotificationSettings)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment