Skip to content

Instantly share code, notes, and snippets.

@rubenarakelyan
Created November 20, 2024 20:35
Show Gist options
  • Save rubenarakelyan/d9056c1464827cbc8aaa481bd8f7d011 to your computer and use it in GitHub Desktop.
Save rubenarakelyan/d9056c1464827cbc8aaa481bd8f7d011 to your computer and use it in GitHub Desktop.
Code signing apps in macOS without a developer account

Create a self-signed certificate:

  1. Open Keychain Access.
  2. Choose Keychain Access > Certificate Assistant > Create Certificate ...
  3. Enter a name 4.Set 'Certificate Type' to 'Code Signing'

Then, your command should look like this, if your certificate name is my-new-cert:

codesign -fs my-new-cert /Applications/Utilities/Boot\ Camp\ Assistant.app

If an error "resource fork, Finder information, or similar detritus not allowed" appears, you need to remove all extended attributes first, as per Apple QA1940:

xattr -cr /Applications/Utilities/Boot\ Camp\ Assistant.app

If an error "/Applications/XYZ.app: code object is not signed at all" appears, it can be mitigated by signing not just the app, but all objects inside it:

codesign -fs my-new-cert --deep /Applications/Utilities/Boot\ Camp\ Assistant.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment