我有一个plist,它是一个数组,文件名称叫做startups.plist。我试图用下面的代码将它读入数组中:阅读plist问题
NSString *path = [[NSBundle mainBundle] pathForResource:@"startups" ofType:@"plist"];
NSMutableArray * wordList = [[NSMutableArray alloc] initWithContentsOfFile:path];
但是,wordList在这里总是为0。印刷设备上测试时的路径,它给了我:
/var/mobile/Applications/CCBF94D9-389C-4D63-B023-F39653FDCEF4/My.app/startups.plist
这里的结构看起来像plist中的内容:
数组的大小为0 什么时我在这里做错了吗?
'path'的值(和内容)是什么? – fbrereto
我已经把它放在正确的位置..它就是那个var/mobile/Applications/,,,, – aherlambang