<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSManagedObjectContext/persistentStoreCoordinator",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSManagedObjectContext(py)persistentStoreCoordinator"
  },
  "title" : "persistentStoreCoordinator"
}
-->

# persistentStoreCoordinator

The persistent store coordinator of the context.

```
var persistentStoreCoordinator: NSPersistentStoreCoordinator? { get set }
```

## Return Value

The persistent store coordinator of the receiver.

## Discussion

The coordinator provides the managed object model and handles persistency. Note that multiple contexts can share a coordinator. May not be `nil`.

Setting [`persistentStoreCoordinator`](/documentation/CoreData/NSManagedObjectContext/persistentStoreCoordinator) to `nil` will raise an exception. If you want to “disconnect” a context from its persistent store coordinator, you should simply set all strong references to the context to `nil` and allow it to be deallocated normally.

For more details, see [`Parent store`](/documentation/CoreData/NSManagedObjectContext#Parent-store).

---

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)