Skip to main content

bfgCrashlytics Class

Crashlytics allows you to associate arbitrary key/value pairs with your crash reports, which are viewable right from the Crashlytics dashboard. This class facilitates the setting of these key/value pairs for informative crash report on the dashboard. More...#import <bfgCrashlytics.h>

Instance Methods

(void) - start
 
(void) - log:
 
(void) - recordNonFatalEvent:
 
(void) - setCustomKey:value:
 

Class Methods

(void) + setObjectValue:forKey:
 
(void) + setIntValue:forKey:
 
(void) + setBoolValue:forKey:
 
(void) + setFloatValue:forKey:
 
(instancetype _Nullable) + getInstance
 

Detailed Description

Crashlytics allows you to associate arbitrary key/value pairs with your crash reports, which are viewable right from the Crashlytics dashboard. This class facilitates the setting of these key/value pairs for informative crash report on the dashboard. Crashlytics supports a maximum of 64 key/value pairs. Once you reach this threshold, additional values are not saved. Each key/value pair can be up to 1 KB in size; anything past that will be truncated.
Note
Re-setting the same key will update the value.
Since
6.3

Method Documentation

◆ getInstance

+ (instancetype _Nullable) getInstance
Accesses the singleton bfgCrashlytics instance.
Returns
The singleton bfgCrashlytics instance.
Since
7.1.3

◆ log:

- (void) log: (NSString *_Nonnull) message
Adds logging that is sent with your crash data. The logging is only visible in the Crashlytics dashboard.
Parameters
messageThe message to log.
Since
7.1.3

◆ recordNonFatalEvent:

- (void) recordNonFatalEvent: (NSError *_Nonnull) error
Records a non-fatal event described by an NSError object. The events are grouped and displayed similarly to crashes. Keep in mind that this method can be expensive. The total number of NSErrors that can be recorded during your app's life-cycle is limited by a fixed-size circular buffer. If the buffer is overrun, the oldest data is dropped. Errors are relayed to Crashlytics on a subsequent launch of your application.
Parameters
errorThe non fatal error to be recorded.
Since
7.1.3

◆ setBoolValue:forKey:

+ (void) setBoolValue: (BOOL) value
forKey:("Deprecated since iOS SDK 7.1.3. Refer to setCustomKey:value:") __deprecated_msg 
Set bool value in Crashlytics to be reported with any crashes from the game.
Parameters
valuebool value of the key/value pair.
keyString key of the key/value pair.
Since
6.3
Deprecated:\n This method is deprecated since iOS SDK 7.1.3 and won't be supported in a future release. Refer to bfgCrashlytics::setCustomKey:value: for the recommended method to use.

◆ setCustomKey:value:

- (void) setCustomKey: (NSString *_Nonnull) key
value:(id _Nonnull) value 
Sets a custom key and value to be associated with subsequent fatal and non-fatal reports. Supported value types are Int, Double, Float, Bool, String.
Note
When setting an object value, the object is converted to a string. This is typically done by calling "-[NSObject description]".
Parameters
keyA unique key.
valueThe value to be associated with the key.
Since
7.1.3

◆ setFloatValue:forKey:

+ (void) setFloatValue: (float) value
forKey:("Deprecated since iOS SDK 7.1.3. Refer to setCustomKey:value:") __deprecated_msg 
Set float value in Crashlytics to be reported with any crashes from the game.
Parameters
valuefloat value of the key/value pair.
keyString key of the key/value pair.
Since
6.3
Deprecated:\n This method is deprecated since iOS SDK 7.1.3 and won't be supported in a future release. Refer to bfgCrashlytics::setCustomKey:value: for the recommended method to use.

◆ setIntValue:forKey:

+ (void) setIntValue: (int) value
forKey:("Deprecated since iOS SDK 7.1.3. Refer to setCustomKey:value:") __deprecated_msg 
Set int value in Crashlytics to be reported with any crashes from the game.
Parameters
valueint value of the key/value pair.
keyString key of the key/value pair.
Since
6.3
Deprecated:\n This method is deprecated since iOS SDK 7.1.3 and won't be supported in a future release. Refer to bfgCrashlytics::setCustomKey:value: for the recommended method to use.

◆ setObjectValue:forKey:

+ (void) setObjectValue: (id) value
forKey:("Deprecated since iOS SDK 7.1.3. Refer to setCustomKey:value:") __deprecated_msg 
Set an object value in Crashlytics to be reported with any crashes from the game. When setting an object value, the object is converted to a string. This is typically done by calling -[NSObject description].
Parameters
valueObject value of the key/value pair.
keyString key of the key/value pair.
Since
6.3
Deprecated:\n This method is deprecated since iOS SDK 7.1.3 and won't be supported in a future release. Refer to bfgCrashlytics::setCustomKey:value: for the recommended method to use.

◆ start

- (void) start
Initializes and configures Crashlytics.
Warning
iOS only.
Since
7.1.3