To add in .zshrc
:
sign_app() {
local app_path=$1
# Add quarantine attribute to prevent Gatekeeper warnings
xattr -cr "$app_path"
# Sign the app with the specified identity
codesign --deep --force --sign - "$app_path"
echo "App resigned successfully."
}
alias sign='sign_app'
sign /Applications/AnApplication.app`