This piece of the code will first, load your file into the NSString and that by using componentsSeparatedByString will parse all loaded lines into the NSArray.
NSString *entireFileInString = [NSString stringWithContentsOfFile:filePath]; // reads file into memory as an NSString
NSArray *lines = [entireFileInString componentsSeparatedByString:@"\n"]; // each line, adjust character for line endings
for (NSString *line in lines) NSLog([NSString stringWithFormat:@"line: %@", line]);
Be careful while using large files, this can take a lot of memory.
We had to disable comments till the problem with spam will be solved, sorry for any inconvenience caused.