Platforms to show: All Mac Windows Linux Cross-Platform
UNNotificationActionMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use UNNotificationAction objects to define the actions that your app can perform in response to a delivered notification. You define the actions that your app supports. For example, a meeting app might define actions for accepting or rejecting a meeting invitation. The action object itself contains the title to display in an action button and the button's appearance. After creating action objects, add them to a UNNotificationCategory object and register your categories with the system.
For information on how to define actions and categories, see Declaring Your Actionable Notification Types.
When the user selects one of your actions in response to a notification, the system notifies the delegate of the shared UNUserNotificationCenterMBS object. Specifically, the system calls the didReceiveNotificationResponse event. The response object passed to your delegate includes the identifier string of the action that was selected, which you can use to perform the corresponding task.
- 4 properties
- property Handle as Integer
- property identifier as String
- property options as Integer
- property title as String
- 2 methods
- method Constructor(identifier as string, title as string, options as integer)
- method copy as UNNotificationActionMBS
- 2 shared methods
- 4 constants
Options
Constant | Value | Description |
---|---|---|
OptionAuthenticationRequired | 1 | The action can be performed only on an unlocked device. more |
OptionDestructive | 2 | The action performs a destructive task. more |
OptionForeground | 4 | The action causes the app to launch in the foreground. more |
OptionNone | 0 |
The action has the default behavior. |
Sub classes:
Some methods using this class:
- UNNotificationCategoryMBS.actions as UNNotificationActionMBS()
- UNNotificationCategoryMBS.category(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, hiddenPreviewsBodyPlaceholder as String, categorySummaryFormat as String, options as Integer) as UNNotificationCategoryMBS
- UNNotificationCategoryMBS.category(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, hiddenPreviewsBodyPlaceholder as String, options as Integer) as UNNotificationCategoryMBS
- UNNotificationCategoryMBS.category(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, options as Integer) as UNNotificationCategoryMBS
- UNNotificationCategoryMBS.Constructor(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, hiddenPreviewsBodyPlaceholder as String, categorySummaryFormat as String, options as Integer)
- UNNotificationCategoryMBS.Constructor(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, hiddenPreviewsBodyPlaceholder as String, options as Integer)
- UNNotificationCategoryMBS.Constructor(identifier as String, actions() as UNNotificationActionMBS, intentIdentifiers() as string, options as Integer)
Blog Entries
Release notes
- Version 21.0
- Deprecated NSUserNotificationActionMBS in favor of UNNotificationActionMBS class.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
UNMutableNotificationContentMBS - UNNotificationAttachmentMBS