---
title: "CFUserNotificationDisplayNotice(_:_:_:_:_:_:_:_:)"
framework: Core Foundation
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: "corefoundation/cfusernotificationdisplaynotice(_:_:_:_:_:_:_:_:)"
---

# CFUserNotificationDisplayNotice(_:_:_:_:_:_:_:_:)

Displays a user notification dialog that does not need a user response.

## Declaration

```swift
func CFUserNotificationDisplayNotice(_ timeout: CFTimeInterval, _ flags: CFOptionFlags, _ iconURL: CFURL!, _ soundURL: CFURL!, _ localizationURL: CFURL!, _ alertHeader: CFString!, _ alertMessage: CFString!, _ defaultButtonTitle: CFString!) -> Int32
```

## Parameters

- `timeout`: The amount of time to wait for the user to dismiss the notification dialog before the dialog dismisses itself. Pass 0 to have the dialog never time out.
- `flags`: A set of flags describing the type of notification dialog to display. The value is normally just the alert level from doc://com.apple.corefoundation/documentation/CoreFoundation/1534483-alert-levels. If you don’t want a default button displayed, perform a bitwise-OR operation with the alert level and the constant doc://com.apple.corefoundation/documentation/CoreFoundation/kCFUserNotificationNoDefaultButtonFlag.
- `iconURL`: A file URL pointing to the icon to display in the dialog. If NULL, a default icon is used based on the notification’s alert level specified in flags.
- `soundURL`: Not used.
- `localizationURL`: A file URL pointing to a bundle that contains localized versions of the strings displayed in the dialog. Can be NULL.
- `alertHeader`: The title of the notification dialog. Cannot be NULL.
- `alertMessage`: The message string to display in the dialog. Can be NULL.
- `defaultButtonTitle`: The title of the default button. If NULL, the string OK is used.

## Return Value

Return Value 0 if the cancel was successful; a non-0 value otherwise.

## Discussion

Discussion This function returns immediately. It does not wait for a user response after displaying the dialog.

## See Also

### CFUserNotification Miscellaneous Functions

- [CFUserNotificationCancel(_:)](corefoundation/cfusernotificationcancel(_:).md)
- [CFUserNotificationCheckBoxChecked(_:)](corefoundation/cfusernotificationcheckboxchecked(_:).md)
- [CFUserNotificationCreate(_:_:_:_:_:)](corefoundation/cfusernotificationcreate(_:_:_:_:_:).md)
- [CFUserNotificationCreateRunLoopSource(_:_:_:_:)](corefoundation/cfusernotificationcreaterunloopsource(_:_:_:_:).md)
- [CFUserNotificationDisplayAlert(_:_:_:_:_:_:_:_:_:_:_:)](corefoundation/cfusernotificationdisplayalert(_:_:_:_:_:_:_:_:_:_:_:).md)
- [CFUserNotificationGetResponseDictionary(_:)](corefoundation/cfusernotificationgetresponsedictionary(_:).md)
- [CFUserNotificationGetResponseValue(_:_:_:)](corefoundation/cfusernotificationgetresponsevalue(_:_:_:).md)
- [CFUserNotificationGetTypeID()](corefoundation/cfusernotificationgettypeid().md)
- [CFUserNotificationPopUpSelection(_:)](corefoundation/cfusernotificationpopupselection(_:).md)
- [CFUserNotificationReceiveResponse(_:_:_:)](corefoundation/cfusernotificationreceiveresponse(_:_:_:).md)
- [CFUserNotificationSecureTextField(_:)](corefoundation/cfusernotificationsecuretextfield(_:).md)
- [CFUserNotificationUpdate(_:_:_:_:)](corefoundation/cfusernotificationupdate(_:_:_:_:).md)
