我正在使用xcode和objc创建一个简单的应用程序,我需要从文件加载NSDictionary,但我无法使用NSBundle获取该文件的路径:
NSString *l = [[NSBundle mainBundle] pathForResource:@"LoginStatuses" ofType:@"plist"];
NSLog(@"%@", l);
Run Code Online (Sandbox Code Playgroud)
当我运行此代码时,我得到了这个:
2010-10-16 10:42:42.42样本[5226:a0f](null)
我不知道为什么.
我创建了一个名为Resources的组,在那里我添加了LogingStatuses.plist:
