1,如何把XCode中建模结果导出类定义文件
打开Contacts.xcdatamodel文件,选中要导出的类,点击File-New File, 在新建窗口中选择Managed Object Class
2,怎样在建模中定义NSArray
最好的办法是把它定义为一对多的关系
参考:http://stackoverflow.com/questions/1104075/saving-an-nsmutablearray-to-core-data
3, 修改Model后,再运行程序报如下错误:
The model used to open the store is incompatible with the one used to create the store
解决办法:在模拟器中把App删除;
Tuborial: Core Data Tutorial for iOS