NSPersistentCloudKitContainer
一个容器将您的应用程序中的核心数据堆栈封装起来,并将选择的持久性存储镜像到CloudKit私有数据库。
class NSPersistentCloudKitContainer : NSPersistentContainer
总览
NSPersistentCloudKitContainer是能够管理CloudKit支持和非云存储的子类。NSPersistentContainer
默认情况下,包含单个store描述,该store描述分配给应用程序权利中的第一个CloudKit容器标识符。使用自定义此行为,或通过创建不同的容器支持额外的商店说明。NSPersistentCloudKitContainerNSPersistentCloudKitContainerOptions
有关设置多个存储的更多信息,请参阅使用CloudKit设置核心数据。
主题
访问CloudKit记录
1、func record(for: NSManagedObjectID) -> CKRecord?
获取与给定托管对象相对应的CloudKit记录。
2、func records(for: [NSManagedObjectID]) -> [NSManagedObjectID : CKRecord]
获取与给定托管对象相对应的CloudKit记录。
3、func recordID(for: NSManagedObjectID) -> CKRecord.ID?
获取与给定管理对象相对应的CloudKit记录的ID。
4、func recordIDs(for: [NSManagedObjectID]) -> [NSManagedObjectID : CKRecord.ID]
获取与给定管理对象相对应的CloudKit记录的ID。
类型属性
5、class let eventChangedNotification: NSNotification.Name
贝塔
6、class let eventNotificationUserInfoKey: String
贝塔
实例方法
7、func canDeleteRecord(forManagedObjectWith: NSManagedObjectID) -> Bool
贝塔
8、func canModifyManagedObjects(in: NSPersistentStore) -> Bool
贝塔
9、func canUpdateRecord(forManagedObjectWith: NSManagedObjectID) -> Bool
贝塔
10、func initializeCloudKitSchema(options: NSPersistentCloudKitContainerSchemaInitializationOptions)
class
11、class NSPersistentCloudKitContainer.Event
贝塔
枚举
12、enum NSPersistentCloudKitContainer.EventType
贝塔
技术交流
QQ:3365059189
SwiftUI技术交流QQ群:518696470