NSBundle pathForResource is NULL
问题 I\'m creating a simple application with xcode and objc and I need to load an NSDictionary from a file, but I can\'t get the path to the file using NSBundle: NSString *l = [[NSBundle mainBundle] pathForResource:@\"LoginStatuses\" ofType:@\"plist\"]; NSLog(@\"%@\", l); When I run this code I get this: 2010-10-16 10:42:42.42 Sample[5226:a0f] (null) And I don\'t know why. I created a group called Resources and there I added the LogingStatuses.plist: 回答1: So here's the solution for this problem