---
title: "persistentStore(for:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nspersistentstorecoordinator/persistentstore(for:)"
---

# persistentStore(for:)

Returns the persistent store for the specified file URL.

## Declaration

```swift
func persistentStore(for URL: URL) -> NSPersistentStore?
```

## Parameters

- `URL`: An URL object that specifies the location of a persistent store.

## Return Value

Return Value The persistent store at the location specified by URL.

## See Also

### Managing a store’s location

- [setURL(_:for:)](coredata/nspersistentstorecoordinator/seturl(_:for:).md)
- [url(for:)](coredata/nspersistentstorecoordinator/url(for:).md)
