Doing quick tests of customized (Swift) Nudge text


The new Swift version of Nudge is available now, and it provides a lot more customization options (and the ability to use either a .json or a configuration profile to set preferences), including lots of customized text.

You can, of course, test out your customized test by deploying Nudge to a test machine that’s behind on updates, but what if you just want to quickly test it on a machine that’s already patched?

Existing command-line options and their limitations for customized text testing

If you run the regular command-line arguments, you can either see your custom image (not customized text) in simple mode (-simple-mode)

or see none of your customized text (-demo-mode)

Making Nudge pop up on a patched Mac

But there’s a simple-ish trick you can use to do quick customized text verification tests.

In your preferences, make sure the following settings are set (you can change them back later once you’ve verified the customized text is good):

“randomDelay”: false Since you’re doing only a quick test, you don’t want to have to wait potentially an hour or two for your Nudge window to appear.

“asyncronousSoftwareUpdate”: true My understanding is making this false would entail running a full softwareupdate download before popping up the Nudge window. That could be a several-minute delay before you see the window.

“requiredMinimumOSVersion”: “11.x This x part is the most important part to temporarily change. If the latest patch is 11.6, you’d want to temporarily put in 11.7. If the latest patch is 11.7, you’d want to put 11.8 here. You could even put 11.99, since 99 is probably higher than whatever the last Big Sur release would be. (Same principle should apply for Monterey with 12.0, 12.1, etc.) You’re basically temporarily tricking Nudge into thinking your patched Mac is not yet patched, and so needs a Nudge window to appear.

Force Nudge to run right now

The final step is to make the Nudge window appear. If you use the standard Nudge launch agent, this should happen every 30 minutes. If you have your own Nudge launch agent, it may occur even less frequently than that. But you can force Nudge to run by basically unloading and reloading the launch agent manually:

launchctl unload /Library/LaunchAgents/com.github.macadmins.Nudge.plist && launchctl load /Library/LaunchAgents/com.github.macadmins.Nudge.plist

Once you do that, the Nudge window should appear with your customized text in it!

Post-testing clean-up

Don’t forget to revert the requiredMinimumOSVersion and any other temporarily changed settings once you’ve verified your customized text is good.






Leave a Reply

Your email address will not be published. Required fields are marked *