---
title: "post(name:object:userInfo:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/distributednotificationcenter/post(name:object:userinfo:)"
---

# post(name:object:userInfo:)

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

## Declaration

```swift
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

Discussion This method invokes postNotificationName(_:object:userInfo:deliverImmediately:) with deliverImmediately:NO.

## See Also

### Posting Notifications

- [post(name:object:)](foundation/distributednotificationcenter/post(name:object:).md)
- [postNotificationName(_:object:userInfo:deliverImmediately:)](foundation/distributednotificationcenter/postnotificationname(_:object:userinfo:deliverimmediately:).md)
- [postNotificationName(_:object:userInfo:options:)](foundation/distributednotificationcenter/postnotificationname(_:object:userinfo:options:).md)
