8#include <Cocoa/Cocoa.h>
9#import <objc/runtime.h>
12@implementation NSBundle (returnCorrectIdentifier)
15 return @"org.bitcoinabc.BitcoinABC-Qt";
17 return [
self __bundleIdentifier];
25 if (this->hasUserNotificationCenterSupport()) {
27 [[NSUserNotification alloc] init];
30 [[NSUserNotificationCenter defaultUserNotificationCenter]
31 deliverNotification:userNotification];
32 [userNotification release];
Macintosh-specific notification handler (supports UserNotificationCenter).
bool hasUserNotificationCenterSupport()
check if OS can handle UserNotifications
static MacNotificationHandler * instance()
void showNotification(const QString &title, const QString &text)
shows a macOS 10.8+ UserNotification in the UserNotificationCenter
static MacDockIconHandler * s_instance
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...