我正在尝试将 CoreData 添加到现有项目中,并且 有奇怪的错误...
我得到错误:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot create an NSPersistentStoreCoordinator with a nil model'
在 RootView 中有一个警告:
- (NSFetchedResultsController *)fetchedResultsController;
排队:
_fetchedResultsController.delegate = self;
它说:
warning: class 'RootViewController' does not implement the 'NSFetchedResultsControllerDelegate' protocol
有什么想法吗?
最佳答案
啊!
抱歉我问了,我只是错过了我更改了 .xcdatamodel 的名称
我只需要更改 managedObjectModel 和 persistentStoreCoordinator 中的名称
希望它能对某人有所帮助。
关于objective-c - 将 CoreData 添加到现有项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5251030/