- You created some entities with some attributes and wrote some code
- Launched the app, probably added some content
- Quit the app and added/changed some more entities with attributes
- You probably launched the app again and now it's giving you the error
The reason for this is because your new managed object model is trying to use older version of storage (the one first time created when you launched the app).
The quick and dirty fix would be to remove the storage file (somewhere in ~/Library/Application Support/YOUR_APP/) and to launch your app again.
For future reference - if you release an app and in next release the app has changed managed object model - you have to write migrations for it. All this and more is covered in core data programming cookbook in apple documentation.
本文介绍了当更新Core Data模型后遇到的应用程序错误及其快速解决方案。文章指出,在更新模型后重新运行应用时,新模型尝试使用旧版存储可能导致问题。解决办法是删除旧的存储文件并重新启动应用。
1089

被折叠的 条评论
为什么被折叠?



