Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exit Codes

CodeMeaningExample
0SuccessSigning completed, all checks passed
1Signing failedCredential rejected, tool error, Apple/Azure rejection
2Configuration errorMissing sign.toml, bad TOML syntax, missing required section
3Prerequisite missingcodesign not found, wrong platform (e.g., cargo codesign macos on Linux)
4Validation failedcargo codesign status found one or more failing checks

Usage in CI

- name: Check signing setup
  run: cargo codesign status
  # Exits 4 if any check fails — CI step fails

- name: Sign
  run: cargo codesign macos --app "MyApp.app"
  # Exits 1 on signing failure
  # Exits 2 if sign.toml is broken

Distinguishing errors

Exit code 2 (config error) means the problem is in your sign.toml or CLI flags — fix the config. Exit code 1 (signing failed) means the config is valid but the operation failed — check credentials, network, or Apple’s status page.