Type Method

registerStoreClass(_:forStoreType:)

Registers a given NSPersistentStore subclass for a given store type string.

Declaration

class func registerStoreClass(_ storeClass: AnyClass?, forStoreType storeType: String)

Parameters

storeClass

The NSPersistentStore subclass to use for the store of type storeType.

storeType

A unique string that identifies a store type.

Discussion

You must invoke this method before a custom subclass of NSPersistentStore can be loaded into a persistent store coordinator.

You can pass nil for storeClass to unregister the store type.

See Also

Specifying Registered Store Types

class var registeredStoreTypes: [String : NSValue]

Returns a dictionary of the registered store types.