
how to read files of directory in objective c?

[[NSFileManager defaultManager] contentsOfDirectoryAtPath:bundleRoot error:nil]

To read the text file using objective c, you need to first get the path and load then load that content into the NSString as given below..
//loading the path
NSString* path = [[NSBundle mainBundle] pathForResource:@"filename"
ofType:@"txt"];
//Then loading the content into a NSString.
NSString* content = [NSString stringWithContentsOfFile:path
encoding:NSUTF8StringEncoding
error:NULL];
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.