---
title: "fetch(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsobjectcontroller/fetch(_:)"
---

# fetch(_:)

Causes the receiver to fetch the data objects specified by the entity name and fetch predicate.

## Declaration

```swift
@IBAction func fetch(_ sender: Any?)
```

## Parameters

- `sender`: Typically the object that invoked this method.

## Discussion

Discussion Beginning with OS X v10.4 the result of this method is deferred until the next iteration of the runloop so that the error presentation mechanism can provide feedback as a sheet.

## See Also

### Core Data support

- [entityName](appkit/nsobjectcontroller/entityname.md)
- [usesLazyFetching](appkit/nsobjectcontroller/useslazyfetching.md)
- [defaultFetchRequest()](appkit/nsobjectcontroller/defaultfetchrequest().md)
- [fetchPredicate](appkit/nsobjectcontroller/fetchpredicate.md)
- [managedObjectContext](appkit/nsobjectcontroller/managedobjectcontext.md)
- [fetch(with:merge:)](appkit/nsobjectcontroller/fetch(with:merge:).md)
