Platforms to show: All Mac Windows Linux Cross-Platform

UNNotificationCategoryMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: A type of notification that your app supports and the custom actions to display with it.
A UNNotificationCategoryMBS object defines a type of notification that your executable can receive. You create category objects to define your app's actionable notifications—that is, notifications that have action buttons that the user can select in response to the notification. Each category object you create stores the actions and other behaviors associated with a specific type of notification. Register your category objects using the setNotificationCategories method of UNUserNotificationCenterMBS. You can register as many category objects as you want.

To apply category objects to your notifications, include the category’s identifier string in the payload of any notifications you create. For local notifications, put this string in the categoryIdentifier property of the UNMutableNotificationContentMBS object that you use to specify the notification’s content. For remote notifications, use this string as the value of the category key in the aps dictionary of your payload.

Categories can have associated actions, which define custom buttons to display for notifications of that category. When space is unlimited, the system displays up to 10 actions. When space is limited, the system displays at most two actions.

Feedback, Comments & Corrections


Constant Value Description
OptionAllowInCarPlay 2 Allow CarPlay to display notifications of this type.
Apps must be approved for CarPlay overall and then you must enable CarPlay for the notification types you want displayed. If a category does not explicitly contain this option, notifications of that type are not displayed in a CarPlay environment.
OptionCustomDismissAction 1 Send dismiss actions to the UNUserNotificationCenter object’s delegate for handling.
OptionHiddenPreviewsShowSubtitle 8 Show the notification's subtitle, even if the user has disabled notification previews for the app.
OptionHiddenPreviewsShowTitle 4 Show the notification's title, even if the user has disabled notification previews for the app.
OptionNone 0 No options.

This class has no sub classes.

Some methods using this class:

Some events for this class:

The items on this page are in the following plugins: MBS MacFrameworks Plugin.

UNNotificationAttachmentMBS   -   UNNotificationContentMBS

The biggest plugin in space...

MBS Xojo Chart Plugins