Property Lists

Dok-tips for the thing called "Property List"


A Property List is not an Objective-C structure, or a class, its simply a term that refers to a qualified collection of collections - an object graph (with certain limitations) which is implemented as XML text

Basically an NSDictionary type thing (even if the top item is an array - because it uses XML key-value pairs for everything in it

Property lists are SLOW and inefficient. So, only use them for data that is rarely accessed or changed and keep them relatively small (less than 1000 items?)

Best (safest) if created and edited from within XCode

Valid components are limited to the following classes and their subclasses:

  • NSString, NSMutableString
  • NSArray, NSMutableArray
  • NSDictionary, NSMutableDictionary
  • NSNumber
  • NSDate
  • NSData

An instance of NSArray, or NSDictionary is a "property list" if all of its members are also - too its full depth of contained items (arrays of arrays etc.).

NSDictionary instance is a property list if all of its keys are also valid property list objects

Used by NSArray and NSDictionary when calling

- (void)writeToFile:(NSString *)path atomically:(BOOL)atom;

Property list is the basis of NSUserDefault


Text dump of a sample property list

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

List of all Foundation Structure etc.