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
The class for an action for a notification.

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
  • 2 methods
    • method Constructor(identifier as string, title as string, options as integer)
    • method copy as UNNotificationActionMBS
  • 2 shared methods
    • shared method action(identifier as string, title as string, options as integer) as UNNotificationActionMBS
    • shared method Available as boolean
  • 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:

Blog Entries

Release notes


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


UNMutableNotificationContentMBS   -   UNNotificationAttachmentMBS


The biggest plugin in space...