Thanks Mark. I had followed those instructions already, without it creating a valid code-signing certificate that showed up in Script Debugger. The certificate did not appear when I ran the
security command you give above.
I looked at the certificate in Keychain Access and changed its trust settings to Always Trust for code-signing. After that, the certificate did appear when I ran the
security command, and also appeared in the drop-down menu in Script Debugger, and I was able to use it to code-sign a simple app.
The first code-signed version of the app naturally still brings up the "app would like to control…’ dialog in Mojave. Once I tell it OK, the app runs as normal. I am hoping that code-signed updates to the app will run without asking again for authorisation. However, if I increment the version number and save, the app now does nothing on Mojave, though it still runs as expected on High Sierra.
Any idea what’s going on here?