Skip to content

Inspect Mode

The SwiftDialog Inspect Mode is a new built-in feature that enables real-time monitoring within the macOS filesystem. It tracks filesystem status (utilizing Apple’s FSEvents API) while monitoring application installations and inspecting cache folders, files, and plist content to visualize compliance checks. This feature is specifically designed for use during device enrollment, software deployment, and compliance auditing, providing end users with clear visibility into their compliance status.

Inspect Mode continuously monitors the specified file paths and cache directories to track the status of applications or system components. It provides visual feedback through various preset layouts, each tailored for different use cases.

  • Real-time file system monitoring
  • Download progress detection via cache monitoring
  • Multiple visual presets for different scenarios
  • Plist-based simple validation (bool, string, and exists)
  • Customizable theming and branding (limited)
  • Auto-enabling buttons upon completion
  1. Create a JSON configuration file:
{
"title": "Application Installation",
"items": [
{
"id": "app1",
"displayName": "Microsoft Word",
"guiIndex": 0,
"paths": ["/Applications/Microsoft Word.app"]
}
]
}
  1. Launch swiftDialog with inspect flag:
Terminal window
/usr/local/bin/dialog --inspect-mode --inspect-config /path/to/config.json
  1. Optionally, set the config file path environment variable:
Terminal window
export DIALOG_INSPECT_CONFIG="/path/to/config.json"
/usr/local/bin/dialog --inspect-mode
KeyTypeRequiredDefaultDescription
presetStringNo”preset1”Visual layout preset (preset1-7)
titleStringNo”System Inspection”Window title
messageStringNo-Main message text
iconStringNo-Icon path or SF Symbol (e.g., “sf=shield.fill”)
sizeStringNo”standard”Window size: “compact”, “standard”, “large”
widthIntegerNo-Custom window width (overrides size)
heightIntegerNo-Custom window height (overrides size)
cachePathsArrayNo-Directories to monitor for downloads
scanIntervalIntegerNo2File system scan interval in seconds
button1textStringNo”OK”Primary button text
button1disabledBooleanNofalseDisable primary button initially
button2textStringNo”Cancel”Secondary button text
button2visibleBooleanNotrueShow secondary button
autoEnableButtonBooleanNotrueAuto-enable button when complete
autoEnableButtonTextStringNo”OK”Button text when auto-enabled
itemsArrayYes-Array of items to inspect
KeyTypeDefaultDescription
bannerString-Banner image path (overrides icon)
bannerHeightInteger100Banner height in pixels
bannerTitleString-Title overlay on banner
highlightColorString”#808080”Accent color (hex)
backgroundColorString-Background color (hex)
backgroundImageString-Background image path
backgroundOpacityDouble1.0Background opacity (0-1)
textOverlayColorString-Text overlay color for backgrounds
gradientColorsArray-Array of hex colors for gradient
iconBasePathString-Base path for relative icon paths

Each item in the items array requires:

KeyTypeRequiredDescription
idStringYesUnique identifier
displayNameStringYesDisplay name in UI
guiIndexIntegerYesSort order (0-based)
pathsArrayYesFile paths to check for existence
iconStringNoItem-specific icon

| plistKey | String | No | Plist key to validate | | expectedValue | String | No | Expected plist value | | evaluation | String | No | Evaluation type: “equals”, “boolean”, “exists”, “contains”, “range” |

Traditional sidebar layout with icon, progress bar, and item list. Best for standard application installations.

{
"preset": "preset1",
"title": "Installing Applications",
"icon": "sf=apps.iphone.badge.plus"
}
image

Features a logo or top banner image with streamlined Card item display. Ideal for branded deployments.

{
"preset": "preset2",
"banner": "/path/to/banner.png",
"bannerHeight": 120,
"bannerTitle": "Company Setup"
}
image

This is a condensed list layout with a logo or top banner image. Automatically scrolls through items, highlighting current installations.

{
"preset": "preset3",
"sideMessage": ["Installing core apps...", "Please wait..."],
"sideInterval": 5
}
image

Modern dashboard layout with cards and status indicators. Great for system compliance overview screens.

{
"preset": "preset4",
"style": "cards",
"highlightColor": "#007AFF",
"gradientColors": ["#1e3c72", "#2a5298", "#7e8ba3"],
}
image

