Skip to content

Instantly share code, notes, and snippets.

@AkdM
Last active September 9, 2024 08:36
Show Gist options
  • Save AkdM/e6bc527846c0bc7aef8ddacc35501ee1 to your computer and use it in GitHub Desktop.
Save AkdM/e6bc527846c0bc7aef8ddacc35501ee1 to your computer and use it in GitHub Desktop.
macOS sign app function - shortcut

macOS sign app shortcut

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'

Usage

sign /Applications/AnApplication.app`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment