Write a plist file (plist.write)
Declaration
plist.write(filePath, tab)
Parameters
- filePath
String. Absolute path of the plist file to write. - tab
Table. The table (tree) to be converted to plist and written.
Notes
Write a Lua table (tree) to a plist file.
This function can be used in XUI.
Example
local plist = require("plist")
local plfilename = "/var/mobile/Library/Caches/com.apple.mobile.installation.plist"
local tmp2 = plist.read(plfilename)
tmp2["Metadata"]["ProductBuildVersion"] = "havonz"
plist.write(plfilename, tmp2)
os.execute("chown mobile:mobile "..plfilename) -- fix ownership
os.execute("chmod 644 "..plfilename) -- fix permission