Tag Archives: NSFileManager

Read a plist from your resources folder in Iphone Objective C

By | March 6, 2011

Plist or property list are usually used for storing data in iPhone. They are normal XML files, you can open it in a texteditor to view it’s data. This sample code shows how to read data from the plist. Reading a plist will return an array.You can print out the array to view the results.… Read More »

Working with files in Objective C

By | December 22, 2010

Basic file operations Assumes the existence of a file called “testfile” in the current working directory #import #import #import #import #import int main (int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *fName = @”testfile”; NSFileManager *fm; NSDictionary *attr; // Need to create an instance of the file manager fm =… Read More »