4

Is it possible to update values in a existing property list programatically? If so, how?

I did bit of a search on this but didn't find anything useful.

Thank you.

Isuru
  • 30,617
  • 60
  • 187
  • 303

2 Answers2

2

you can read the list with

[NSMutableDictionary dictionaryWithContentsOfFile:file]

or

[NSMutableArray arrayWithContentsOfFile:file]

Afterwards you can modify the Array or Dictionary and write it out again with:

[array writeToFile:file atomically:YES]
1

If you want to update yourapp.infoplist runtime. then answer is NO.

But if you are using custom plist then you will able to modified as @Bernhard Harrer told.

Hrushikesh Betai
  • 2,227
  • 5
  • 33
  • 63