我在iPhone应用程序上使用CoreData。当我测试运行iOS 3.1.3上的老1克iPhone应用程序,我得到一个SIGABRT在这种方法SIGABRT在iPhone 3.1.3上使用CoreData启动应用程序时
#pragma mark - Application's Documents directory
/**
Returns the URL to the application's Documents directory.
*/
- (NSURL *)applicationDocumentsDirectory
{
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
*** -[NSFileManager URLsForDirectory:inDomains:]: unrecognized selector sent to instance 0x106920
2011-04-08 23:49:26.311 TestApp[963:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSFileManager URLsForDirectory:inDomains:]: unrecognized selector sent to instance 0x106920'
2011-04-08 23:49:26.321 TestApp[963:207] Stack:...
我使用的XCode 4,好像是不支持的选择,但是我认为他们在说该CoreData应该在iOS上工作> 3 .....那么为什么与它一起生成的代码不工作...