Platforms to show: All Mac Windows Linux Cross-Platform
UNNotificationCategoryMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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.
- 5 properties
- property categorySummaryFormat as String
- property Handle as Integer
- property hiddenPreviewsBodyPlaceholder as String
- property identifier as String
- property options as Integer
- 6 methods
- method actions as UNNotificationActionMBS()
- method Constructor(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, hiddenPreviewsBodyPlaceholder as String, categorySummaryFormat as String, options as Integer)
- method Constructor(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, hiddenPreviewsBodyPlaceholder as String, options as Integer)
- method Constructor(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, options as Integer)
- method copy as UNNotificationCategoryMBS
- method intentIdentifiers as String()
- 4 shared methods
- shared method Available as boolean
- shared method category(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, hiddenPreviewsBodyPlaceholder as String, categorySummaryFormat as String, options as Integer) as UNNotificationCategoryMBS
- shared method category(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, hiddenPreviewsBodyPlaceholder as String, options as Integer) as UNNotificationCategoryMBS
- shared method category(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, options as Integer) as UNNotificationCategoryMBS
- 5 constants
Options
Constant | Value | Description |
---|---|---|
OptionAllowInCarPlay | 2 | Allow CarPlay to display notifications of this type. more |
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:
- UNUserNotificationCenterMBS.setNotificationCategories(categories() as UNNotificationCategoryMBS)
Some events using this class:
- UNUserNotificationCenterMBS.getNotificationCategoriesCompleted(categories() as UNNotificationCategoryMBS, tag as variant)
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
UNNotificationAttachmentMBS - UNNotificationContentMBS