tags:

views:

347

answers:

2

i want to modify entries in custom plist file programmatically.

can anybosy suggest me a way to do that? i have tried modifying values of keys but file is not getting saved..

A: 

I would look at the NSDictionary method:
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)flag

I'm sure there's a similar method for NSArray.

pat
A: 

You don't provide much information as to what you've tried, but I assume from the tag that this is on the iPhone. In addition to Pat's suggestion, make sure that the plist you are trying to edit is not within your app bundle, but located within an editable location like Documents or Library within your sandbox.

Brad Larson