The BugSplat iOS framework enables posting crash reports from iOS applications to BugSplat. Visit http://www.bugsplat.com for more information and to sign up for an account.
BugSplat supports multiple methods for installing the library in a project.
CocoaPods is a dependency manager, which automates and simplifies the process of using 3rd-party libraries like BugSplat in your projects. You can install it with the following command:
$ gem install cocoapods
To integrate BugSplat into your Xcode project using CocoaPods, specify it in your Podfile
:
target 'TargetName' do
pod 'Bugsplat'
end
Then, run the following command:
$ pod install
The pod install command creates an xcworkspace file next to your application's xcodeproj file. Open the xcworkspace file in lieu of the xcodeproj file to ensure Bugsplat.framework is included in your build.
BugSplat framework binaries are also now distributed via Swift Package Manager. You can now add BugSplat as a dependency in the Swift Packages configuration in your Xcode project by pointing to https://github.com/BugSplat-Git/BugSplat-iOS
To use this library in your project manually you may:
Bugsplat.xcframework
from your window in the Finder
into your project in Xcode and move it to the desired location in the Project Navigator
Create groups for any added folders
and set the checkmark for your target. Then click Finish
.Project Navigator
(⌘+1).Build Phases
tab.Add Build Phase
button at the bottom and choose Add Copy Files
.Frameworks
from the Destination list.Bugsplat
from the Project Navigator left sidebar to the list in the new Copy Files phase.BugSplat requires a few configuration steps in order integrate the framework with your BugSplat account
Add the following key to your app's Info.plist replacing DATABASE_NAME with your BugSplat database name
<key>BugsplatServerURL</key>
<string>https://DATABASE_NAME.bugsplat.com/</string>
You must upload an archive containing your app's binary and symbols to the BugSplat server in order to symbolicate crash reports. There are scripts to help with this.
Create a ~/.bugsplat.conf file to store your BugSplat credentials
BUGSPLAT_USER="<username>"
BUGSPLAT_PASS="<password>"
upload-symbols.sh
to upload a zip containing the app and dSYM files. This can be run on the command line or integrated into your build/CI process.${PROJECT_DIR}
as an Archive post-action in your build scheme. Set the "Provide build settings from" target in the dropdown so that the ${PROJECT_DIR}
environment variable can be used to locate upload-archive.sh. The script will be invoked when archiving completes which will upload the xcarchive to BugSplat for processing. You can view the script output in /tmp/bugsplat-upload.log
. To share amongst your team, mark the scheme as 'Shared'.import Bugsplat
@main
struct BugsplatTesterApp: App {
init() {
BugsplatStartupManager.shared().start()
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Bitcode was introduced by Apple to allow apps sent to the App Store to be recompiled by Apple itself and apply the latest optimization. If Bitcode is enabled, the symbols generated for your app in the store will be different than the ones from your own build system. We recommend that you disable bitcode in order for BugSplat to reliably symbolicate crash reports. Disabling bitcode significantly simplifies symbols management and currently doesn't have any known downsides for iOS apps.