NSNotificationCenter

E236686

NSNotificationCenter is a central dispatch mechanism in Objective-C/Cocoa frameworks that enables objects to broadcast and observe notifications for decoupled communication within an application.

All labels observed (3)

Label Occurrences
NSNotificationCenter canonical 10
NotificationCenter 3
Listener pattern 1

How this entity was disambiguated

Statements (47)

Predicate Object
instanceOf Cocoa framework component ⓘ
Objective-C class ⓘ
class ⓘ
availability available in Foundation since early versions of Cocoa ⓘ
categoryExtensionPoint can be extended via Objective-C categories ⓘ
definedIn Foundation framework ⓘ
designGoal allow a single observer to listen to multiple notifications ⓘ
allow multiple observers for a single event ⓘ
reduce coupling between sender and receiver objects ⓘ
distinctionFrom NSDistributedNotificationCenter handles interprocess notifications ⓘ
enables decoupled communication between objects ⓘ
frameworkFamily Cocoa ⓘ
Cocoa Touch ⓘ
hasMethod + defaultCenter ⓘ
- addObserver:selector:name:object: ⓘ
- addObserverForName:object:queue:usingBlock: ⓘ
- postNotification: ⓘ
- postNotificationName:object: ⓘ
- postNotificationName:object:userInfo: ⓘ
- removeObserver: ⓘ
- removeObserver:name:object: ⓘ
- removeObserver:object: ⓘ
lifecycleResponsibility observers must be removed before deallocation in non-ARC-safe patterns ⓘ
memoryManagement uses weak-like semantics conceptually for observers in modern APIs but requires manual removal in many cases ⓘ
notificationDelivery notifications are identified by name (NSString) ⓘ
notifications can carry userInfo dictionary ⓘ
notifications can specify a sender object ⓘ
platform iOS ⓘ
macOS ⓘ
tvOS ⓘ
watchOS ⓘ
primaryRole central notification dispatch mechanism ⓘ
programmingLanguage Objective-C ⓘ
relatedClass NSDistributedNotificationCenter ⓘ
NSNotification ⓘ
NSNotificationQueue ⓘ
returnsTypeForMethod + defaultCenter -> NSNotificationCenter * ⓘ
scope process-local notification delivery ⓘ
supports block-based observation ⓘ
selector-based observation ⓘ
supportsPattern observer pattern ⓘ
publish-subscribe pattern ⓘ
threadingBehavior can deliver notifications on specific NSOperationQueue via block-based API ⓘ
notifications are delivered synchronously by default ⓘ
usedFor broadcasting notifications ⓘ
in-process message passing ⓘ
observing notifications ⓘ

How these facts were elicited

Referenced by (14)

Full triples — surface form annotated when it differs from this entity's canonical label.

NeXTSTEP Foundation Kit → defines → NSNotificationCenter ⓘ
Combine → integratesWith → NotificationCenter ⓘ
linked to: NSNotificationCenter
Observer → alternativeName → Listener pattern ⓘ
linked to: NSNotificationCenter
Foundation framework → includes → NSNotificationCenter ⓘ
Foundation → includesType → NSNotificationCenter ⓘ
Key-Value Observing → relatedConcept → NotificationCenter ⓘ
linked to: NSNotificationCenter
AVPlayerItem → notifiesVia → NSNotificationCenter ⓘ
NSNotification → usedWith → NSNotificationCenter ⓘ
NSNotification → deliveredBy → NSNotificationCenter ⓘ
NSDistributedNotificationCenter → superclass → NSNotificationCenter ⓘ
NSDistributedNotificationCenter → relatedTo → NSNotificationCenter ⓘ
NSNotificationQueue → associatedWith → NSNotificationCenter ⓘ
NSNotificationQueue → usesType → NSNotificationCenter ⓘ
OCKStore → notifiesVia → NotificationCenter ⓘ
linked to: NSNotificationCenter