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:
Since I have googled here, did not find the answer, but then discovered it by myself, I'll leave it here...
I had 2 files: tray.png and tray@2x.png for Retina. The files were added to "Copy Bundle Resources" automatically.
But:
[[NSBundle mainBundle] pathForResource:@"tray" ofType:@"png"];
did not return the file actually copied to the bundle! The reason was: IDE created one TIFF file tray.tiff (joint tray.png and tray@2x.png), so ... ofType:@"tiff"] helped!