Search code examples
objective-cdictionaryproperty-list

how to have a property list of dictionaries and how to append dictionary to that ? (Objective C)


How can i have a property list of dictionaries, and how can I append a new dictionary to the property list?


Solution

  • Property list is a storage format for data -- plists aren't directly useful, but requires that you read them into data structures that you can use like NSArray and NSDictionary. A simple way to read a property list into mutable containers is to use NSPropertyListSerialization's +propertyListFromData:mutabilityOption:format:errorDescription: and specify NSPropertyListMutableContainers for the mutability option.

    Also, there's an entire manual devoted to property lists.