Configuration

Launching with options

Bugsee behavior is very customizable, if default configuration is not satisfying your needs you can launch the SDK with additional parameters passed as a dictionary.

Objective-C

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // ...other initialization code

    NSDictionary * options = @{
           BugseeMaxRecordingTimeKey   : @60,  
           BugseeShakeToReportKey      : BugseeTrue,
           BugseeScreenshotToReportKey : BugseeTrue,
           BugseeCrashReportKey        : BugseeTrue
    };

    [Bugsee launchWithToken:@"<your_app_token>" andOptions:options];

    return YES;
}

Swift

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    // ...other initialization code

    let options : [String: Any] =
        [ BugseeMaxRecordingTimeKey   : 60,
          BugseeShakeToReportKey      : false,
          BugseeScreenshotToReportKey : true,
          BugseeCrashReportKey        : true ]

    Bugsee.launch(token: "<your_app_token>", options: options)

    return true
}

Available Options

Key Default value Notes
BugseeMaxRecordingTimeKey @60 Maximum recording duration
BugseeShakeToReportKey NO Shake gesture to trigger report
BugseeScreenshotToReportKey YES Screenshot key to trigger report
BugseeCrashReportKey YES Catch and report application crashes (**)
BugseeKillDetectionKey NO Detect abnormal termination (experimental, read more)
BugseeVideoEnabledKey YES Enable video recording
BugseeCaptureLogsKey YES Automatically capture all console logs
BugseeMonitorNetworkKey YES Capture network traffic

* Frame rate depends on a lot of factors including the overall load of the system, we are doing our best not to interfere with the performance of the application hence the frame rate of the video can not be guaranteed, this only sets the upper boundary (i.e its not going to be higher than 15 fps)

** IOS allows only one crash detector to be active at a time, if you insist on using an alternative solution for handling crashes, you might want to use this option and disable Bugsee from taking over.

Setting reporters email

When you already have your users identified within your app, you might want to add their email automatically attached to the bug report. Bugsee provides API's for setting, getting and clearing the email.

Objective-C

    // setting email
    [Bugsee setEmail:@"name@example.com"]

    // getting email, nil will be returned if email was never set
    NSString *email = [Bugsee getEmail];

    // clearing email
    [Bugsee clearEmail];

Swift

    // setting email
    Bugsee.setEmail("name@example.com")

    // getting email, nil will be returned if email was never set
    var email = Bugsee.getEmail()

    // clearing email
    Bugsee.clearEmail()