Need to solve “Can’t be opened because it is from an unidentified developer" by any other way than changes the Security and Privacy settings We have created one .app application which will place some files under the user location “/Users//Library/” on executing that.
Basically, that app is a shell script app in which .app file is created by using the platypus tool on Mac.

While double clicking the created .app file we are getting the popup below. 



We know that this error can sort out by change the Security &amp; Private setting under System Preferences. But, as we are going to share this .app to our customers, we don’t want our customer to do that settings change.
Is there any way to avoid this popup? I mean by code level or by doing any kind of code sign?

We have tried to sign the code with self signed certificate, apple developement certificate and Mac developement certificate but facing that issue still.
The issue is that using a self-signed certificate does makes you a « identified developer » (at least to the eyes of macOS)

The system only accounts for certificates which have an Apple CA as their root.

If you want to get rid of the pop-up, ask for a Certificate on Apple’s Developer Console and sign your app with it.

Another way is to use csrutil to completly bypass macOS’ security mechanisms, but I highly discourage you from doing this, nor telling your end-users to do so...



Bypassing the security of an OS with a self-signed certificate would make the system... well, unsecure !

By using their CA in the certificates they issue through their Developer Program, they can revoke any app (or developer) at any time, allowing them to ensure the system security when someone tries to do bad stuff.