【发布时间】:2011-02-08 07:33:32
【问题描述】:
我遇到了一个 CoreData 应用程序的问题...当您选择使用 CORE DATA FOR STORAGE 时,它在 Apple 提供的样板代码上崩溃。
- (NSManagedObjectModel *)managedObjectModel {
if (managedObjectModel_ != nil) {
return managedObjectModel_;
}
NSString *modelPath = [[NSBundle mainBundle] pathForResource:@"iLoveForLife" ofType:@"momd"];
NSURL *modelURL = [NSURL fileURLWithPath:modelPath];
managedObjectModel_ = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
return managedObjectModel_;
}
上面写着 * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSURL initFileURLWithPath:]: nil string parameter'
这里有任何想法......
【问题讨论】:
标签: core-data