---
title: "notificationWithName:object:userInfo:"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/nsnotification/notificationwithname:object:userinfo:"
---

# notificationWithName:object:userInfo:

Returns a notification object with a specified name, object, and user information.

## Declaration

```occ
+ (instancetype) notificationWithName:(NSNotificationName) aName object:(id) anObject userInfo:(NSDictionary *) aUserInfo;
```

## Parameters

- `aName`: The name for the new notification. May not be nil.
- `anObject`: The object for the new notification.
- `aUserInfo`: The user information dictionary for the new notification. May be nil.

## See Also

### Related Documentation

- [post(name:object:userInfo:)](foundation/notificationcenter/post(name:object:userinfo:).md)

### Creating Notifications

- [init](foundation/nsnotification/init.md)
- [init(coder:)](foundation/nsnotification/init(coder:).md)
- [init(name:object:)](foundation/nsnotification/init(name:object:).md)
- [init(name:object:userInfo:)](foundation/nsnotification/init(name:object:userinfo:).md)
- [NSNotification.Name](foundation/nsnotification/name-swift.struct.md)
