0

Environment: Xcode 4.2 & iOS 5+, using Newsstand Running within Simulation version 5.0.

Scenario: I added a new version to the existing xcdatamodel which broke the compile:

reason = "The model used to open the store is incompatible with the one used to create the store";

One solution: Normally I would merely clear the app and re-run the app.

Problem: This is a Newsstand app... can't merely clear it from SIM. Option tried: attempted to clear the cache: /5.0/Library/Caches & re-run the app.

Outcome: cache re-populated and results are the same: * incompatible * '...with model used to create the store...'.

Any ideas for a remedy?


Paradigm change: 1) I reverted to the original xcdatamodel and re-ran the code. - okay. 2) I added a new attribute & datatype -- again it bombed upon running.

Note: I'm using the SAME xcdatamodel version as before that had worked; only added a new attribute. But still, I'm getting:

reason=Can't find model for source store}

Frederick C. Lee
  • 9,019
  • 17
  • 64
  • 105
  • I read the doc on versioning, and added the following: NSDictionary *optionsDictionary = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:NSMigratePersistentStoresAutomaticallyOption]; -- but still, the run-time crashes with the reason: reason = "Can't find mapping model for migration"; – Frederick C. Lee Oct 10 '11 at 21:20
  • Soln: 1) I reverted back to the original .xcdatamodel. --- okay works. 2) I added my new attribute & saved. 3) I went into my simulator folder and deleted EVERYTHING. 3) I relaunched, compiled & run my app with the changed core data. -- apparently it works. I had originally merely deleted the cache folder, with fear of removing too many items from the simulator file (found in the ~/Library/Application Support). That wasn't enough. I had to remove EVERYTHING. .... to get it working (apparently). – Frederick C. Lee Oct 10 '11 at 21:52

0 Answers0