Trait IUNUserNotificationCenter

Source
pub trait IUNUserNotificationCenter: PNSObject {
Show 16 methods // Provided methods fn m_current_notification_center() -> UNUserNotificationCenter where Self: Sized + FromId { ... } fn m_get_notification_settings_with_completion_handler<F>( &self, completion_handler: F, ) where F: IntoConcreteBlock<(UNNotificationSettings,), Ret = ()> + 'static { ... } fn m_set_badge_count_with_completion_handler<F>( &mut self, new_badge_count: Int, completion_handler: F, ) where F: IntoConcreteBlock<(NSError,), Ret = ()> + 'static { ... } fn m_request_authorization_with_options_completion_handler<F>( &mut self, options: &[UNAuthorizationOptions], completion_handler: F, ) where F: IntoConcreteBlock<(bool, Option<NSError>), Ret = ()> + 'static { ... } fn p_delegate(&self) -> Option<id> { ... } fn p_set_delegate(&self, delegate: id) { ... } fn p_supports_content_extensions(&self) -> bool { ... } fn m_add_notification_request_with_completion_handler<F>( &mut self, request: &UNNotificationRequest, completion_handler: F, ) where F: IntoConcreteBlock<(NSError,), Ret = ()> + 'static { ... } fn m_get_pending_notification_requests_with_completion_handler<F>( &self, completion_handler: F, ) where F: IntoConcreteBlock<(NSArray<UNNotificationRequest>,)> { ... } fn m_remove_pending_notification_requests_with_identifiers( &mut self, identifiers: &NSArray<NSString>, ) { ... } fn m_remove_all_pending_notification_requests(&mut self) { ... } fn m_get_delivered_notifications_with_completion_handler<F>( &self, completion_handler: F, ) where F: IntoConcreteBlock<(NSArray<UNNotification>,)> { ... } fn m_remove_delivered_notifications_with_identifiers( &mut self, identifiers: &NSArray<NSString>, ) { ... } fn m_remove_all_delivered_notifications(&mut self) { ... } fn m_set_notification_categories( &mut self, categories: &NSSet<UNNotificationCategory>, ) { ... } fn m_get_notification_categories_with_completion_handler<F>( &self, completion_handler: F, ) where F: IntoConcreteBlock<(NSSet<UNNotificationCategory>,)> + 'static { ... }
}
Expand description

A trait containing all the methods for UNUserNotificationCenter

Provided Methods§

Source

fn m_current_notification_center() -> UNUserNotificationCenter
where Self: Sized + FromId,

Returns your app’s notification center.

Source

fn m_get_notification_settings_with_completion_handler<F>( &self, completion_handler: F, )
where F: IntoConcreteBlock<(UNNotificationSettings,), Ret = ()> + 'static,

Retrieves the authorization and feature-related settings for your app.

Source

fn m_set_badge_count_with_completion_handler<F>( &mut self, new_badge_count: Int, completion_handler: F, )
where F: IntoConcreteBlock<(NSError,), Ret = ()> + 'static,

Updates the badge count for your app’s icon.

Source

fn m_request_authorization_with_options_completion_handler<F>( &mut self, options: &[UNAuthorizationOptions], completion_handler: F, )
where F: IntoConcreteBlock<(bool, Option<NSError>), Ret = ()> + 'static,

Requests the user’s authorization to allow local and remote notifications for your app.

Source

fn p_delegate(&self) -> Option<id>

The delegate of the notification center.

Source

fn p_set_delegate(&self, delegate: id)

Sets the delegate of the notification center.

§Arguments
  • delegate - The delegate to use.
Source

fn p_supports_content_extensions(&self) -> bool

A Boolean value that indicates whether the device supports notification content extensions.

Source

fn m_add_notification_request_with_completion_handler<F>( &mut self, request: &UNNotificationRequest, completion_handler: F, )
where F: IntoConcreteBlock<(NSError,), Ret = ()> + 'static,

Schedules the delivery of a local notification.

Source

fn m_get_pending_notification_requests_with_completion_handler<F>( &self, completion_handler: F, )

Fetches all of your app’s local notifications that are pending delivery.

Source

fn m_remove_pending_notification_requests_with_identifiers( &mut self, identifiers: &NSArray<NSString>, )

Removes your app’s local notifications that are pending and match the specified identifiers.

Source

fn m_remove_all_pending_notification_requests(&mut self)

Removes all of your app’s pending local notifications.

Source

fn m_get_delivered_notifications_with_completion_handler<F>( &self, completion_handler: F, )

Fetches all of your app’s delivered notifications that are still present in Notification Center.

Source

fn m_remove_delivered_notifications_with_identifiers( &mut self, identifiers: &NSArray<NSString>, )

Removes your app’s notifications from Notification Center that match the specified identifiers.

Source

fn m_remove_all_delivered_notifications(&mut self)

Removes all of your app’s delivered notifications from Notification Center.

Source

fn m_set_notification_categories( &mut self, categories: &NSSet<UNNotificationCategory>, )

Registers the notification categories that your app supports.

Source

fn m_get_notification_categories_with_completion_handler<F>( &self, completion_handler: F, )

Fetches your app’s registered notification categories.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§