Bobj-C
Bobj-C

Reputation: 5426

How to create a .Plist that contains key ==> Value?

In my application I need to read data from plist also I need to know how to create the plist that contains the key-value data. And is there a better way to read info (key-value)?

Upvotes: 0

Views: 354

Answers (1)

ThomasW
ThomasW

Reputation: 17317

The easiest way to read plist data is to use NSDictionary:

NSMutableDictionary *myDict = [NSMutableDictionary dictionaryWithContentsOfFile:path];

Similarly you can write it out using:

[myDict writeToFile:path atomically:NO];

Upvotes: 4

Related Questions