default
TypeScriptstatic get default(): NotificationCenterSwift declarationclass var `default`: NotificationCenter { get }class · SDK 27.1
class NotificationCenterstatic get default(): NotificationCenterSwift declarationclass var `default`: NotificationCenter { get }addObserver(name: (NSNotification_Name) | null, obj: (unknown) | null, queue: (OperationQueue) | null, block: ((arg0: Notification) => void)): SDKHandleSwift declarationfunc addObserver(forName name: NSNotification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping @Sendable (Notification) -> Void) -> any NSObjectProtocolstatic init(): NotificationCenterSwift declarationinit()post(notification: Notification): voidSwift declarationfunc post(_ notification: Notification)postNameObject(aName: NSNotification_Name, anObject?: (unknown) | null): voidSwift declarationfunc post(name aName: NSNotification.Name, object anObject: Any?)postNameObjectUserInfo(aName: NSNotification_Name, anObject?: (unknown) | null, aUserInfo?: (NativeMap<unknown, unknown>) | null): voidSwift declarationfunc post(name aName: NSNotification.Name, object anObject: Any?, userInfo aUserInfo: [AnyHashable : Any]? = nil)removeObserver(observer: unknown): voidSwift declarationfunc removeObserver(_ observer: Any)removeObserverNameObject(observer: unknown, aName?: (NSNotification_Name) | null, anObject?: (unknown) | null): voidSwift declarationfunc removeObserver(_ observer: Any, name aName: NSNotification.Name?, object anObject: Any?)notifications(name: NSNotification_Name, object?: ((unknown) & (SDKHandle)) | null): NotificationCenter_NotificationsSwift declaration@preconcurrency func notifications(named name: Notification.Name, object: (any AnyObject & Sendable)? = nil) -> NotificationCenter.NotificationsReturns an asynchronous sequence of notifications produced by this center for a given notification name and optional source object. - Parameters: - name: A notification name. The sequence includes only notifications with this name. - object: A source object of notifications. Specify a sender object to deliver only notifications from that sender. When `nil`, the notification center doesn't consider the sender as a criteria for delivery. - Returns: An asynchronous sequence of notifications from the center.
removeObserver22175(token: NotificationCenter_ObservationToken): voidSwift declarationfunc removeObserver(_ token: NotificationCenter.ObservationToken)Stops the observation represented by the given observation token. - Parameter token: a unique token representing a specific observer in a specific notification center. You receive this type from prior calls to `addObserver(of:for:using:)`.
publisher(name: NSNotification_Name, object?: (unknown) | null): NotificationCenter_PublisherSwift declarationfunc publisher(for name: Notification.Name, object: AnyObject? = nil) -> NotificationCenter.PublisherReturns a publisher that emits events when broadcasting notifications. - Parameters: - name: The name of the notification to publish. - object: The object posting the named notfication. If `nil`, the publisher emits elements for any object producing a notification with the given name. - Returns: A publisher that emits events when broadcasting notifications.
14 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
NotificationCenter.addObserver(of:for:using:)
This declaration needs Swift generic type arguments. (no canonical witness for Message.Subject)
NotificationCenter.addObserver(of:for:using:)
Passing a Swift type itself is not supported.
NotificationCenter.addObserver(of:for:using:)
Passing a Swift type itself is not supported.
NotificationCenter.post(_:subject:)
This declaration needs Swift generic type arguments. (no canonical witness for Message)
NotificationCenter.post(_:)
This declaration needs Swift generic type arguments. (no canonical witness for Message)
NotificationCenter.messages(of:for:bufferSize:)
This declaration needs Swift generic type arguments. (no canonical witness for Message.Subject)
NotificationCenter.messages(of:for:bufferSize:)
Passing a Swift type itself is not supported.
NotificationCenter.messages(of:for:bufferSize:)
Passing a Swift type itself is not supported.
NotificationCenter.addObserver(of:for:using:)
This declaration needs Swift generic type arguments. (no canonical witness for Message.Subject)
NotificationCenter.addObserver(of:for:using:)
Passing a Swift type itself is not supported.
NotificationCenter.addObserver(of:for:using:)
Passing a Swift type itself is not supported.
NotificationCenter.post(_:subject:)
This declaration needs Swift generic type arguments. (no canonical witness for Message)
NotificationCenter.post(_:)
This declaration needs Swift generic type arguments. (no canonical witness for Message)
NotificationCenter.addObserver(_:selector:name:object:)
Objective-C selectors cannot cross the bridge.