Read Settings
After configuration is saved to the location specified by defaults
, read the value of key key == "switch1"
from the plist to get the state of switch "switch1". For reading, writing, and updating XUI configuration, see the XUI script configuration interface module.
local switch1 = xui.get("com.yourcompany.A-Script-Bundle", "switch-1")
if (switch1) then
-- ...
end