Tooling · Integration

Apple code signing in fastlane

Drop two actions in front of gym and pull signing certificates and provisioning profiles straight from the HexSign vault. No match git repo, no shared passphrase, no secrets in source control.

3 min readUpdated May 31, 2026

fastlane-plugin-hexsign adds four fastlane actions (two single-id and two bulk-filter) that shell out to the hexsign CLI. If you already have a lane that builds, signs, and ships, this is the smallest possible change: drop two lines in front of gym (or build_app) and you are off the Apple Developer portal, with no match git repo involved.

Install and authenticate

Add the plugin to your project's Pluginfile, then run bundle install. The plugin shells out to the CLI, so the hexsign binary must be installed and on $PATH (run brew install hexsign locally, or install from a release tarball in CI).

ruby
gem "fastlane-plugin-hexsign"

Provision a service credential under Settings → CLI Tokens in the HexSign dashboard, then export HEXSIGN_CLIENT_ID and HEXSIGN_CLIENT_SECRET. The CLI auto-detects machine mode when both are set, so the plugin needs no extra auth configuration.

A typical lane

ruby
lane :beta do
  hexsign_certificates_download(id: ENV["HEXSIGN_CERT_ID"],    output_dir: "build/sign")
  hexsign_profiles_download    (id: ENV["HEXSIGN_PROFILE_ID"], output_dir: "build/sign")

  import_certificate(
    certificate_path:     "build/sign/certificate.p12",
    certificate_password: File.read("build/sign/certificate.password").strip,
    keychain_name:        "build.keychain"
  )

  gym(scheme: "MyApp")
end

On macOS you can pass keychain: to hexsign_certificates_download and skip import_certificate entirely: the CLI creates a dedicated keychain, imports the .p12, and authorizes it for codesign in one step. If you regenerate signing material regularly, use hexsign_certificates_download_by_type and hexsign_profiles_download_by_bundle_id so the lane keeps working after rotation without any variable changes.

With vs. without

fastlane with HexSign vs. without

How the same fastlane signing setup looks before and after replacing fastlane match with HexSign.

Where signing material lives
Without HexSignAn encrypted git repo managed by fastlane match. Every machine and CI job needs read access to that repo.
With HexSignIn the encrypted HexSign vault. Fetched per run, written to a run-scoped keychain, never committed to any repository.
Shared secrets
Without HexSignA MATCH_PASSWORD passphrase must be distributed to every developer and every CI environment that runs the lane.
With HexSignA per-job service credential scoped to read. No shared passphrase; each credential can be revoked independently.
Certificate rotation
Without HexSignRun match nuke, then regenerate and push. Every dev machine must re-run match before building.
With HexSignRegenerate once in HexSign. Fetch by type so no lane code or CI variable needs updating.
Onboarding a new machine or CI runner
Without HexSignGrant git repo access, distribute MATCH_PASSWORD, and run match to populate the local keychain.
With HexSignIssue a new service credential, set two env vars. The lane downloads everything on the first run.
Auditing and revocation
Without HexSignReconstruct access from git repo membership and CI secret history. Revoking access means rotating the passphrase for everyone.
With HexSignA per-call audit entry in HexSign. Revoking a leaked credential is instant and scoped to that one credential.

Keep wiring

Related integrations

Wiring this up and something doesn't line up? Email support@hexsign.io or browse the rest of the integrations and the CLI help center.

Plug it in

Stop committing signing material to repos.

Connect HexSign to fastlane in an afternoon. Free 14-day trial, no credit card.