One Logo Pool Ball
UserNotifications · IOS API REFERENCE

UNUserNotificationCenter

class · iOS 10.0+ · SDK 27.1

class UNUserNotificationCenter

Members (16)

static · iOS 10.0+

current

TypeScript
static current(): UNUserNotificationCenter
Swift declaration
class func current() -> UNUserNotificationCenter
method · iOS 10.0+

add

TypeScript
add(request: UNNotificationRequest, completionHandler?: (((arg0: (NativeError) | null) => void)) | null): void
Swift declaration
func add(_ request: UNNotificationRequest) async throws
method · iOS 10.0+

getDeliveredNotifications

TypeScript
getDeliveredNotifications(completionHandler: ((arg0: Array<UNNotification>) => void)): void
Swift declaration
func deliveredNotifications() async -> [UNNotification]
method · iOS 10.0+

getNotificationCategories

TypeScript
getNotificationCategories(completionHandler: ((arg0: Array<UNNotificationCategory>) => void)): void
Swift declaration
func notificationCategories() async -> Set<UNNotificationCategory>
method · iOS 10.0+

getNotificationSettings

TypeScript
getNotificationSettings(completionHandler: ((arg0: UNNotificationSettings) => void)): void
Swift declaration
func notificationSettings() async -> UNNotificationSettings
method · iOS 10.0+

getPendingNotificationRequests

TypeScript
getPendingNotificationRequests(completionHandler: ((arg0: Array<UNNotificationRequest>) => void)): void
Swift declaration
func pendingNotificationRequests() async -> [UNNotificationRequest]
method · iOS 10.0+

removeAllDeliveredNotifications

TypeScript
removeAllDeliveredNotifications(): void
Swift declaration
func removeAllDeliveredNotifications()
method · iOS 10.0+

removeAllPendingNotificationRequests

TypeScript
removeAllPendingNotificationRequests(): void
Swift declaration
func removeAllPendingNotificationRequests()
method · iOS 10.0+

removeDeliveredNotifications

TypeScript
removeDeliveredNotifications(identifiers: Array<string>): void
Swift declaration
func removeDeliveredNotifications(withIdentifiers identifiers: [String])
method · iOS 10.0+

removePendingNotificationRequests

TypeScript
removePendingNotificationRequests(identifiers: Array<string>): void
Swift declaration
func removePendingNotificationRequests(withIdentifiers identifiers: [String])
method · iOS 10.0+

requestAuthorization

TypeScript
requestAuthorization(options: UNAuthorizationOptions, completionHandler: ((arg0: boolean, arg1: (NativeError) | null) => void)): void
Swift declaration
func requestAuthorization(options: UNAuthorizationOptions = []) async throws -> Bool
method · iOS 16.0+

setBadgeCount

TypeScript
setBadgeCount(newBadgeCount: number, completionHandler?: (((arg0: (NativeError) | null) => void)) | null): void
Swift declaration
func setBadgeCount(_ newBadgeCount: Int) async throws
method · iOS 10.0+

setNotificationCategories

TypeScript
setNotificationCategories(categories: Array<UNNotificationCategory>): void
Swift declaration
func setNotificationCategories(_ categories: Set<UNNotificationCategory>)
get · iOS 10.0+

delegate

TypeScript
get delegate(): (SDKHandle) | null
Swift declaration
weak var delegate: (any UNUserNotificationCenterDelegate)? { get set }
set · iOS 10.0+

delegate

TypeScript
set delegate(value: (Implements<UNUserNotificationCenterDelegate> | SDKHandle) | null)
Swift declaration
weak var delegate: (any UNUserNotificationCenterDelegate)? { get set }
get · iOS 10.0+

supportsContentExtensions

TypeScript
get supportsContentExtensions(): boolean
Swift declaration
var supportsContentExtensions: Bool { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UNUserNotificationCenter.init()

inherited init: clang: 'init' is unavailable

All UserNotifications types →