The BugsplatMac OS X framework enables posting crash reports from Cocoa applications to Bugsplat. Visit http://www.bugsplat.com for more information and to sign up for an account.
- BugsplatMac supports OS X 10.7 and later.
- BugsplatMac supports x86_64 applications only.
BugsplatMac supports multiple methods for installing the library in a project.
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like BugsplatMac in your projects. You can install it with the following command:
$ gem install cocoapods
To integrate BugsplatMac into your Xcode project using CocoaPods, specify it in your Podfile
:
target 'TargetName' do
pod 'BugsplatMac'
end
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate BugsplatMac into your Xcode project using Carthage, specify it in your Cartfile
:
github "BugsplatGit/BugsplatMac"
Run carthage
to build the framework and drag the built BugsplatMac.framework
into your Xcode project.
To use this library in your project manually you may:
- Download the latest release from https://github.com/BugSplatGit/BugsplatMac/releases which is provided as a zip file
- Unzip the archive and add BugsplatMac.framework to your Xcode project
- Drag & drop
BugsplatMac.framework
from your window in theFinder
into your project in Xcode and move it to the desired location in theProject Navigator
- A popup will appear. Select
Create groups for any added folders
and set the checkmark for your target. Then clickFinish
. - Configure the framework to be copied into your app bundle:
- Click on your project in the
Project Navigator
(⌘+1). - Click your target in the project editor.
- Click on the
Build Phases
tab. - Click the
Add Build Phase
button at the bottom and chooseAdd Copy Files
. - Click the disclosure triangle next to the new build phase.
- Choose
Frameworks
from the Destination list. - Drag
BugsplatMac
from the Project Navigator left sidebar to the list in the new Copy Files phase.
BugsplatMac 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 account name
<key>BugsplatServerURL</key> <string>https://DATABASE_NAME.bugsplat.com/</string>
-
You must upload an xcarchive containing your app's binary and symbols to the Bugsplat server in order to symbolicate crash reports.
-
Create a ~/.bugsplat.conf file to store your Bugsplat credentials
BUGSPLAT_USER="<username>" BUGSPLAT_PASS="<password>"
-
Add the upload-archive.sh script located in
${PROJECT_DIR}/Pods/BugsplatMac/BugsplatMac/Bugsplat.framework/Versions/A/Resources
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 BugsplatMac;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[[BugsplatStartupManager sharedManager] start];
}
-
Add "Other Linker Flags" build setting to embed Info.plist
-sectcreate __TEXT __info_plist "$(SRCROOT)/BugsplatTesterCLI/Info.plist"
-
Add
@executable_path/
to "Runtime Search Paths" build setting -
Follow main configuration steps listed above, however, use upload-archive-cl.sh for uploading archives
-
Initialize as follows:
[BugsplatStartupManager sharedManager].autoSubmitCrashReport = YES; [BugsplatStartupManager sharedManager].askUserDetails = NO; [[BugsplatStartupManager sharedManager] start];
-
Given the "Runtime Search Paths" setting change in step 2, be sure any 3rd party dependencies are located in the same directory as the CLI program so they can be found at runtime.