---
title: performFetch()
framework: coredata
role: symbol
role_heading: Instance Method
path: coredata/nsfetchedresultscontroller/performfetch()
---

# performFetch()

Executes the controller’s fetch request.

## Declaration

```swift
func performFetch() throws
```

## Discussion

Discussion After you execute this method, access the controller’s fetched objects using the fetchedObjects property. important: If you specify a value for the sectionNameKeyPath parameter when you initialize the fetched results controller, the fetch request must include a sort descriptor for the corresponding key path; otherwise, the fetch fails.

## See Also

### Initializing a Fetched Results Controller

- [init(fetchRequest:managedObjectContext:sectionNameKeyPath:cacheName:)](coredata/nsfetchedresultscontroller/init(fetchrequest:managedobjectcontext:sectionnamekeypath:cachename:).md)
