<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSPersistentStore/metadataForPersistentStore(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPersistentStore(cm)metadataForPersistentStoreWithURL:error:"
  },
  "title" : "metadataForPersistentStore(with:)"
}
-->

# metadataForPersistentStore(with:)

Returns the metadata from the persistent store at the given URL.

```
class func metadataForPersistentStore(with url: URL) throws -> [String : Any]
```

## Parameters

`url`

The location of the store.

## Return Value

The metadata from the persistent store at `url`. Returns `nil` if there is an error.

## Discussion

Subclasses must override this method.

---

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)