Monitor download directories to detect in-progress installations:

{
"cachePaths": [
"/Library/Managed Installs/Cache",
"/Library/Application Support/Installomator/Downloads",
"/Library/Application Support/JAMF/Downloads",
"/Library/Application Support/AirWatch/Data/Munki/Managed Installs/Cache"
],
"scanInterval": 5
}

The system will detect .pkg, .dmg, and .download files matching item IDs.

Validate system configuration using plist checks:

{
"preset": "preset5",
"items": [{
"id": "findmymac",
"displayName": "Find My Mac Status",
"guiIndex": 0,
"paths": ["/Library/Preferences/com.apple.FindMyMac.plist"],
"plistKey": "FMMEnabled",
"expectedValue": "true",
"evaluation": "boolean"
}]
}

Define custom compliance levels and colors:

{
"colorThresholds": {
"excellent": 0.95,
"good": 0.80,
"warning": 0.60,
"excellentColor": "#00C853",
"goodColor": "#2196F3",
"warningColor": "#FF9800",
"criticalColor": "#F44336"
}
}
{
"preset": "preset4",
"title": "Security Compliance",
"icon": "sf=shield.checkered,colour=#16a34a,weight=bold",
"items": [
{
"id": "os_gatekeeper",
"displayName": "Gatekeeper",
"guiIndex": 0,
"paths": ["/Library/Preferences/com.apple.systempolicy.control.plist"],
"plistKey": "EnableAssessment",
"expectedValue": "true",
"evaluation": "boolean",
"icon": "sf=shield.lefthalf.filled,colour=#16a34a,weight=bold"
},
{
"id": "ssh_disable",
"displayName": "SSH Disabled",
"guiIndex": 2,
"paths": ["/System/Library/LaunchDaemons/ssh.plist"],
"plistKey": "Disabled",
"expectedValue": "true",
"evaluation": "boolean",
"icon": "sf=network.badge.shield.half.filled,colour=#0891b2,weight=bold"
}
]
}
image
{
"title": "Installing Office Suite",
"message": "Please wait while we install your applications",
"preset": "preset1",
"icon": "sf=apps.iphone.badge.plus",
"iconBasePath":"/Users/Shared/icons/",
"cachePaths": ["/Users/Shared/Downloads"],
"button1text": "Please Wait...",
"button1disabled": true,
"autoEnableButton": true,
"autoEnableButtonText": "Continue",
"items": [
{
"id": "microsoft_word",
"displayName": "Microsoft Word",
"guiIndex": 0,
"paths": ["/Applications/Microsoft Word.app"],
"icon": "Microsoft Word.png"
},
{
"id": "microsoft_excel",
"displayName": "Microsoft Excel",
"guiIndex": 1,
"paths": ["/Applications/Microsoft Excel.app"],
"icon": "Microsoft Excel.png"
},
{
"id": "microsoft_powerpoint",
"displayName": "Microsoft PowerPoint",
"guiIndex": 2,
"paths": ["/Applications/Microsoft PowerPoint.app"],
"icon": "Microsoft PowerPoint.png"
}
]
}
  • Verify JSON syntax using jq or online validators
  • Check file permissions (must be readable)
  • Ensure environment variable is properly exported
  • Verify exact file paths (case-sensitive)
  • Check if paths require admin privileges
  • Use cachePaths for download detection
  • Increase scanInterval for slower systems

Enable debug output:

Terminal window
export DIALOG_DEBUG=1
/usr/local/bin/dialog --inspect-mode
  • DIALOG_INSPECT_CONFIG: Path to configuration JSON
  • DIALOG_DEBUG: Enable debug logging
  • DIALOG_COMMAND_FILE: Custom command file path
  1. Start Simple: Begin with preset1 and minimal configuration
  2. Test Paths: Verify all file paths exist or will exist
  3. Use Cache Monitoring: Add cachePaths for download detection
  4. Icon Management: Store icons in a central location with iconBasePath
  5. Button States: Use autoEnableButton for better UX
  6. Appropriate Presets: Choose presets based on use case:
    • Installation tracking: Preset 1 or 2 or 3
    • Compliance display: Preset 4