我几乎完成了我在iOS4上运行良好的应用程序,但是当它加载到3.2模拟器时,它崩溃了...
2010-12-21 07:54:32.052 App[14044:207] *** -[NSPathStore2 URLByAppendingPathComponent:]: unrecognized selector sent to instance 0x4d2b640
2010-12-21 07:54:32.054 App[14044:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSPathStore2 URLByAppendingPathComponent:]: unrecognized selector sent to instance 0x4d2b640'
Run Code Online (Sandbox Code Playgroud)
我正在获取应用程序文档目录
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"App.sqlite"];
- (NSURL *)applicationDocumentsDirectory {
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
Run Code Online (Sandbox Code Playgroud)
任何帮助都会很棒,谢谢.