Skip to content

Titanium.App.iOS.UserNotificationCenter

The top-level App iOS Notification Center module. It is used to control scheduled notifications and receive details about the system-wide notification settings.

Extends: Titanium.Module · Since: 7.3.0 · Platforms: iphone, ipad, macos

Properties #

apiName#

extended

Type: String

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button
returns Ti.UI.Button.

lifecycleContainer#

extended

Type: Titanium.UI.Window, Titanium.UI.TabGroup

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks
will also be called on the proxy. Proxies that require the activity lifecycle will need this property set
to the appropriate containing Window or TabGroup.

Methods #

getDeliveredNotifications #

Fetches the delivered notifications asynchronously.

Parameters:
NameTypeSummaryOptional
callbackCallback<UserNotificationCallbackResponse>The function that is being called after the notifications
have been fetched.
No

getPendingNotifications #

Fetches the pending notifications asynchronously.

Parameters:
NameTypeSummaryOptional
callbackCallback<UserNotificationCallbackResponse>The function that is being called after the notifications
have been fetched.
No

removeDeliveredNotifications #

Removes the specified delivered notifications from the notification-center.
If no notifications are specified, all delivered notifications will be removed.

Delivered notifications can be obtained via a call to the Titanium.App.iOS.UserNotificationCenter.getDeliveredNotifications
method.

Parameters:
NameTypeSummaryOptional
notificationsArray<UserNotificationDictionary>The delivered notification to remove. If none specified, all pending notifications
will be removed.
No

removePendingNotifications #

Removes the specified pending notifications to prevent them from being triggered.
If no notifications are specified, all pending notifications will be removed.

Pending notifications can be obtained via a call to the Titanium.App.iOS.UserNotificationCenter.getPendingNotifications
method.

Parameters:
NameTypeSummaryOptional
notificationsArray<UserNotificationDictionary>The pending notification to remove. If none specified, all pending notifications
will be removed.
No

requestUserNotificationSettings #

Notification types and user notification categories the application is registered to use.

Parameters:
NameTypeSummaryOptional
callbackCallback<GetUserNotificationSettings>The callback invoked when requesting user notification settings.No

Titanium SDK Documentation