When you build iOS games with Unity using IL2CPP, dSYMs are created when building or archiving the generated Xcode project. These files should be uploaded, along with any Line Mapping files in order to show full stacktraces in your dashboard.
For installation instructions for the BugSnag CLI, please see our Installation guide.
The unity-ios
command uploads the dSYMs for your iOS app to the dSYM API.
The command will also attempt to upload the IL2CPP Unity line mapping file (LineNumberMappings.json
), to map native stack frames to C# source files and line numbers. The file should be found automatically, but the --upload-il2cpp-mapping
may be used to provide a non-standard location. The upload will fail if no mapping file can be found, unless the --no-upload-il2cpp-mapping
flag is set to explicitly opt-out of this functionality.
Assuming you have run an Xcode Archive from the generated Unity Xcode project, you can upload the dSYMs and IL2CPP mapping file using:
$ bugsnag-cli upload unity-ios /path/to/unity-project \
--api-key=YOUR_API_KEY
Alternatively you can provide the path to the Unity project and the upload files specifically:
$ bugsnag-cli upload unity-ios /path/to/unity-project \
--api-key=YOUR_API_KEY \
--dsym-path=/path/to/dsyms \
--upload-il2cpp-mapping=/path/to/LineNumberMappings.json
--api-key
)The BugSnag API key for the application.
You can find your API key in Project Settings from your BugSnag dashboard.
--application-id
)A unique application ID, usually the package name, of the application.
--bundle-version
)The bundle version of this build of the application (Apple platforms only).
--configuration
)The configuration used to build the application.
--dry-run
)Performs a dry-run of the command without sending any information to BugSnag.
--dsym-path
)The path to the dSYM file to upload.
--ignore-empty-dsym
)Throw warnings instead of errors when a dSYM file is found, rather than the expected dSYM directory.
--ignore-missing-dwarf
)Throw warnings instead of errors when a dSYM with missing DWARF data is found.
--log-level
)Sets the level of logging to debug, info, warn or fatal.
Default: info
.
--no-upload-il2cpp-mapping
)Do not upload the IL2CPP mapping file (LineNumberMappings.json).
--overwrite
)Whether to ignore and overwrite existing uploads with same identifier, rather than failing if a matching file exists.
--plist
)The path to a .plist file from which to obtain build information.
--port
)The port number for the BugSnag upload server.
Default: 443
.
--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
)The number of retry attempts before failing an upload request.
Default: 0
.
--scheme
)The name of the Xcode options.Scheme used to build the application.
--timeout
)The number of seconds to wait before failing an upload request.
Default: 300
.
--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.
--upload-il2cpp-mapping
)The path to the IL2CPP mapping file (LineNumberMappings.json) to upload.
--verbose
)Sets the level of the logging to its highest.
This is the equivalent of setting the log level to debug
.
--version-name
)The version of the application.
--xcode-project
)The path to an Xcode project, workspace or containing directory from which to obtain build information.