
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 ?
Popular Mac Os topics

What was it? What language did you use? How did you find the experience?
New

Apple’s Swift programming language has finally reached stability, and developers are demanding to know how to program the language proper...
New

Core Data expert Marcus Zarra walks you through a fully developed application based around the Core Data APIs. You’ll build on this appli...
New

A statement from Apple regarding recent privacy concerns…
Privacy protections
macOS has been designed to keep users and their data safe...
New

Hi there!
Do you use any “clean up” app like CleanMyMac X ?
If yes, what is those apps?
New

I know it’s generally down to personal preference, but those preferences can be interesting - and perhaps any misconceptions can be clear...
New

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

I am intending to show an alert message in macOS through a C++ based application. I am using CFUserNotificationDisplayAlert for the same....
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

A quirky, fast-paced tour of the components of modern concurrency in Swift.
Daniel H Steinberg
Swift’s new async/await family is a ...
New
Other popular topics

New

Just done a fresh install of macOS Big Sur and on installing Erlang I am getting:
asdf install erlang 23.1.2
Configure failed.
checking ...
New

I am a Linux user since 2012, more or less, and I always use Ubuntu on my computers, and my last 2 laptops have been used Thinkpads, wher...
New

The V Programming Language
Simple language for building maintainable programs
V is already mentioned couple of times in the forum, but I...
New

Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New

A Hero’s Journey
with Chris Pine
@chrispine
Chris Pine, author of Learn to Program, Third Edition, discusses his journey to beco...
New

API 4
Path:
/user/following/
Method:
GET
Description:
Returns the list of all names of people whom the user follows
Response
[
{ ...
New

Author Spotlight:
David Bryant Copeland
@davetron5000
We’re so happy to bring you another Author Spotlight, a series where we sit dow...
New

Author Spotlight:
VM Brasseur
@vmbrasseur
We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New

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
Latest in macOS
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /haskell
- /java
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /textmate
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /django
- /spring
- /diversity
- /lua
- /nodejs
- /slackware
- /julia
- /c
- /neovim