我在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 .....那麼爲什麼與它一起生成的代碼不工作...