---
title: loadMetadata()
framework: coredata
role: symbol
role_heading: Instance Method
path: coredata/nsincrementalstore/loadmetadata()
---

# loadMetadata()

Loads the metadata for the store.

## Declaration

```swift
func loadMetadata() throws
```

## Discussion

Discussion In your implementation of this method, you must validate that the URL used to create the store is usable (the location exists and if necessary is writable, the schema is compatible, and so on) and return an error if there is an issue. Any subclass of NSIncrementalStore which is file-based must be able to handle being initialized with a URL pointing to a zero-length file. This serves as an indicator that a new store is to be constructed at the specified location and allows applications using the store to securely create reservation files in known locations.

## See Also

### Related Documentation

- [Incremental Store Programming Guide](apple-archive/documentation/DataManagement/Conceptual/IncrementalStorePG/Introduction.md)

### Accessing Metadata

- [identifierForNewStore(at:)](coredata/nsincrementalstore/identifierfornewstore(at:).md)
