Mojave and AppleScript Applets

macOS Mojave introduced a number of security changes that make developing AppleScript automations more difficult. Chief among these is the requirement that any application attempting to communicate with another application must get the user’s permission. Full details of these changes are described in this blog post:Mojave Brings In Big Security Changes.

These changes have a particular impact on AppleScript applets (AppleScript scripts deployed as stand-alone applications). Like any other application, an applet must obtain the user’s permission before being allowed to communicate with another application. The problem is that each time you revise your applet, macOS Mojave will ask the user again for their permission before allowing the applet to communicate with any other application. This quickly becomes irritating and tedious. This problem effects both Apple applets and Script Debugger’s enhanced applets.

The solution is to codesign your applet. This allows macOS Mojave to recognize that when your applet is changed, it can continue to use the permissions previous versions were granted.

In order to codesign your scripts, you must obtain a Developer ID certificate from Apple. Apple’s Developer ID certificates and Gatekeeper are explained here. Once you have a Developer ID installed on your Mac, you can begin code signing your script directly within Script Debugger (see the File > Codesign submenu). This feature is present in the free Script Debugger Lite mode as well.