Platforms to show: All Mac Windows Linux Cross-Platform

UNUserNotificationCenterMBS.addNotificationRequest(request as UNNotificationRequestMBS, tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Schedules a local notification for delivery.
Notes:
This method schedules local notifications only; you cannot use it to schedule the delivery of remote notifications. Upon calling this method, the system begins tracking the trigger conditions associated with your request. When the trigger condition is met, the system delivers your notification. If the request does not contain a UNNotificationTriggerMBS object, the notification is delivered right away.
You may call this method from any thread of your app.

request: The request object containing the notification payload and trigger information. This parameter must not be nil.

Calls addNotificationRequestCompleted event later. Request and tag parameter is passed through.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Returns the shared user notification center object for your app or app extension.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: The destructor.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.getDeliveredNotifications(tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Returns a list of the app’s notifications that are still displayed in Notification Center.
Notes:
This method executes asynchronously, returning immediately and executing the provided block on a background thread when the results become available.

Calls getDeliveredNotificationsCompleted event later. Tag parameter is

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.getNotificationCategories(tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Retrieves the app’s currently registered notification categories.
Notes:
Use this method to retrieve your app’s currently registered notification types. You might use this method when you want to augment the current set of categories with new categories later on. Simply merge the returned set with any new category objects and register the updated set.

Calls getNotificationCategoriesCompleted event later. Tag parameter is passed through.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.getNotificationSettings(tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Requests the notification settings for this app.
Notes:
Use this method to determine the user interactions and notification-related features that your app is authorized to use. You might then use this information to enable or disable specific notification-related features of your app.
When the user initially grants authorization to your app, the system gives your app a set of default notification-related settings. The user may change those settings at any time to enable or disable specific capabilities. For example, the user might disable the playing of sounds when a notification arrives.

Calls getNotificationSettingsCompleted event later. Tag parameter is passed through.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.getPendingNotificationRequests(tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Returns a list of all notification requests that are scheduled and waiting to be delivered.
Notes:
This method executes asynchronously, returning immediately and executing the provided block on a secondary thread when the results are available.

Calls getPendingNotificationRequestsCompleted event later. Tag parameter is passed through.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.removeAllDeliveredNotifications
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Removes all of the app’s delivered notifications from Notification Center.
Notes: Use this method to remove all of your app’s delivered notifications from Notification Center. The method executes asynchronously, returning immediately and removing the identifiers on a background thread. This method does not affect any notification requests that are scheduled, but have not yet been delivered.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.removeAllPendingNotificationRequests
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Unschedules all pending notification requests.
Notes: This method executes asynchronously, removing all pending notification requests on a secondary thread.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.removeDeliveredNotifications(identifiers() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Removes the specified notification requests from Notification Center.
Notes:
identifiers: An array of strings, each of which corresponds to a value in the identifier property of a UNNotificationRequestMBS object. This method ignores the identifiers of requests whose notifications are not currently displayed in Notification Center.

Use this method to selectively remove notifications that you no longer want displayed in Notification Center. The method executes asynchronously, returning immediately and removing the specified notifications on a background thread.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.removePendingNotificationRequests(identifiers() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Unschedules the specified notification requests.
Notes:
identifiers: An array of strings, each of which contains the identifier of an active UNNotificationRequestMBS object. If the identifier belongs to a non repeating request, and the trigger condition for that request has already been met, this method ignores the identifier.

This method executes asynchronously, removing the pending notification requests on a secondary thread.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.requestAuthorization(options as integer, tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Requests authorization to interact with the user when local and remote notifications are delivered to the user's device.
Notes:
options: The authorization options your app is requesting. You may combine the available constants to request authorization for multiple items. Request only the authorization options that you plan to use. For a list of possible values, see UNAuthorizationOptions.

Calls requestAuthorizationCompleted event later. The tag parameter is passed through.

If your app's local or remote notifications involve user interactions, you must request authorization for the system to perfom those interactions on your app's behalf. Interactions include displaying an alert, playing a sound, or badging the app's icon.

Always call this method before scheduling any local notifications and before registering with the Apple Push Notification service. Typically, you call this method at launch time when configuring your app's notification support.

The first time your app ever calls the method, the system prompts the user to authorize the requested interactions. The user may grant or deny authorization, and the system stores the user’s response so that subsequent calls to this method do not prompt the user again. After determining the authorization status, the user notification center object executes the block in the completionHandler parameter. Use that block to make any adjustments to your app's behavior. For example, if authorization was denied, you might notify a remote notification server not to send notifications to the user’s device.

The user may change the allowed interactions at any time in system settings. Use the getNotificationSettings method to determine what interactions are currently allowed for your app.

Feedback, Comments & Corrections

UNUserNotificationCenterMBS.setNotificationCategories(categories() as UNNotificationCategoryMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method User Notifications MBS MacFrameworks Plugin 19.1 Yes No No Yes, macOS only No
Function: Registers your app’s notification types and the custom actions that they support.
Notes:
categories: A set of UNNotificationCategoryMBS objects, each of which contains the actions that are displayed with the notification interface. This parameter must contain all of your app’s supported categories.

Call this method at launch time to register your app’s actionable notification types. This method registers all of your categories at once, replacing any previously registered categories with the new ones in the categories parameter. Typically, you call this method only once.

Each object in the categories parameter contains a string for identifying the notification's type. It also contains one or more custom actions that the user may perform in response to notifications of that type. When the system displays an alert for a notification, it looks in the notification payload for one of the identifier strings from your category objects. If it finds one, it adds user-selectable buttons for each action associated with that category object. Tapping a button notifies your app of the selected action, without bringing your app to the foreground.

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo PDF Plugins