我嘗試在Core Data中執行到新數據庫模型版本的遷移。映射模型成功通過「無法添加目標存儲」核心數據遷移錯誤
NSMappingModel *mappingModel = [NSMappingModel mappingModelFromBundles:nil
forSourceModel:sourceModel
destinationModel:destinationModel];
找到,但在遷移階段
migrationSuccess = [standardMigrationManager migrateStoreFromURL:storeSourceUrl
type:NSSQLiteStoreType
options:sourceStoreOptions
withMappingModel:mappingModel
toDestinationURL:storeDestUrl
destinationType:NSSQLiteStoreType
destinationOptions:destinationStoreOptions
error:&error];
返回錯誤
Error Domain=NSCocoaErrorDomain Code=134110 "The operation couldn\u2019t be completed. (Cocoa error 134110.)" UserInfo=0x96f0350 {NSUnderlyingError=0x96d94e0 "The operation couldn\u2019t be completed. (Cocoa error 134100.)", reason=Can't add destination store}
我以前遇到了遷移許多問題,但沒有一個看上去像這樣。這是什麼原因以及如何解決?
問候,
米哈爾
我在模擬器上工作。商店(sqlite文件)已經存在於Documents目錄中。 – Kaktusiarz 2013-02-20 07:36:57