Skip to content

Extensions

Jordy Witteman edited this page Oct 24, 2025 · 1 revision

Introduction

Support App Extensions enable administrators to create custom info items and populate those with output from scripts or values. You can use your Device Management Service to run scripts or commands to populate the Support App Extensions. For every Extension, Support App can also run a script with elevated privileges every time the Support App popover appears to make sure data is up to date with the OnAppearAction key. Extensions show a placeholder by default is no value is set.

Static or dynamic

There are basically two ways to populate the Support App Extensions depending on the use case:

  • Static: Set Extension value and trigger warning in the Configuration Profile. Intended for use cases where the value is not changing.
  • Dynamically: Set Extension value and trigger warning using privileged scripts with defaults write. Intended for use cases where the value changes.

Extension preference keys

An Extension can be controlled by using its unique Extension ID configured by the administrator. This can be any string, as long as it's unique. Let's say in this example the Extension ID is: nl.root3.support.last-checkin

The Extension ID is used as part of the preference key used to populate the values and maps those values to the correct Extension in Support App. For some values, the Extension ID is appended with a string such as "_alert" or "_loading".

Below are the preference keys for the example Extension ID of nl.root3.support.last-checkin:

Preference key Type Default value Description Example
nl.root3.support.last-checkin String KeyPlaceholder The output of the Extension set by script or Device Management Service. If nothing is set, it is shown as placeholder UI element Anything you want to show here
nl.root3.support.last-checkin_alert Boolean false Controls whether to show a warning badge in the Extension. Set to true to enable true
nl.root3.support.last-checkin_loading Boolean false Controls whether to show a spinner animation in the Extension. Set to true to enable true

How to populate Support App Extensions

Support App Extensions must be populated by setting the value in a preference key within the preference domain nl.root3.support. This can be achieved by using a static value in the Configuration Profile, running custom scripts from your Device Management Service or using the OnAppearAction key. This last option will allow you to update the Support App Extension values every time the Support App popover appears by running the script.

  • Create a custom script and populate the desired value by running the following command: sudo defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}" -string "OUTPUT_VALUE_HERE"
  • Add the following command to show a placeholder while getting the value: sudo defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}" -string "KeyPlaceholder"
  • Add the following command at the beginning of the script to show a spinning indicator while getting the value: sudo defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}_loading" -bool true
  • Add the following command at the end of the script to stop the spinning indicator view: sudo defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}_loading" -bool false
  • Add the following command to enable the warning badge: sudo defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}_alert" -bool true
  • Add the following command to disable the warning badge: sudo defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}_alert" -bool true

Below a simple example script including loading effect and placeholder while loading

#!/bin/zsh

# Extension ID
extension_id="last_check_in"

# Start spinning indicator
defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}_loading" -bool true

# Show placeholder value while loading
defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}" -string "KeyPlaceholder"

# Keep loading effect active for 0.5 seconds
sleep 0.5

# Get output value
command_output=$(PUT_COMMAND_TO_GET_OUTPUT_HERE)

# Set output value
defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}" -string "${command_output}"

# Trigger an orange warning notification badge depending on the output you decide
if [[ "${command_output}" == "OUTPUT_IS_BAD" ]]; then
 defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}_alert" -bool true
else
 defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}_alert" -bool false
fi

# Stop spinning indicator
defaults write /Library/Preferences/nl.root3.support.plist "${extension_id}_loading" -bool false

Note Please do not forget to make the script executable: sudo chmod +x /PATH/TO/SCRIPT

Clone this wiki locally