<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSPersistentHistoryChangeRequest/fetchHistory(withFetch:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPersistentHistoryChangeRequest(cm)fetchHistoryWithFetchRequest:"
  },
  "title" : "fetchHistory(withFetch:)"
}
-->

# fetchHistory(withFetch:)

Retrieves history based on a fetch request.

```
class func fetchHistory(withFetch fetchRequest: NSFetchRequest<any NSFetchRequestResult>) -> Self
```

## Parameters

`fetchRequest`

The fetch request that defines the history bounds.

## Return Value

A persistent history fetch request ([`NSPersistentHistoryChangeRequest`](/documentation/CoreData/NSPersistentHistoryChangeRequest)) built using an existing fetch request.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)