Skip to content

Instantly share code, notes, and snippets.

@RameshAran
Created September 19, 2016 16:23
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/a3e669283c2faad0312bb3be9e733983 to your computer and use it in GitHub Desktop.
Save RameshAran/a3e669283c2faad0312bb3be9e733983 to your computer and use it in GitHub Desktop.
UNUserNotificationCenter* center = [UNUserNotificationCenter currentNotificationCenter];
[center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert + UNAuthorizationOptionSound)
completionHandler:^(BOOL granted, NSError * _Nullable error) {
// Enable or disable features based on authorization.
}];
@RameshAran
Copy link
Author

UNUserNotificationCenter requesting authorization Objective C

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