Reading files with NSString
Reading a file into a string is very similar:
#import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { @autoreleasepool { NSError *error; NSString *str = [[NSString alloc] initWithContentsOfFile:@"/etc/resolv.conf" encoding:NSASCIIStringEncoding ...
Get Objective-C Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.