相关疑难解决方法(0)

NSBundle pathForResource为NULL

我正在使用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: 水库

xcode objective-c nsbundle

38
推荐指数
4
解决办法
4万
查看次数

标签 统计

nsbundle ×1

objective-c ×1

xcode ×1