Skip to content

Instantly share code, notes, and snippets.

@ITechRoof
Created March 10, 2020 06:35
Show Gist options
  • Save ITechRoof/c4f2d7813428d5ca4e86366d5b20cf2f to your computer and use it in GitHub Desktop.
Save ITechRoof/c4f2d7813428d5ca4e86366d5b20cf2f to your computer and use it in GitHub Desktop.
User notification request
[[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:UNAuthorizationOptionAlert completionHandler:^(BOOL granted, NSError * _Nullable error) {
if(!error && granted)
{
NSLog(@"REGISTERD");
}
}];
[UNUserNotificationCenter currentNotificationCenter].delegate = self;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment