Platforms to show: All Mac Windows Linux Cross-Platform
UNNotificationMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A UNNotification object contains the initial notification request, which contains the notification's payload, and the date on which the notification was delivered.
Don't create notification objects directly. When handling notifications, the system delivers notification objects to your events. The UNUserNotificationCenterMBS object also maintains the list of notifications that were previously delivered, and you use the getDeliveredNotifications method to retrieve those objects.
- 4 properties
- property Date as Date
- property DateTime as DateTime
- property Handle as Integer
- property request as UNNotificationRequestMBS
- 3 methods
- method Constructor Private
- method Constructor(Handle as Integer)
- method copy as UNNotificationMBS
- 2 shared methods
- shared method Available as boolean
- shared method UNErrorDomain as String
- 9 constants
Errors
Constant | Value | Description |
---|---|---|
UNErrorCodeAttachmentCorrupt | 105 |
The file for an attachment is corrupt. |
UNErrorCodeAttachmentInvalidFileSize | 102 |
An attachment is too large. |
UNErrorCodeAttachmentInvalidURL | 100 |
The URL for an attachment was invalid. |
UNErrorCodeAttachmentMoveIntoDataStoreFailed | 104 |
An error occurred when trying to move an attachment to the system data store. |
UNErrorCodeAttachmentNotInDataStore | 103 |
The specified attachment is not in the system data store. |
UNErrorCodeAttachmentUnrecognizedType | 101 |
The file type of an attachment is not supported. |
UNErrorCodeNotificationInvalidNoContent | 1401 |
The notification has no user-facing content, but should. |
UNErrorCodeNotificationInvalidNoDate | 1400 |
The notification does not have an associated date, but should. |
UNErrorCodeNotificationsNotAllowed | 1 |
Notifications are not allowed. This error occurs when you try to submit a notification request and your app or app extension is not authorized to schedule notifications. |
This class has no sub classes.
Some properties using for this class:
- UNNotificationResponseMBS.notification as UNNotificationMBS
Some events using this class:
- UNUserNotificationCenterMBS.getDeliveredNotificationsCompleted(notifications() as UNNotificationMBS, tag as variant)
- UNUserNotificationCenterMBS.openSettingsForNotification(notification as UNNotificationMBS)
- UNUserNotificationCenterMBS.willPresentNotification(notification as UNNotificationMBS, byref options as Integer)
Some examples using this class:
Blog Entries
- MBS Xojo Plugins, version 21.1pr4
- MBS Xojo Plugins, version 20.6pr1
- MonkeyBread Software Releases the MBS Xojo Plugins in version 19.1
- MBS Xojo Plugins, version 19.1pr1
Xojo Developer Magazine
Videos
Release notes
- Version 21.1
- Added Constructor for handle to UNNotificationMBS, UNNotificationContentMBS, NSToolbarItemMBS and NSToolbarMBS.
- Version 21.0
- Deprecated NSUserNotificationMBS in favor of UNNotificationMBS class.
- Version 19.1
- Added UNNotificationMBS and related classes for notifications on MacOS 10.14 or newer. (NSUserNotificationMBS is deprecated by Apple.)
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
UNNotificationContentMBS - UNNotificationRequestMBS