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 ?
Popular Macos topics

New

As requested by @DevotionGeo, a thread about Apple’s patent regarding a new reconfigurable keyboard…
Last month, Apple patented a ne...
New

Over the past decade, a large and opaque industry has been amassing increasing amounts of personal data.1,2
A complex ecosystem of websi...
New

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

Vitals is a little Mac app I built recently that shows you which programs are slowing your computer down. It lives in the menu bar, keepi...
New

macOS Monterey Preview.
macOS Monterey. Connect like never before. Exciting FaceTime updates. An all-new Safari. Powerful new ways to wo...
New

Just writing this up in case it helps anyone else because it wasn’t automatic.
First, connect you iPad to your Mac via a cable.
On your...
New

GitHub - ExistentialAudio/BlackHole: BlackHole is a modern macOS virtual audio driver that allows applications to pass audio to other app...
New

I caught bits of it, so gonna catch up now - what did you think?
New

Just looking through my settings and noticed that Help Apple Improve Search was checked - yet I am almost certain that I did not opt-in t...
New
Other popular topics

What chair do you have while working… and why?
Is there a ‘best’ type of chair or working position for developers?
New

New

I’m thinking of buying a monitor that I can rotate to use as a vertical monitor?
Also, I want to know if someone is using it for program...
New
New
New

Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New

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

Author Spotlight: James Stanier (@jstanier)
James Stanier, author of Effective Remote Work , discusses how to rethink the office as we...
New

Author Spotlight: Jamis Buck (@jamis)
This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for P...
New

Chris Seaton, the creator of TruffleRuby has died. It appears from suicide :cry:
He left this note on Twitter on the weekend:
And one...
New
Latest in Macos
Latest (all)
Categories:
My Saved Portals
-
None saved yet
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /v
- /react-native
- /wasm
- /security
- /django
- /nodejs
- /centos
- /haskell
- /rails
- /fable
- /gleam
- /swift
- /js
- /deno
- /assemblyscript
- /tailwind
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /preact
- /flutter
- /c-plus-plus
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /vuejs
- /nim
- /emacs
- /nerves
- /elm