Fix building on older macOS SDKs
This commit is contained in:
parent
d6949a7a3c
commit
19e653ef1b
1 changed files with 2 additions and 5 deletions
|
|
@ -226,11 +226,8 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
|
|||
willPresentNotification:(UNNotification *)notification
|
||||
withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
|
||||
UNNotificationPresentationOptions options = UNNotificationPresentationOptionSound;
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < 110000
|
||||
options |= UNNotificationPresentationOptionAlert;
|
||||
#else
|
||||
options |= UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner;
|
||||
#endif
|
||||
if(@available(macOS 11.0, *)) options |= UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner;
|
||||
else options |= UNNotificationPresentationOptionAlert;
|
||||
completionHandler(options);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue