Snippet: Force Code Signing on MacOS Application
Purpose
A "quick-and-dirty" way to sign MacOS applications that haven't been downloaded via the MacOS App Store or properly signed by their developers.
CAUTION: Manually signing applications and forcing a code sign circumvents the security of MacOS. |
History
Unfortunately, Apple has made significant changes in 10.15 (and later) which cause major issues for independent software developers.
You can also try manually signing the app using xattr and codesign --force
Shell Script Source
From the MacOS Terminal, run the following command to allow execution and force a code signature:
1 xattr -c /Applications/APPNAME.app
2 xattr -c /Applications/APPNAME.app/Contents
3 codesign --force --deep --sign - /Applications/APPNAME.app