Closed JamesPerlman closed 4 years ago
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:
UNAuthorizationOptions
UNNotificationPresentationOptions
completionHandler
completionHandler(UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert)
@JamesPerlman thanks for raising the issue! This issue is solved in #172
Bug report
In the instructions for integrating UNUserNotificationCenter:
This works however it is only correct because luckily the first 3 options in the
UNAuthorizationOptions
enum are identical in value to the elements ofUNNotificationPresentationOptions
. ThecompletionHandler
should be called like so: