diff --git a/src/core/mac_delegate.h b/src/core/mac_delegate.h index c206e0903..b3127d121 100644 --- a/src/core/mac_delegate.h +++ b/src/core/mac_delegate.h @@ -29,7 +29,7 @@ class PlatformInterface; @class SPMediaKeyTap; -@interface AppDelegate : NSObject { +@interface AppDelegate : NSObject { PlatformInterface* application_handler_; NSMenu* dock_menu_; MacGlobalShortcutBackend* shortcut_handler_; diff --git a/src/core/mac_startup.mm b/src/core/mac_startup.mm index 7cc49af85..cd9bc3366 100644 --- a/src/core/mac_startup.mm +++ b/src/core/mac_startup.mm @@ -250,13 +250,7 @@ static BreakpadRef InitBreakpad() { [delegate_ setShortcutHandler:shortcut_handler_]; [self setDelegate:delegate_]; - Class notification_center_class = - NSClassFromString(@"NSUserNotificationCenter"); - if (notification_center_class) { - id notification_center = - [notification_center_class defaultUserNotificationCenter]; - [notification_center setDelegate:delegate_]; - } + [[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:delegate_]; } - (void)sendEvent:(NSEvent*)event {