I\'m trying to load a file into a string. Here is the code I\'m using:
NSError *error = nil;
NSString *fullPath = [[NSBundle mainBundle] pathForResource:filename
I've just spent 45 minutes with this problem, only in my case the solution was stupid and the problem slightly different.
This is not the first time that XCode magically caching things (incorrectly) has caused me hours and hours of wasted time. If you have an error like this which doesn't make sense, try removing and replacing files and cleaning all targets.