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
The most likely reason that +stringWithContentsOfFile:encoding:error:
would fail in this case would be if you provided the wrong encoding. Are you sure that your @"eula"
file is UTF8 encoded?
If you're unsure about the encoding of the file, you could always try +stringWithContentsOfFile:usedEncoding:error: instead and see if it works and what encoding it comes up with.