Skip to content

Typo in README.md #189

Closed
Closed
@JamesPerlman

Description

@JamesPerlman

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions