# CFUserNotificationDisplayAlert not showing alert window in macOS BigSur

**URL:** <https://forum.devtalk.com/t/cfusernotificationdisplayalert-not-showing-alert-window-in-macos-bigsur/10763>\
**Category:** macOS Questions/Help\
**Tags:** macos\
**Created:** [23 June 2021 11:35 UTC](https://forum.devtalk.com/t/cfusernotificationdisplayalert-not-showing-alert-window-in-macos-bigsur/10763 "2021-06-23T11:35:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhimohata](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@abhimohata](https://forum.devtalk.com/u/abhimohata)\
**Post date:** [23 June 2021 11:35 UTC](https://forum.devtalk.com/t/cfusernotificationdisplayalert-not-showing-alert-window-in-macos-bigsur/10763/1 "2021-06-23T11:35:26Z")

</div>

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:

```auto
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 ?
