CoreData · IOS API REFERENCE
NSPersistentStoreCoordinator
class · iOS 3.0+ · SDK 27.1
class NSPersistentStoreCoordinator
Members (43)
static · iOS 26.4+cachedModelForPersistentStore
TypeScriptstatic cachedModelForPersistentStore(url: string, options?: (NativeMap<unknown, unknown>) | null): NSManagedObjectModel
Swift declarationclass func cachedModelForPersistentStore(at url: URL, options: [AnyHashable : Any]? = nil) throws -> NSManagedObjectModel
static · iOS 3.0+ · Deprecated in iOS 9.0metadataForPersistentStore
TypeScriptstatic metadataForPersistentStoreOfTypeAt(storeType: (string) | null, url: string): Record<string, unknown>
Swift declarationclass func metadataForPersistentStore(ofType storeType: String?, at url: URL) throws -> [String : Any]
static · iOS 7.0+metadataForPersistentStore
TypeScriptstatic metadataForPersistentStoreOfTypeAtOptions(storeType: string, url: string, options?: (NativeMap<unknown, unknown>) | null): Record<string, unknown>
Swift declarationclass func metadataForPersistentStore(ofType storeType: String, at url: URL, options: [AnyHashable : Any]? = nil) throws -> [String : Any]
static · iOS 3.0+registerStoreClass
TypeScriptstatic registerStoreClassForStoreType(storeClass: (string) | null, storeType: string): void
Swift declarationclass func registerStoreClass(_ storeClass: AnyClass?, forStoreType storeType: String)
static · iOS 5.0+ · Deprecated in iOS 10.0removeUbiquitousContentAndPersistentStore
TypeScriptstatic removeUbiquitousContentAndPersistentStore(storeURL: string, options?: (NativeMap<unknown, unknown>) | null): void
Swift declarationclass func removeUbiquitousContentAndPersistentStore(at storeURL: URL, options: [AnyHashable : Any]? = nil) throws
static · iOS 3.0+ · Deprecated in iOS 9.0setMetadata
TypeScriptstatic setMetadataForPersistentStoreOfTypeAt(metadata: (Record<string, unknown>) | null, storeType: (string) | null, url: string): void
Swift declarationclass func setMetadata(_ metadata: [String : Any]?, forPersistentStoreOfType storeType: String?, at url: URL) throws
static · iOS 7.0+setMetadata
TypeScriptstatic setMetadataForPersistentStoreOfTypeAtOptions(metadata: (Record<string, unknown>) | null, storeType: string, url: string, options?: (NativeMap<unknown, unknown>) | null): void
Swift declarationclass func setMetadata(_ metadata: [String : Any]?, forPersistentStoreOfType storeType: String, at url: URL, options: [AnyHashable : Any]? = nil) throws
get · iOS 3.0+registeredStoreTypes
TypeScriptstatic get registeredStoreTypes(): Record<string, _Foundation_NSValue>
Swift declarationclass var registeredStoreTypes: [String : NSValue] { get }
method · iOS 3.0+url
TypeScripturl(store: NSPersistentStore): string
Swift declarationfunc url(for store: NSPersistentStore) -> URL
method · iOS 10.0+addPersistentStore
TypeScriptaddPersistentStoreWithCompletionHandler(storeDescription: NSPersistentStoreDescription, block: ((arg0: NSPersistentStoreDescription, arg1: (NativeError) | null) => void)): void
Swift declarationfunc addPersistentStore(with storeDescription: NSPersistentStoreDescription, completionHandler block: @escaping (NSPersistentStoreDescription, (any Error)?) -> Void)
method · iOS 3.0+addPersistentStore
TypeScriptaddPersistentStoreOfTypeConfigurationNameAtOptions(storeType: string, configuration?: (string) | null, storeURL?: (string) | null, options?: (NativeMap<unknown, unknown>) | null): NSPersistentStore
Swift declarationfunc addPersistentStore(ofType storeType: String, configurationName configuration: String?, at storeURL: URL?, options: [AnyHashable : Any]? = nil) throws -> NSPersistentStore
method · iOS 12.0+currentPersistentHistoryToken
TypeScriptcurrentPersistentHistoryToken(stores?: (Array<unknown>) | null): (NSPersistentHistoryToken) | null
Swift declarationfunc currentPersistentHistoryToken(fromStores stores: [Any]?) -> NSPersistentHistoryToken?
method · iOS 9.0+destroyPersistentStore
TypeScriptdestroyPersistentStoreAtOfTypeOptions(url: string, storeType: string, options?: (NativeMap<unknown, unknown>) | null): void
Swift declarationfunc destroyPersistentStore(at url: URL, ofType storeType: String, options: [AnyHashable : Any]? = nil) throws
method · iOS 5.0+execute
TypeScriptexecute(request: NSPersistentStoreRequest, context: NSManagedObjectContext): unknown
Swift declarationfunc execute(_ request: NSPersistentStoreRequest, with context: NSManagedObjectContext) throws -> Any
method · iOS 14.0+finishDeferredLightweightMigration
TypeScriptfinishDeferredLightweightMigration(): void
Swift declarationfunc finishDeferredLightweightMigration() throws
method · iOS 14.0+finishDeferredLightweightMigrationTask
TypeScriptfinishDeferredLightweightMigrationTask(): void
Swift declarationfunc finishDeferredLightweightMigrationTask() throws
init · iOS 3.0+init
TypeScriptstatic init(model: NSManagedObjectModel): NSPersistentStoreCoordinator
Swift declarationinit(managedObjectModel model: NSManagedObjectModel)
method · iOS 3.0+ · Deprecated in iOS 8.0lock
TypeScriptlock(): void
Swift declarationfunc lock()
method · iOS 3.0+managedObjectID
TypeScriptmanagedObjectIDForURIRepresentation(url: string): (NSManagedObjectID) | null
Swift declarationfunc managedObjectID(forURIRepresentation url: URL) -> NSManagedObjectID?
method · iOS 3.0+metadata
TypeScriptmetadata(store: NSPersistentStore): Record<string, unknown>
Swift declarationfunc metadata(for store: NSPersistentStore) -> [String : Any]
method · iOS 3.0+migratePersistentStore
TypeScriptmigratePersistentStoreToOptionsWithType(store: NSPersistentStore, URL: string, options: (NativeMap<unknown, unknown>) | null, storeType: string): NSPersistentStore
Swift declarationfunc migratePersistentStore(_ store: NSPersistentStore, to URL: URL, options: [AnyHashable : Any]? = nil, withType storeType: String) throws -> NSPersistentStore
method · iOS 8.0+perform
TypeScriptperform(block: (() => void)): void
Swift declarationfunc perform(_ block: @escaping @Sendable () -> Void)
method · iOS 8.0+performAndWait
TypeScriptperformAndWait(block: (() => void)): void
Swift declarationfunc performAndWait(_ block: @Sendable () -> Void)
method · iOS 3.0+persistentStore
TypeScriptpersistentStore(URL: string): (NSPersistentStore) | null
Swift declarationfunc persistentStore(for URL: URL) -> NSPersistentStore?
method · iOS 3.0+remove
TypeScriptremove(store: NSPersistentStore): void
Swift declarationfunc remove(_ store: NSPersistentStore) throws
method · iOS 9.0+replacePersistentStore
TypeScriptreplacePersistentStoreAtDestinationOptionsWithPersistentStoreFromSourceOptionsOfType(destinationURL: string, destinationOptions: (NativeMap<unknown, unknown>) | null, sourceURL: string, sourceOptions: (NativeMap<unknown, unknown>) | null, storeType: string): void
Swift declarationfunc replacePersistentStore(at destinationURL: URL, destinationOptions: [AnyHashable : Any]? = nil, withPersistentStoreFrom sourceURL: URL, sourceOptions: [AnyHashable : Any]? = nil, ofType storeType: String) throws
method · iOS 3.0+setMetadata
TypeScriptsetMetadataFor(metadata: (Record<string, unknown>) | null, store: NSPersistentStore): void
Swift declarationfunc setMetadata(_ metadata: [String : Any]?, for store: NSPersistentStore)
method · iOS 3.0+setURL
TypeScriptsetURL(url: string, store: NSPersistentStore): boolean
Swift declarationfunc setURL(_ url: URL, for store: NSPersistentStore) -> Bool
method · iOS 3.0+ · Deprecated in iOS 8.0tryLock
TypeScripttryLock(): boolean
Swift declarationfunc tryLock() -> Bool
method · iOS 3.0+ · Deprecated in iOS 8.0unlock
TypeScriptunlock(): void
Swift declarationfunc unlock()
get · iOS 3.0+managedObjectModel
TypeScriptget managedObjectModel(): NSManagedObjectModel
Swift declarationvar managedObjectModel: NSManagedObjectModel { get }
get · iOS 8.0+name
TypeScriptget name(): (string) | null
Swift declarationvar name: String? { get set }
set · iOS 8.0+name
TypeScriptset name(value: (string) | null)
Swift declarationvar name: String? { get set }
get · iOS 3.0+persistentStores
TypeScriptget persistentStores(): Array<NSPersistentStore>
Swift declarationvar persistentStores: [NSPersistentStore] { get }
method · iOS 15.0+addPersistentStore
TypeScriptaddPersistentStoreTypeConfigurationAtOptions(type: NSPersistentStore_StoreType, configuration: (string) | null, storeURL: string, options?: (NativeMap<unknown, unknown>) | null): NSPersistentStore
Swift declarationfunc addPersistentStore(type: NSPersistentStore.StoreType, configuration: String? = nil, at storeURL: URL, options: [AnyHashable : Any]? = nil) throws -> NSPersistentStore
method · iOS 15.0+destroyPersistentStore
TypeScriptdestroyPersistentStoreAtTypeOptions(url: string, storeType: NSPersistentStore_StoreType, options?: (NativeMap<unknown, unknown>) | null): void
Swift declarationfunc destroyPersistentStore(at url: URL, type storeType: NSPersistentStore.StoreType, options: [AnyHashable : Any]? = nil) throws
method · iOS 15.0+migratePersistentStore
TypeScriptmigratePersistentStoreToOptionsType(store: NSPersistentStore, storeURL: string, options: (NativeMap<unknown, unknown>) | null, storeType: NSPersistentStore_StoreType): NSPersistentStore
Swift declarationfunc migratePersistentStore(_ store: NSPersistentStore, to storeURL: URL, options: [AnyHashable : Any]? = nil, type storeType: NSPersistentStore.StoreType) throws -> NSPersistentStore
method · iOS 15.0+replacePersistentStore
TypeScriptreplacePersistentStoreAtDestinationOptionsWithPersistentStoreFromSourceOptionsType(destinationURL: string, destinationOptions: (NativeMap<unknown, unknown>) | null, sourceURL: string, sourceOptions: (NativeMap<unknown, unknown>) | null, sourceType: NSPersistentStore_StoreType): void
Swift declarationfunc replacePersistentStore(at destinationURL: URL, destinationOptions: [AnyHashable : Any]? = nil, withPersistentStoreFrom sourceURL: URL, sourceOptions: [AnyHashable : Any]? = nil, type sourceType: NSPersistentStore.StoreType) throws
static · iOS 15.0+metadataForPersistentStore
TypeScriptstatic metadataForPersistentStoreTypeAtOptions(storeType: NSPersistentStore_StoreType, storeURL: string, options?: (NativeMap<unknown, unknown>) | null): Record<string, unknown>
Swift declarationclass func metadataForPersistentStore(type storeType: NSPersistentStore.StoreType, at storeURL: URL, options: [AnyHashable : Any]? = nil) throws -> [String : Any]
static · iOS 15.0+registerStoreClass
TypeScriptstatic registerStoreClassType(storeClass: (string) | null, type: NSPersistentStore_StoreType): void
Swift declarationclass func registerStoreClass(_ storeClass: AnyClass?, type: NSPersistentStore.StoreType)
static · iOS 15.0+setMetadata
TypeScriptstatic setMetadataTypeAtOptions(metadata: (Record<string, unknown>) | null, storeType: NSPersistentStore_StoreType, storeURL: string, options?: (NativeMap<unknown, unknown>) | null): void
Swift declarationclass func setMetadata(_ metadata: [String : Any]?, type storeType: NSPersistentStore.StoreType, at storeURL: URL, options: [AnyHashable : Any]? = nil) throws
method · iOS 15.0+performAndWait
TypeScriptperformAndWait483(block: (() => unknown)): unknown
Swift declaration@preconcurrency func performAndWait<T>(_ block: @Sendable () throws -> T) rethrows -> T
method · iOS 18.0+managedObjectID
TypeScriptmanagedObjectIDFor(string: string): (NSManagedObjectID) | null
Swift declarationfunc managedObjectID(for string: String) -> NSManagedObjectID?
Skipped declarations
2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
NSPersistentStoreCoordinator.perform(_:)
synchronous callback requires a nonescaping JS-thread call
NSPersistentStoreCoordinator.init()
inherited init: cannot prove legal (class declares 1 custom initializer)
All CoreData types →