0

I have problem with versioning Core Data. I added a new entity Event and followed all the steps for versioning. I have a folder Model.momd containing Model.mom, Model2.mom and Model2.omo and the version file. I have changed loading modelObjectContext to loading from momd folder.

  • When I load app to my iPhone using Xcode it works. However, when
  • I create an archive and replace the Appstore version with this new version through iTunes I get the error message below. Thanks

    createUnresolved error Error Domain=NSCocoaErrorDomain Code=134130 "The operation couldn’t be completed. (Cocoa error 134130.)" UserInfo=0x20147820 {URL=file://localhost/var/mobile/Applications/3B2BD803-401D-4A95-ACDA-DD6A7D197930/Documents/Database.sqlite, metadata={ NSPersistenceFrameworkVersion = 419; NSStoreModelVersionHashes = { State = <0bfe87fd 1e1b5822 eb704808 86efd0ca 61c108c3 328c095d 2f2eadb8 4c51a17f>; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = ( "" ); NSStoreType = SQLite; NSStoreUUID = "C2EDD217-1F20-425A-927E-1B9A1C661085"; "_NSAutoVacuumLevel" = 2; }, reason=Can't find model for source store.

spex
  • 1
  • 4
  • This might help: http://stackoverflow.com/questions/8641802/core-data-migration-xcode-4-2-is-not-update-the-data-for-app-already-available-i/8641836#8641836 – user523234 Apr 12 '13 at 11:04
  • I try every think what I found on websites. All files are generated fine but old mom file is still loaded. I there some way how say ios load right this file Model2.mom? – spex Apr 12 '13 at 11:59
  • how did you solve this? – Ahmed Z. Feb 12 '14 at 06:26

2 Answers2

0

Have you chosen the current model in the File Inspector?

Version setting

Your core data model when in the Project Navigator should look something like this

Project Navigator

Ste Prescott
  • 1,789
  • 2
  • 22
  • 43
0

I have database model in folder in project even in folder on HDD. When I move database model to root of xcode project versioning start working.

spex
  • 1
  • 4