Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
- completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionBanner);
+ if (@available(macOS 11.0, *)) {
+ completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionBanner);
+ } else {
+ completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionAlert);
+ }
}
- (void)userNotificationCenter:(UNUserNotificationCenter *)center