Applications Scripts - developer cannot be verified

On an older OS 10.13 I was able to create application scripts, compress them, and then share them with other machines by throwing them up on a server to be downloaded.

Once unzipped by the end-user, the .app file did require the operator to right-click and choose the “Open” button on the prompt that states that the “xxxx.app” is from an unidentified developer. Are you sure you want to open it?

Now on 12.6, another user’s Mac that I am testing only has two radio buttons within its General Security & Privacy:

“App Store”

“App Store and identified developers”

There is no “Anywhere” radio button, for this Macbook I am testing.

Therefore the .app file they download from the server, and unzip and right-click to open yields the following message:

Xxxxxxxx cannot be opened because the developer cannot be verified.

This alert contains two buttons: “Move to Trash” & “Cancel”

I was able to write a script that the end-user could use that would target the app that could not be opened and modify the file. This secondary script that resides on the end-user’s machie would remove the com.apple.quarantine attribute embedded in the app that failed to open.

The shell being used is:

do shell script "xattr -d com.apple.quarantine

Running this secondary script would then allow the application script to be opened by the end-user.

Ideally, I do not want to have operators rely on using a secondary script to modify an application script every time they receive one from a server that was compressed.

Is there any way for me to compile the application script so it will not consider the application as being from an unidentified developer?

Or is there a command line that can be used on the end-users machine to reveal the “Anywhere” radio button in the System Preferences > General > Security & Privacy

I did search this forum, but to no avail.

On second thought - I believe the Terminal command might be as follows:
sudo spctl --master-disable

I am leaving this post up in case anybody is familar and can confirm.

Thanks,
-Jeff

Hold down the control key when you open the Application.
it will ask at that point.

Wow Robert, I had no idea about this - Thank you!

If you are having users open an Apple script app Apple Still wants you to notarize it as you would any other app that you develop in Xcode etc. The easiest way to do this is through this utility called SD notary. Note that you will need a registered developer account with Apple in order to do this successfully