> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apsio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Symbols in CI

> Upload dSYMs from a CI job with an upload token in APSIO_TOKEN.

In CI, give the [`apsio` CLI](/cli) your project's [upload token](/symbols/upload#upload-tokens)
through the `APSIO_TOKEN` environment variable, kept in your CI provider's secrets. Never pass it as a command-line flag: flags show
in logs and in the process list.

## After an archive

```sh theme={null}
xcodebuild archive -scheme Shop -destination 'generic/platform=iOS' -archivePath build/Shop.xcarchive
apsio upload dsyms build/Shop.xcarchive
```

With `APSIO_TOKEN` set, `apsio upload dsyms` needs nothing else. If your archive step runs
the [Xcode build phase](/symbols/xcode), it uploads already; the second command then finds
every file on the server and uploads nothing.

## GitHub Actions

```yaml theme={null}
- name: Upload dSYMs to Apsio
  env:
    APSIO_TOKEN: ${{ secrets.APSIO_TOKEN }}
  run: apsio upload dsyms build/Shop.xcarchive
```

## Storing the token for later steps

When several steps call the CLI, store the token once. `--with-token` reads it from standard
input, so it never appears in the command line:

```sh theme={null}
printf '%s' "$APSIO_TOKEN" | apsio login --with-token
apsio upload dsyms build/Shop.xcarchive
```

`apsio login` checks the token against the server before it stores it; it exits with code 3
when the server refuses it.

## Exit codes in CI

| Code | Meaning | What to do |
| - | - | - |
| 0 | Uploaded, or nothing new to upload | Nothing |
| 1 | Network or server error | Retry the step |
| 3 | No token, or the server refused it | Check the `APSIO_TOKEN` secret |
| 4 | No dSYMs found, or files the server rejected | Check Debug Information Format and the path |

`apsio upload dsyms --json` prints a report your pipeline can read. See
[Upload dSYMs](/symbols/upload#output-for-scripts).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.