ckruse / CFPropertyList

Read, write and manipulate both binary and XML property lists as defined by apple
MIT License
212 stars 47 forks source link

How do you save a binary file after making changes to it. #32

Closed prolificcoder closed 9 years ago

prolificcoder commented 10 years ago

I need to edit couple of properties in the plist

plist = CFPropertyList::Binary.new.load(:file =>plist_file) plist.value["prop1"]=true plist.value["prop2"]=true

But after this I am not able to figure out how to save this. Should I create a new CFProperty list and then use it to save?

ckruse commented 9 years ago

From the example in the readme file:

plist.save("example.plist", CFPropertyList::List::FORMAT_BINARY)