backtrace-cocoa
backtrace-cocoa copied to clipboard
Backtrace for Apple devices
Backtrace Integration with iOS
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.
Installation
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.
Via Xcode
- 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.
Via Package.swift
Add this dependency to your Package.swift
file:
.package(url: "https://github.com/backtrace-labs/backtrace-cocoa.git)
Via CocoaPods
Add the following to your Podfile
:
-
Specify
use_frameworks!
. -
Add the
Backtrace
pod:pod 'Backtrace'
Via Multiplatform Binary Framework Bundle
-
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
Usage
Swift
https://github.com/backtrace-labs/backtrace-cocoa/blob/8551020be9334f61cd9f27d39a7b4e7d2733d4b0/Examples/Example-iOS/AppDelegate.swift#L21-L41
Objective-C
https://github.com/backtrace-labs/backtrace-cocoa/blob/8551020be9334f61cd9f27d39a7b4e7d2733d4b0/Examples/Example-iOS-ObjC/AppDelegate.m#L19-L45
Documentation
For more information about the iOS SDK, including installation, usage, and configuration options, see the iOS Integration guide in the Sauce Labs documentation.