abhimohata

abhimohata

CFUserNotificationDisplayAlert not showing alert window in macOS BigSur

I am intending to show an alert message in macOS through a C++ based application. I am using CFUserNotificationDisplayAlert for the same. Below is the piece of code that I have used to display the alert window which I have written in the .mm file:

CFOptionFlags cfRes;

CFUserNotificationDisplayAlert(0, kCFUserNotificationCautionAlertLevel,
                NULL, NULL, NULL,
                CFSTR("Message Header"),
                CFSTR("Message Body"),
                CFSTR("Ok"),
                NULL,
                NULL,
                &cfRes);

The above works fine on Catalina but does not show the alert window in BigSur. Is there anything I am missing ?

Where Next?

Popular Macos topics Top

AstonJ
I’m not sure if this is a Big Sur issue or whether I’ve just noticed it, but on looking at my hard drive usage it says I have used 465.0...
New
siddhant3030
I have a new MacBook Pro which I’m connecting to an external monitor. I know why it is heating but I want to know if anyone having the sa...
New
DevotionGeo
Since we’re talking about Mac, which of the filesystems should I use on an external hard drive (non-SSD), which I’ll be using with my Mac...
New
AstonJ
Just wasted hours trying to figure out why my Apple Magic keyboard 2 started lagging after the latest macOS upgrade - tried SMC and PRAM ...
New
abhimohata
I am intending to show an alert message in macOS through a C++ based application. I am using CFUserNotificationDisplayAlert for the same....
New
dav
I’m searching for a tool that can (anonymously) collect crash reports from users of my macOS app (not iOS). Previously I used Fabric whic...
New
devovipul
I have JAR application ready. i have apple account also. Please give me steps to signed app upload i try But getting error as below : A...
New
leamas
Dear forum, New on macos. Need to create a .pkg file on the command line. The tooling seems to be pkgbuild(1) and productbuild(1). My pr...
New
BadPistol97
I am trying to draw NSPanels on texts of other apps using AXObserverAddNotification with the attribute of kAXValueChangedNotification on ...
New
WillKuo
For my iOS e2e test, sometimes the test is blocked by the Mac pop-up window alert. The possible pop-up as follows: Java Access Pop-up ...
New

Other popular topics Top

PragmaticBookshelf
A PragProg Hero’s Journey with Brian P. Hogan @bphogan Have you ever worried that your only legacy will be in the form of legacy...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New