PersistentContainer

open class PersistentContainer : NSPersistentContainer

Customized NSPersistentContainer that knows how to locate and load the managed object model (MOM) resource. It then caches this value for future use – basically useful for unit tests.

  • Place the DB into the shared documents directory so both the app and the AUV3 extension can see it.

    Declaration

    Swift

    override open class func defaultDirectoryURL() -> URL
  • Create new container

    Declaration

    Swift

    public init(modelName: String)

    Parameters

    modelName

    the name of the model to persist in the container

  • Undocumented

    Declaration

    Swift

    public typealias LoadStoreError = (NSPersistentStoreDescription, Error)
  • Undocumented

    Declaration

    Swift

    public func destroyPersistentStores() throws
  • Undocumented

    Declaration

    Swift

    public func removeStores() throws