I am trying to read a .txt file from my documents directory in the form of NSString. Any idea how to read the file into NSString?
Thank you...
Use NSString's stringWithContentsOfFile: method.
NSString *fileContents = [NSString stringWithContentsOfFile:@"some/file.txt"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With