It’s been a while since I first announced ScreenNudge, a tool designed to help guide end users towards approving Screen Recording for applications that require it. I’ve added a few tweaks and improvements that I hope you’ll enjoy.
If you want to download the latest script, you can find it on GitHub. If you want a breakdown of the changes, keep reading.
Included check for PPPC Profile
Upon enrolling a new device, some users were not seeing the application being populated correctly in the Screen Recording section of System Settings. After some testing, it appears you need to have the app installed AND have a deployed PPPC Profile allowing standards users to approve screen recording for those apps to display correctly. I’ve made this a requirement for the script, and it will exit and alert you if the proper PPPC rights don’t exist on the machine. Since the
AllowStandardUserapproval payload only started being supported in macOS Big Sur, I’ll be deprecating support for macOS 10.15 Catalina in the next release. If making that profile a requirement mucks up your workflow somehow, please let me know by filing an issue in GitHub.
pppc_status=$(/usr/libexec/PlistBuddy -c 'print "'$bundleid':kTCCServiceScreenCapture:Authorization"' "/Library/Application Support/com.apple.TCC/MDMOverrides.plist")
User inputs for prompt delay and timeout.
By default, the script will prompt the user every 10 seconds to approve Screen Recording until it detects that it has been approved for the given application. This is now customizable in the
User Input section. I’ve also included a timeout after x number of attempts so that the script will eventually give up so as not to hang up any other policies that need to run.
attempts=6 #How many attempts at prompting the user before giving up. wait_time=10 #How many seconds to wait between user prompts.
Support for SwiftDialog
Most admins who are presenting dialog to end-users and not using native MDM dialog tools are probably using SwiftDialog for its more flexible featureset over standard applescript dialogs. The user dialog function will now leverage SwiftDialog for user prompts if it’s installed. If not, it will fall back to the osascript defaults.
Note: Thanks Trevor Sysock for originally suggesting this addition for the unActivationLock script.
Big thanks to the community for testing and submitting feature requests and ideas. I hope you find this helpful.