BugSnag is now Insight Hub - we're making some changes to how the product looks, but this won't impact the way you use BugSnag or any of your integrations.

Upload Xcode Archives

Upload dSYM files to allow BugSnag to show human-friendly function names, file paths, and line numbers in your iOS, macOS, and tvOS stacktraces.

For installation instructions for the BugSnag CLI, please see our Installation guide.

Overview

The xcode-archive command extracts dSYM files from your Xcode archives and uploads them to the dSYM upload API. The command will attempt to locate your Xcode archives if provided with an Xcode project, or else a direct path can be provided.

In addition to the dSYMs, the command extracts version and build information, including your BugSnag API key, required for the upload from your app’s Info.plist file. These values can be overridden, or provided entirely, by command line options.

Example usage

The simplest way to run the command is from the root directory of your project:

$ bugsnag-cli upload xcode-archive

Or by providing a specific project file

$ bugsnag-cli upload xcode-archive path/to/my-project.xcodeproj

Or to the Xcode archive itself:

$ bugsnag-cli upload xcode-archive path/to/generated/MyApp.xcarchive

If your project contains multiple schemes or has a non-standard project layout, you might need to provide extra options:

$ bugsnag-cli upload xcode-archive \
    --scheme Production

Available options

API key (--api-key)

The BugSnag API key for the application.

You can find your API key in Project Settings from your BugSnag dashboard.

Dry run (--dry-run)

Performs a dry-run of the command without sending any information to BugSnag.

Fail on upload error (--fail-on-upload-error)

Stops the upload when a file fails to upload successfully.

Ignore empty dSYM (--ignore-empty-dsym)

Throw warnings instead of errors when a dSYM file is found, rather than the expected dSYM directory.

Ignore missing dwarf (--ignore-missing-dwarf)

Throw warnings instead of errors when a dSYM with missing DWARF data is found.

Log level (--log-level)

Sets the level of logging to debug, info, warn or fatal.

Default: info.

Overwrite (--overwrite)

Whether to ignore and overwrite existing uploads with same identifier, rather than failing if a matching file exists.

Port (--port)

The port number for the BugSnag upload server.

Default: 443.

Project root (--project-root)

The path to strip from the beginning of source file names referenced in stacktraces on the BugSnag dashboard.

Default: the root directory if the command has detected one, otherwise it’s empty.

Retries (--retries)

The number of retry attempts before failing an upload request.

Default: 0.

Scheme (--scheme)

The name of the Xcode options.Scheme used to build the application.

Timeout (--timeout)

The number of seconds to wait before failing an upload request.

Default: 300.

Upload API root URL (--upload-api-root-url)

The upload server hostname, optionally containing port number.

For use in BugSnag On-premise configurations. The command will append the appropriate path to access the correct upload endpoint.

Default: https://upload.bugsnag.com.

Verbose (--verbose)

Sets the level of the logging to its highest.

This is the equivalent of setting the log level to debug.