---
title: target
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsmenuitem/target
---

# target

The menu item’s target.

## Declaration

```swift
weak var target: AnyObject? { get set }
```

## Discussion

Discussion To ensure that a menu item’s target can receive commands while a modal dialog is open, the target object should return true in worksWhenModal.

## See Also

### Managing the target and action

- [action](appkit/nsmenuitem/action.md)
