---
title: "metadataForPersistentStore(with:)"
framework: coredata
role: symbol
role_heading: Type Method
path: "coredata/nspersistentstore/metadataforpersistentstore(with:)"
---

# metadataForPersistentStore(with:)

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

## Declaration

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

## Parameters

- `url`: The location of the store.

## Return Value

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

## Discussion

Discussion Subclasses must override this method.

## See Also

### Managing Store Metadata

- [setMetadata(_:forPersistentStoreAt:)](coredata/nspersistentstore/setmetadata(_:forpersistentstoreat:).md)
- [loadMetadata()](coredata/nspersistentstore/loadmetadata().md)
- [metadata](coredata/nspersistentstore/metadata.md)
