<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/DistributedNotificationCenter/post(name:object:userInfo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDistributedNotificationCenter(im)postNotificationName:object:userInfo:"
  },
  "title" : "post(name:object:userInfo:)"
}
-->

# post(name:object:userInfo:)

Creates a notification with information, and posts it to the receiver.

```
func post(name aName: NSNotification.Name, object anObject: String?, userInfo aUserInfo: [AnyHashable : Any]? = nil)
```

## Parameters

`aName`

Name of the notification to post. Must not be `nil`.

`anObject`

Sender of the notification. May be `nil`.

`aUserInfo`

Dictionary containing additional information. May be `nil`.
  
  > Important:
  > Sandboxed apps can send notifications only if they do not contain a dictionary. If the sending application is in an App Sandbox, `notificationInfo` *must* be `nil`.

## Discussion

This method invokes [`postNotificationName(_:object:userInfo:deliverImmediately:)`](/documentation/Foundation/DistributedNotificationCenter/postNotificationName(_:object:userInfo:deliverImmediately:)) with `deliverImmediately:NO`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)