Backtrace offers integration with iOS, macOS and tvOS applications using the backtrace-cocoa library. Your apps written in Swift or Objective-C can easily start submitting error reports to your Backtrace instance.
The backtrace-cocoa library is available at https://github.com/backtrace-labs/backtrace-cocoa
Setup and Installation
Configure your Backtrace Instance
If you don't have a Backtrace instance yet, create one at https://backtrace.io/create.
You will be provided a Backtrace instance with a domain in the following form:
Once you log into your instance, you will need to create a project and a submission token in that project in order to start submitting error reports. Your submission token is accessible under your Project Settings -> Error Submission:
You'll use the submission token information to submit error reports to your Backtrace instance and specific project.
Configure your Application
Use CocoaPods to install the reporting library into your application. Find more information about using the library in the README file. You'll find details on how to
initialize and submit simple error reports to your Backtrace instance
configure the offline database and submission retry settings
populate and submit custom attributes alongside the error report
attach files such as logs to the error report
Submit Debug Symbols
After compiling your application with the new backtrace-cocoa library, you should make sure any symbol files (DSYM) are uploaded to Backtrace so that they can be used to symbolicate new incoming crashes. Please review the Symbolication documentation for more information.
If you upload debug symbols after crashes have been received, make sure to use the Project Settings -> Reprocess Objects function to attempt to symbolicate any call stacks with missing information.
Submit your first Error
Following the information in the README, you should be able to use a BacktraceClient object to send an error report to your Backtrace instance upon encountering an error or crash.
Review the Error in Backtrace
Review the error you submitted using the Backtrace Triage, Explore or Debug tools.
Index Additional Attributes
backtrace-cocoa submits about 35 system level attributes about the device and the application that you can index and make use of in Backtrace.
Goto your Project Settings -> Attributes tab to view Attributes. You will see a list of Recommended Attributes based on what's been submitted with crash reports in this project. Learn more about how to setup these Attributes in the Attribute documentation.
Once you create these Attributes, you will need to Reprocess Objects (Project Settings -> Object Reprocessing) in order to reindex any crash report that was submitted before these Attributes were added.
You'll notice in the Triage -> Details page, you can now add the additional attributes to view, or in the Explore page you'll be able to use those attributes for filtering or aggregation.
Advanced Configuration of backtrace-cocoa
Once you confirm that simple errors are being submitted, you can go back to the backtrace-cocoa README and setup additional reporting settings, such as modifying the offline settings, attaching additional custom attributes, or attaching file attachments.