Updating / changing values ​​in the property list

Can I update values ​​in an existing property list programmatically? If so, how?

I searched a little, but did not find anything.

Thanks.

+4
source share
2 answers

you can read the list with

[NSMutableDictionary dictionaryWithContentsOfFile:file] 

or

 [NSMutableArray arrayWithContentsOfFile:file] 

Then you can change the Array or Dictionary and write it again with

 [array writeToFile:file atomically:YES] 
+2
source

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

But if you use a custom plist, you can change it, as @Bernhard Harrer said.

+1
source

Source: https://habr.com/ru/post/1493411/


All Articles