Installation

Integrate SDK

CocoaPods

To integrate Buglife into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Buglife'

Then, run the following command:

$ pod install

Manually

  1. Download the Buglife SDK

  2. Unzip it & pull Buglife.framework into the Frameworks group in your project. In the following dialog box, make sure you have Copy items if needed checked.

Code

  1. Import the Buglife framework header into your app delegate.

    // Swift
    import Buglife
    
    // Objective-C
    #import <Buglife/Buglife.h>
    
  2. Add the following to your app delegate’s application:didFinishLaunchingWithOptions: method.

    // Swift
    Buglife.shared().start(withEmail: "[email protected]")
    
    // Objective-C
    [[Buglife sharedBuglife] startWithEmail:@"[email protected]"];
    

    Be sure to replace [email protected] with your own email address; this is where bug reports will be sent to.

    Note: If you’ve already signed up for a Buglife account, use the startWithAPIKey() method instead of startWithEmail(). Your API key can be found in your app settings on the Buglife dashboard.

Usage

Build & run your app. Once your app is running, shake your device (^⌘Z in the simulator) to report a bug! Bug reports are sent directly to your email address.