Skip to main content

Read a plist file (plist.read)

Declaration

tab = plist.read(filePath)

Parameters

  • filePath
    String. Absolute path of the plist file to read.

Returns

  • tab
    Table or nil. On success, returns a table representing the plist tree; otherwise nil.

Notes

Read a plist file and convert it to a Lua table.
Non-generic data types in plist are not supported and will be ignored.
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)
sys.alert(tmp2['Metadata']['ProductBuildVersion'])

Note: Uses sys.alert