Skip to main content

bfgCrashlytics Class

API for interfacing with BFG-managed Crashlytics. More...

Classes

struct  InitializationResult
 Struct indicating the result of a bfgCrashlytics initialization attempt. More...
 

Static Public Member Functions

static async Task< InitializationResultInitializeAsync ()
 Initialize and configure Crashlytics. Must be called prior to any other bfgCrashlytics methods. More...
 
static void Shutdown ()
 Disables Crashlytics and releases any managed handles/resources.
 
static void Log (string message)
 Adds logging that is sent with your crash data. The logging is only visible in the Crashlytics dashboard. More...
 
static void LogException (Exception exception)
 Records a non-fatal event. The events are grouped and displayed similarly to crashes. Keep in mind that this method can be expensive. The total number of events 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. More...
 
static void SetCustomKey (string key, string value)
 Records a custom key and value to be associated with subsequent fatal and non-fatal reports. Multiple calls to this method with the same key will update the value for that key. The value of any key at the time of a fatal or non-fatal event will be associated with that event. More...
 

Detailed Description

API for interfacing with BFG-managed Crashlytics.

Member Function Documentation

◆ InitializeAsync()

static async Task< InitializationResult > BFGSDK.bfgCrashlytics.InitializeAsync ()
inlinestatic
Initialize and configure Crashlytics. Must be called prior to any other bfgCrashlytics methods.
Returns
Task used to track the asynchronous initialization operation.
bfgCrashlytics.InitializeAsync().ContinueWith(task => { if (task.Result.Succeeded) { // OK to use bfgCrashlytics methods } else { // Not OK to use bfgCrashlytics methods Debug.LogError($"Failed to initialize crashlytics: {task.Result}"); } });

◆ Log()

static void BFGSDK.bfgCrashlytics.Log (string message)
inlinestatic
Adds logging that is sent with your crash data. The logging is only visible in the Crashlytics dashboard.
Parameters
messageThe message to log.

◆ LogException()

static void BFGSDK.bfgCrashlytics.LogException (Exception exception)
inlinestatic
Records a non-fatal event. The events are grouped and displayed similarly to crashes. Keep in mind that this method can be expensive. The total number of events 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
exceptionA C# Exception object that will be transformed to a native error for iOS and Android.

◆ SetCustomKey()

static void BFGSDK.bfgCrashlytics.SetCustomKey (string key,
string value 
)
inlinestatic
Records a custom key and value to be associated with subsequent fatal and non-fatal reports. Multiple calls to this method with the same key will update the value for that key. The value of any key at the time of a fatal or non-fatal event will be associated with that event. A maximum of 64 key/value pairs can be written, and new keys added beyond that limit will be ignored. Keys or values that exceed 1024 characters will be truncated.
Parameters
keyA unique key
valueA value to be associated with the given key. This can be any of the following data types: String, int or Integer, boolean or Boolean, float or Float, double or Double, or long or Long.