Skip to main content

iOS build publishing

bugsee-cli xcode post-action runs the entire iOS build-publish flow from an Xcode "Run Script" post-action. It reads the Xcode build environment, decides whether it should run, and — when admitted — registers the build, uploads the build-info bundle, uploads the artefact (when size analysis is enabled), uploads dSYMs, and optionally runs an in-build size check.

bugsee-cli xcode post-action
note

The iOS SDK wires this command into your project's build phases for you. You generally don't invoke it by hand — this page documents the flags and environment variables so you can tune its behaviour.

Background vs. foreground

By default the command runs in the background: it detaches into a daemon so the archive returns immediately, and logs to $PROJECT_TEMP_DIR/bugsee-cli.log.

# Run synchronously instead (required for CI build gating)
bugsee-cli xcode post-action --force-foreground

--force-foreground is the only mode in which a size-check FAIL can deliberately fail the build (exit code 40). As a post-action, the default background mode must never fail an already-signed build.

Gating

The command only does work when it's admitted by its gating flags. By default it runs on Archive actions for Release configurations.

BehaviourFlagEnvironment variableDefault
Run the whole flow--enable-build-info / --disable-build-infoBUGSEE_BUILD_INFO_ENABLEDon
Also run on plain Build actions--enable-all-actions / --disable-all-actionsBUGSEE_BUILD_INFO_ALL_ACTIONSoff
Run for non-Release configurations--enable-all-configurations / --disable-all-configurationsBUGSEE_BUILD_INFO_ALL_CONFIGURATIONSoff (Release-only)

When gated out, the command is a no-op and exits 0.

What it collects and uploads

StepFlagEnvironment variableDefault
Dependency graph--enable-dependencies / --disable-dependenciesBUGSEE_DEPENDENCIES_ENABLEDon
Build timings (from .xcactivitylog)--enable-timings / --disable-timingsBUGSEE_BUILD_INFO_TIMINGS_ENABLEDon
Upload .ipa for size analysis--enable-size-analysis / --disable-size-analysisBUGSEE_SIZE_ANALYSIS_ENABLEDoff
Chunked artefact transport--enable-chunked-upload / --disable-chunked-uploadBUGSEE_CHUNKED_UPLOADoff

dSYM upload and build-info registration always run when the command is admitted.

In-build size check

The size check can deliberately fail the build (exit 40) when the artefact grows past a configured threshold — but only with --force-foreground.

BehaviourFlagEnvironment variableDefault
Enable the size-growth check--enable-size-check / --disable-size-checkBUGSEE_SIZE_CHECK_ENABLEDoff
Warn at ≥ percent growth--size-check-warning-pct <PCT>BUGSEE_SIZE_CHECK_WARNING_PCT
Fail at ≥ percent growth--size-check-fail-pct <PCT>BUGSEE_SIZE_CHECK_FAIL_PCT
Warn at ≥ bytes growth--size-check-warning-bytes <BYTES>BUGSEE_SIZE_CHECK_WARNING_BYTES
Fail at ≥ bytes growth--size-check-fail-bytes <BYTES>BUGSEE_SIZE_CHECK_FAIL_BYTES

Growth is measured against the previous build.

Flags override environment variables

Every toggle above has both a CLI flag and an environment variable. The Xcode build environment exports the BUGSEE_* variables; a flag passed on the command line overrides its environment variable. Within a --enable-x / --disable-x pair, the last flag wins; an unset flag falls back to the environment variable, then the default.

The app token and endpoint come from --app-token / --endpoint (or BUGSEE_APP_TOKEN / BUGSEE_ENDPOINT) like every other command — see Configuration.

tip

BUGSEE_BUILD_INFO_ALL_CONFIGURATIONS has a legacy alias, BUGSEE_SIZE_ANALYSIS_ALL_CONFIGURATIONS, which is still honoured.

For the authoritative, always-current list, run:

bugsee-cli xcode post-action --help
Found an issue, typo, or wrong statement on this page? Report it now →