---
title: unlock()
framework: coredata
role: symbol
role_heading: Instance Method
path: coredata/nspersistentstorecoordinator/unlock()
---

# unlock()

Relinquishes a previously acquired lock.

## Declaration

```swift
func unlock()
```

## See Also

### Deprecated instance methods

- [addPersistentStore(ofType:configurationName:at:options:)](coredata/nspersistentstorecoordinator/addpersistentstore(oftype:configurationname:at:options:).md)
- [destroyPersistentStore(at:ofType:options:)](coredata/nspersistentstorecoordinator/destroypersistentstore(at:oftype:options:).md)
- [importStore(withIdentifier:fromExternalRecordsDirectoryAt:to:options:ofType:)](coredata/nspersistentstorecoordinator/importstore(withidentifier:fromexternalrecordsdirectoryat:to:options:oftype:).md)
- [lock()](coredata/nspersistentstorecoordinator/lock().md)
- [migratePersistentStore(_:to:options:withType:)](coredata/nspersistentstorecoordinator/migratepersistentstore(_:to:options:withtype:).md)
- [replacePersistentStore(at:destinationOptions:withPersistentStoreFrom:sourceOptions:ofType:)](coredata/nspersistentstorecoordinator/replacepersistentstore(at:destinationoptions:withpersistentstorefrom:sourceoptions:oftype:).md)
- [tryLock()](coredata/nspersistentstorecoordinator/trylock().md)
- [perform(_:)](coredata/nspersistentstorecoordinator/perform(_:)-7jqb.md)
- [performAndWait(_:)](coredata/nspersistentstorecoordinator/performandwait(_:)-d3kq.md)
