-
Notifications
You must be signed in to change notification settings - Fork 147
PFC Dropdown
AP Orlebeke edited this page Nov 26, 2020
·
2 revisions
To use a dropdown menu as input for a boolean key value, the payload key dictionary must have the following settings:
-
pfm_type
=boolean
-
pfm_range_list
- array with the two boolean options:<false/>
<true/>
-
pfm_range_list_titles
- array with 2 string options:string to indicate false value
string to indicate true value
Alternatively, if a boolean preference key type can only have 1 possible option (ex. Camera from Privacy Preferences Policy Control can only be denied) only list the single boolean option in the pfm_range_list
and the appropriate text in pfm_range_list_titles
.
True & False boolean options:
<dict>
<key>pfm_name</key>
<string>A boolean key</string>
<key>pfm_range_list</key>
<array>
<false/>
<true/>
</array>
<key>pfm_range_list_titles</key>
<array>
<string>No</string>
<string>Yes</string>
</array>
<key>pfm_title</key>
<string>Key name</string>
<key>pfm_type</key>
<string>boolean</string>
</dict>
Only false boolean option:
<dict>
<key>pfm_description</key>
<string>If set to true, access is granted. Otherwise the process does not have access. The user is not prompted and cannot change this value.</string>
<key>pfm_name</key>
<string>Allowed</string>
<key>pfm_range_list</key>
<array>
<false/>
</array>
<key>pfm_range_list_titles</key>
<array>
<string>Deny</string>
</array>
<key>pfm_title</key>
<string>Allowed</string>
<key>pfm_type</key>
<string>boolean</string>
</dict>