小编Sla*_*opy的帖子

CoreData应用程序目录在iOS3上崩溃

我几乎完成了我在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)

任何帮助都会很棒,谢谢.

iphone xcode core-data ipad

4
推荐指数
2
解决办法
3165
查看次数

标签 统计

core-data ×1

ipad ×1

iphone ×1

xcode ×1