Instance Method

url(for:)

Returns the URL for a given persistent store.

Declaration

func url(for store: NSPersistentStore) -> URL

Parameters

store

A persistent store.

Return Value

The URL for store.

See Also

Configuring Persistent Stores

func addPersistentStore(ofType: String, configurationName: String?, at: URL?, options: [AnyHashable : Any]?) -> NSPersistentStore

Adds a new persistent store of a specified type at a given location, and returns the new store.

func setURL(URL, for: NSPersistentStore) -> Bool

Sets the URL for a given persistent store.

func remove(NSPersistentStore)

Removes a given persistent store.

func destroyPersistentStore(at: URL, ofType: String, options: [AnyHashable : Any]?)

Deletes (or truncates) the target persistent store in accordance with the store class' requirements.

var persistentStores: [NSPersistentStore]

The persistent stores associated with the coordinator.

func persistentStore(for: URL) -> NSPersistentStore?

Returns the persistent store for the specified URL.

var name: String?

Name of the coordinator.

Persistent Store Types

Persist data through the available store types.

Store Options

Use options dictionary keys to specify store behavior and characteristics.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software