<!--
{
  "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/NSPersistentStoreCoordinator/metadata(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPersistentStoreCoordinator(im)metadataForPersistentStore:"
  },
  "title" : "metadata(for:)"
}
-->

# metadata(for:)

Returns the metadata of the specified persistent store.

```
func metadata(for store: NSPersistentStore) -> [String : Any]
```

## Parameters

`store`

A persistent store.

## Return Value

A dictionary that contains the metadata currently stored or to-be-stored in `store`.

## See Also

[`+  setMetadata:forPersistentStoreOfType:URL:error:`](/documentation/CoreData/NSPersistentStoreCoordinator/setMetadata(_:forPersistentStoreOfType:at:))

Sets the metadata for a given store.

[`+  metadataForPersistentStoreOfType:URL:error:`](/documentation/CoreData/NSPersistentStoreCoordinator/metadataForPersistentStore(ofType:at:))

Returns a dictionary containing the metadata stored in the persistent store at a given URL.



---

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)