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