Backtrace's integration with iOS, macOS, and tvOS applications allows you to capture and report handled and unhandled exceptions so you can prioritize and debug software errors.
You can use this SDK through either Swift Package Manager or CocoaPods. The SPM package can be integrated directly within Xcode or by editing your package's Package.swift file.
Choose one of the following integration methods.
- In File > Add Packages, search for and add
https://github.com/backtrace-labs/backtrace-cocoa.git
- Verify your project Package Dependencies list backtrace-cocoa.
- Add Backtrace to your target’s Frameworks, Libraries, and Embedded Content.
Add this dependency to your Package.swift
file:
.package(url: "https://github.com/backtrace-labs/backtrace-cocoa.git)
Add the following to your Podfile
:
-
Specify
use_frameworks!
. -
Add the
Backtrace
pod:pod 'Backtrace'
-
Obtain and Unarchive Backtrace binary frameworks
-
Add Backtrace multiplatform binary framework bundle to your project using the method that best fits your workflow:
- Drag & drop
.framework
or.xcframework
from Finder into Xcode's Project Navigator and check the Target Membership setting - Using Swift Package Manager's
binaryTarget
flag - Using CocoaPods's
vendored_frameworks
flag
Note: Backtrace multiplatform binary framework contains Mach-O 64-bit dynamic binaries for iOS, macOS, Mac Catalyst and tvOS. When adding Backtrace to your project, set
Frameworks, Libraries and Embedded Content
section toEmbed
. PLCrashReporter multiplatform binary framework contains static binaries, setFrameworks, Libraries and Embedded Content
section toDo Not Embed
. - Drag & drop
backtrace-cocoa/Examples/Example-iOS/AppDelegate.swift
Lines 21 to 41 in 8551020
backtrace-cocoa/Examples/Example-iOS-ObjC/AppDelegate.m
Lines 19 to 45 in 8551020
For more information about the iOS SDK, including installation, usage, and configuration options, see the iOS Integration guide in the Sauce Labs documentation.