小编sch*_*mok的帖子

将Core Data Store从iCloud迁移到本地

我目前正在努力应对Core Data iCloud迁移.

我想将商店从iCloud ubiquity容器(.nosync)移动到本地URL.问题是每当我打电话给这样的话:

[self.persistentStoreCoordinator migratePersistentStore: currentiCloudStore 
                                                  toURL: localURL 
                                                options: nil 
                                               withType: NSSQLiteStoreType 
                                                  error: &error];
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

-[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:](1055): CoreData: Ubiquity:  Error: A persistent store which has been previously added to a coordinator using the iCloud integration options must always be added to the coordinator with the options present in the options dictionary. If you wish to use the store without iCloud, migrate the data from the iCloud store file to a new store file in local …
Run Code Online (Sandbox Code Playgroud)

migration cocoa core-data objective-c icloud

9
推荐指数
1
解决办法
3406
查看次数

标签 统计

cocoa ×1

core-data ×1

icloud ×1

migration ×1

objective-c ×1