Platforms to show: All Mac Windows Linux Cross-Platform
Back to UNUserNotificationCenterMBS class.
UNUserNotificationCenterMBS.addNotificationRequestCompleted(request as UNNotificationRequestMBS, error as NSErrorMBS, tag as variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
error: An error object indicating whether a problem occurred. If the notification was scheduled successfully, this parameter is nil; otherwise, it is set to an error object indicating the reason for the failure.
Some examples using this event:
UNUserNotificationCenterMBS.didReceiveNotificationResponse(response as UNNotificationResponseMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
response: The user’s response to the notification. This object contains the original notification and the identifier string for the selected action. If the action allowed the user to provide a textual response, this parameter contains a UNTextInputNotificationResponseMBS object.
Use this method to process the user's response to a notification. If the user selected one of your app's custom actions, the response parameter contains the identifier for that action. (The response can also indicate that the user dismissed the notification interface, or launched your app, without selecting a custom action.) At the end of your implementation, call the completionHandler block to let the system know that you are done processing the user's response. If you do not implement this method, your app never responds to custom actions.
You specify your app’s notification types at app launch using UNNotificationCategoryMBS objects, and you specify the custom actions for each type using UNNotificationActionMBS objects.
UNUserNotificationCenterMBS.getDeliveredNotificationsCompleted(notifications() as UNNotificationMBS, tag as variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
notifications: An array of UNNotificationMBS objects representing the local and remote notifications of your app that have been delivered and are still visible in Notification Center. If none of your app’s notifications are visible in Notification Center, the array is empty.
UNUserNotificationCenterMBS.getNotificationCategoriesCompleted(categories() as UNNotificationCategoryMBS, tag as variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
categories: The array of UNNotificationCategoryMBS objects containing your registered notification types. If your app has not yet registered any categories, this parameter is an empty set.
UNUserNotificationCenterMBS.getNotificationSettingsCompleted(settings as UNNotificationSettingsMBS, tag as variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
UNUserNotificationCenterMBS.getPendingNotificationRequestsCompleted(requests() as UNNotificationRequestMBS, tag as variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
requests: An array of UNNotificationRequestMBS objects representing the scheduled notification requests. If there are no scheduled requests, this array is empty.
UNUserNotificationCenterMBS.openSettingsForNotification(notification as UNNotificationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
UNUserNotificationCenterMBS.requestAuthorizationCompleted(granted as boolean, error as NSErrorMBS, tag as variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
granted: A Boolean value indicating whether authorization was granted. The value of this parameter is YES when authorization was granted for one or more options. The value is false when authorization is denied for all options.
error: An object containing error information or nil if no error occurred.
UNUserNotificationCenterMBS.willPresentNotification(notification as UNNotificationMBS, byref options as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | User Notifications | MBS MacFrameworks Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
notification: The notification that is about to be delivered. Use the information in this object to determine an appropriate course of action. For example, you might use the information to update your app’s interface.
options
The option for notifying the user. Specify NotificationPresentationOptionNone to silence the notification completely. Specify other values to interact with the user. For a list of possible options, see constants.
If your app is in the foreground when a notification arrives, the shared user notification center calls this method to deliver the notification directly to your app. If you implement this method, you can take whatever actions are necessary to process the notification and update your app. When you finish, call the completionHandler block and specify how you want the system to alert the user, if at all.
If your event does not implement this method, the system behaves as if you had passed the UNNotificationPresentationOptionNone option to the completionHandler block. If you do not provide a delegate at all for the UNUserNotificationCenterMBS object, the system uses the notification’s original options to alert the user.
Some examples using this event:
The items on this page are in the following plugins: MBS MacFrameworks Plugin.