Skip to content

Typo in README.md #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JamesPerlman opened this issue Oct 2, 2020 · 1 comment
Closed

Typo in README.md #189

JamesPerlman opened this issue Oct 2, 2020 · 1 comment

Comments

@JamesPerlman
Copy link

Bug report

In the instructions for integrating UNUserNotificationCenter:

- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
  completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
}

This works however it is only correct because luckily the first 3 options in the UNAuthorizationOptions enum are identical in value to the elements of UNNotificationPresentationOptions. The completionHandler should be called like so:

completionHandler(UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert)
@Naturalclar
Copy link
Collaborator

@JamesPerlman thanks for raising the issue!
This issue is solved in #172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants