macOS: NSUserNotification is deprecated #475

issue fanquake opened this issue on November 16, 2021
  1. fanquake commented at 1:40 AM on November 16, 2021: member

    NSUserNotification is deprecated, and could be replaced with the UserNotifications framework. UserNotifications has been available since macOS 10.14, which is our minimum required macOS.

    qt/macnotificationhandler.mm:27:9: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
            NSUserNotification* userNotification = [[NSUserNotification alloc] init];
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
    [@interface](/bitcoin-core-gui/contributor/interface/) NSUserNotification : NSObject <NSCopying> {
               ^
    qt/macnotificationhandler.mm:27:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
            NSUserNotification* userNotification = [[NSUserNotification alloc] init];
                                                     ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
    [@interface](/bitcoin-core-gui/contributor/interface/) NSUserNotification : NSObject <NSCopying> {
               ^
    qt/macnotificationhandler.mm:30:11: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
            [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
              ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
    [@interface](/bitcoin-core-gui/contributor/interface/) NSUserNotificationCenter : NSObject {
               ^
      CXX      qt/libbitcoinqt_a-moc_createwalletdialog.o
    3 warnings generated.
    
  2. fanquake added the label macOS on Nov 16, 2021
  3. hebasto commented at 11:16 PM on November 16, 2021: member

    Also #112.

  4. hebasto commented at 8:57 PM on April 9, 2022: member

    Closing. Let's keep discussion in #112.

  5. hebasto closed this on Apr 9, 2022

  6. bitcoin-core locked this on Apr 9, 2023
Contributors
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 09:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me