Bugfender Class Reference
Inherits from | NSObject |
---|---|
Declared in | BugfenderSDK.h |
Configuration
+ activateLogger:
- Activates the Bugfender for a specific app.
- @param appToken The app token of the Bugfender application
- @discussion This method needs to be called before any BFLog call, otherwise the
BFInvalidMethodCallException
exception will be thrown. - @throws
NSInvalidArgumentException
if Bugfender has already been initialized with a different app token. *
+ (void)activateLogger:(NSString *)appKey
Discussion
- Activates the Bugfender for a specific app.
- @param appToken The app token of the Bugfender application
- @discussion This method needs to be called before any BFLog call, otherwise the
BFInvalidMethodCallException
exception will be thrown. - @throws
NSInvalidArgumentException
if Bugfender has already been initialized with a different app token. *
Declared In
BugfenderSDK.h
+ appKey
Returns the app token.
+ (nullable NSString *)appKey
Return Value
The app token, or nil if Bugfender has not been initialized.
Discussion
Returns the app token.
Declared In
BugfenderSDK.h
+ maximumLocalStorageSize
Maximum space availalbe to store local logs. This value is represented in bytes. Default value is 5242880 (102410245 = 5MB).
+ (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
+ setMaximumLocalStorageSize:
Set the maximum space availalbe to store local logs. This value is represented in bytes. There’s a limit of 50 MB.
+ (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
+ deviceIdentifier
Returns the device identifier used to identify the current device in the Bugfender website.
+ (NSString *)deviceIdentifier
Return Value
A string identifying the device.
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.
Declared In
BugfenderSDK.h
+ setForceEnabled:
Synchronizes all logs with the server all the time, regardless if this device is enabled or not.
+ (void)setForceEnabled:(BOOL)enabled
Parameters
enabled |
Whether logs should be sent regardless of the Bugfender Console settings. |
---|
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.
Declared In
BugfenderSDK.h
+ setPrintToConsole:
Prints messages to console for debugging purposes.
+ (void)setPrintToConsole:(BOOL)enabled
Parameters
enabled |
Whether printing to console is enabled or not. |
---|
Discussion
Prints messages to console for debugging purposes.
Declared In
BugfenderSDK.h
+ printToConsole
Gets the status of printToConsole. printToConsole prints messages to console. By default it’s disabled.
+ (BOOL)printToConsole
Discussion
Gets the status of printToConsole. printToConsole prints messages to console. By default it’s disabled.
Declared In
BugfenderSDK.h
+ enableUIEventLogging
Logs all actions performed and screen changes in the application, such as button touches, swipes and gestures.
+ (void)enableUIEventLogging
Discussion
Logs all actions performed and screen changes in the application, such as button touches, swipes and gestures.
Declared In
BugfenderSDK.h
+ sendIssueWithTitle:text:
Sends an issue
+ (void)sendIssueWithTitle:(NSString *)title text:(NSString *)text
Parameters
title |
Short description of the issue. |
---|---|
text |
Full details of the issue. Markdown format is accepted. |
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.
Declared In
BugfenderSDK.h
Device details
+ setDeviceBOOL:forKey:
Sets a device detail with boolean type.
+ (void)setDeviceBOOL:(BOOL)b forKey:(NSString *)key
Parameters
b |
A boolean value. |
---|---|
key |
Key. |
Discussion
Sets a device detail with boolean type.
Similarly to an NSDictionary, where you can set key-value pairs related to a Bugfender device.
Declared In
BugfenderSDK.h
+ setDeviceString:forKey:
Sets a device detail with string type.
+ (void)setDeviceString:(NSString *)s forKey:(NSString *)key
Parameters
s |
A string value. The maximum length allowed is 192 bytes. |
---|---|
key |
Key. |
Discussion
Sets a device detail with string type.
Similarly to an NSDictionary, where you can set key-value pairs related to a Bugfender device.
Declared In
BugfenderSDK.h
+ setDeviceInteger:forKey:
Sets a device detail with integer type.
+ (void)setDeviceInteger:(UInt64)i forKey:(NSString *)key
Parameters
i |
An UInt64 value. |
---|---|
key |
Key. |
Discussion
Sets a device detail with integer type.
Similarly to an NSDictionary, where you can set key-value pairs related to a Bugfender device.
Declared In
BugfenderSDK.h
+ setDeviceDouble:forKey:
Sets a device detail with double type.
+ (void)setDeviceDouble:(double)d forKey:(NSString *)key
Parameters
d |
A double value. |
---|---|
key |
Key. |
Discussion
Sets a device detail with double type.
Similarly to an NSDictionary, where you can set key-value pairs related to a Bugfender device.
Declared In
BugfenderSDK.h
+ removeDeviceKey:
Removes a device detail.
+ (void)removeDeviceKey:(NSString *)key
Parameters
key |
Key. |
---|
Discussion
Removes a device detail.
Similarly to an NSDictionary, where you can remove an existent key-value pair related to a Bugfender device by indicating its key.
Declared In
BugfenderSDK.h
Logging
+ logWithLineNumber:method:file:level:tag:message:
Bugfender extended interface for logging, which takes a simple string as log message.
+ (void)logWithLineNumber:(NSInteger)lineNumber method:(NSString *)method file:(NSString *)file level:(BFLogLevel)level tag:(nullable NSString *)tag message:(NSString *)message
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. |
Discussion
Bugfender extended 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
Declared In
BugfenderSDK.h
Commands
+ forceSendOnce
Synchronizes all logs with the server once, regardless if this device is enabled or not.
+ (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