Saturday, January 4, 2014

What is plist (property list)?


Property lists are a convenient way to access and store small amounts of data. You cannot store custom data objects in a plist, only standard types(NSArray,NSDictionary,NSString,NSDate,NSData,NSNumber) can be stored. By default plists  store data in XML format though they can also be stored in binary format. Property lists are very user friendly because there are methods already in place to store a Dictionary or Array of objects as a plist xml document and to then other methods to read a plist xml document and convert it back into an array or dictionary etc

For reading plist we can use below methods:
+arrayWithContentsOfFile:
+dictionaryWithContentsOfFile

For Writing into plist we we can use below method:
-writeToFile:atomically:
 



No comments:

Post a Comment