Inherits from NSObject
Declared in BugfenderSDK.h

Overview

Main Bugfender interface.

Tasks

Configuration

Logging

Commands

  • + forceSendOnce

    Synchronizes all logs with the server once, regardless if this device is enabled or not.

Class Methods

activateLogger:

+ (void)activateLogger:(NSString *)appToken
Discussion

Activates the Bugfender for a specific app.

This method needs to be called before any BFLog call, otherwise the BFInvalidMethodCallException exception will be thrown.

Parameters

appToken

The app token of the Bugfender application

Declared In

BugfenderSDK.h

deviceIdentifier

+ (NSString *)deviceIdentifier
Discussion

Returns the device identifier used to identify the current device in the Bugfender website.

This string can not be changed, but can be shown to the user or sent to your server, in order to keep a relationship between a Bugfender device and a user or some other important event in your application.

The device identifier is constant while the application is installed in the device.

Return Value

A string identifying the device.

Declared In

BugfenderSDK.h

enableAllWithToken:

+ (void)enableAllWithToken:(NSString *)appToken
Discussion

Activates the Bugfender and enables all automatic functionalities.

This method needs to be called before any BFLog call, otherwise the BFInvalidMethodCallException exception will be thrown.

Parameters

appToken

The app token of the Bugfender application

Declared In

BugfenderSDK.h

enableNSLogLogging

+ (void)enableNSLogLogging
Discussion

Logs all logs written via NSLog or ASL.

Declared In

BugfenderSDK.h

enableUIEventLogging

+ (void)enableUIEventLogging
Discussion

Logs all actions performed and screen changes in the application, such as button touches, swipes and gestures.

Declared In

BugfenderSDK.h

forceEnabled

+ (BOOL)forceEnabled
Discussion

Gets the status of forceEnabled.

See setForceEnabled:.

Declared In

BugfenderSDK.h

forceSendOnce

+ (void)forceSendOnce
Discussion

Synchronizes all logs with the server once, regardless if this device is enabled or not.

This method is useful when an error condition is detected and the logs should be sent to the server for analysis, regardless if the device is enabled in the Bugfender Console.

Logs are synchronized only once. After that, the logs are again sent according to the enabled flag in the Bugfender Console.

This command can be called anytime, and will take effect the next time the device is online.

Declared In

BugfenderSDK.h

logLineNumber:method:file:level:tag:format:

+ (void)logLineNumber:(NSInteger)lineNumber method:(NSString *)method file:(NSString *)file level:(BFLogLevel)level tag:(NSString *)tag format:(NSString *)format, ...
Discussion

Bugfender interface for logging, which takes a string format with parameters as log message.

This command can be called anytime, and will take effect the next time the device is online. For efficiency, several log lines can be sent together to the server with some delay.

Prefer to use the BFLog or BFLog2 macros in order to get file name and line number filled in automatically

Parameters

lineNumber

The line number of the log.

method

The method where the log has happened.

file

The file where the log has happened.

level

Log level.

tag

Tag or tags to be applied to the log line.

format

Format string, equivalent to NSLog’s first parameter. Format is followed by a variable list of arguments, equivalent to NSLog’s parameters after the format string.

Declared In

BugfenderSDK.h

logLineNumber:method:file:level:tag:format:args:

+ (void)logLineNumber:(NSInteger)lineNumber method:(NSString *)method file:(NSString *)file level:(BFLogLevel)level tag:(NSString *)tag format:(NSString *)format args:(va_list)args
Discussion

Bugfender interface for logging, which takes a varargs.

This command can be called anytime, and will take effect the next time the device is online. For efficiency, several log lines can be sent together to the server with some delay.

Prefer to use the BFLog or BFLog2 macros in order to get file name and line number filled in automatically

Parameters

lineNumber

The line number of the log.

method

The method where the log has happened.

file

The file where the log has happened.

level

Log level.

tag

Tag or tags to be applied to the log line.

format

Format string, equivalent to NSLog’s first parameter.

args

Arguments to the format string, equivalent to NSLog’s parameters after the format string.

Declared In

BugfenderSDK.h

logLineNumber:method:file:level:tag:message:

+ (void)logLineNumber:(NSInteger)lineNumber method:(NSString *)method file:(NSString *)file level:(BFLogLevel)level tag:(NSString *)tag message:(NSString *)message
Discussion

Bugfender interface for logging, which takes a simple string as log message.

This command can be called anytime, and will take effect the next time the device is online. For efficiency, several log lines can be sent together to the server with some delay.

Prefer to use the BFLog or BFLog2 macros in order to get file name and line number filled in automatically

Parameters

lineNumber

The line number of the log.

method

The method where the log has happened.

file

The file where the log has happened.

level

Log level.

tag

Tag or tags to be applied to the log line.

message

Message to be logged. The message will be logged verbatim, no interpretation will be performed.

Declared In

BugfenderSDK.h

maximumLocalStorageSize

+ (NSUInteger)maximumLocalStorageSize
Discussion

Maximum space availalbe to store local logs. This value is represented in bytes. Default value is 5242880 (102410245 = 5MB).

If maximumLocalStorageSize is 0 (zero), then there is no limit and everything will be stored locally.

Declared In

BugfenderSDK.h

removeDeviceKey:

+ (void)removeDeviceKey:(NSString *)key

sendIssueWithTitle:text:

+ (void)sendIssueWithTitle:(NSString *)title text:(NSString *)text
Discussion

Sends an issue

Sending an issue forces the logs of the current session being sent to the server, and marks the session so that it is highlighted in the web console.

Parameters

title

Short description of the issue.

text

Full details of the issue.

Declared In

BugfenderSDK.h

setDeviceBOOL:forKey:

+ (void)setDeviceBOOL:(BOOL)b forKey:(NSString *)key
Discussion

@name Device details


Declared In

BugfenderSDK.h

setDeviceDouble:forKey:

+ (void)setDeviceDouble:(double)d forKey:(NSString *)key

setDeviceInteger:forKey:

+ (void)setDeviceInteger:(UInt64)i forKey:(NSString *)key

setDeviceString:forKey:

+ (void)setDeviceString:(NSString *)s forKey:(NSString *)key

setForceEnabled:

+ (void)setForceEnabled:(BOOL)enabled
Discussion

Synchronizes all logs with the server all the time, regardless if this device is enabled or not.

This method is useful when the logs should be sent to the server regardless if the device is enabled in the Bugfender Console.

Logs are synchronized continuously while forceEnabled is active.

This command can be called anytime, and will take effect the next time the device is online.

Parameters

enabled

Whether logs should be sent regardless of the Bugfender Console settings.

Declared In

BugfenderSDK.h

setMaximumLocalStorageSize:

+ (void)setMaximumLocalStorageSize:(NSUInteger)maximumLocalStorageSize
Discussion

Set the maximum space availalbe to store local logs. This value is represented in bytes. There’s a limit of 50 MB.

Declared In

BugfenderSDK.h