PlausibleCrashReporter
Instance Methods | Class Methods | List of all members
PLCrashReporter Class Reference

Shared application crash reporter. More...

Inherits NSObject.

Instance Methods

(BOOL) - hasPendingCrashReport
 Returns YES if the application has previously crashed and an pending crash report is available.
 
(NSData *) - loadPendingCrashReportData
 If an application has a pending crash report, this method returns the crash report data. More...
 
(NSData *) - loadPendingCrashReportDataAndReturnError:
 If an application has a pending crash report, this method returns the crash report data. More...
 
(NSData *) - generateLiveReport
 Generate a live crash report, without triggering an actual crash condition. More...
 
(NSData *) - generateLiveReportAndReturnError:
 Generate a live crash report, without triggering an actual crash condition. More...
 
(BOOL) - purgePendingCrashReport
 Purge a pending crash report. More...
 
(BOOL) - purgePendingCrashReportAndReturnError:
 Purge a pending crash report. More...
 
(BOOL) - enableCrashReporter
 Enable the crash reporter. More...
 
(BOOL) - enableCrashReporterAndReturnError:
 Enable the crash reporter. More...
 
(void) - setCrashCallbacks:
 Set the callbacks that will be executed by the receiver after a crash has occured and been recorded by PLCrashReporter. More...
 

Class Methods

(PLCrashReporter *) + sharedReporter
 Return the application's crash reporter instance.
 

Detailed Description

Shared application crash reporter.

Method Documentation

- (BOOL) enableCrashReporter

Enable the crash reporter.

Once called, all application crashes will result in a crash report being written prior to application exit.

Returns
Returns YES on success, or NO if the crash reporter could not be enabled.
- (BOOL) enableCrashReporterAndReturnError: (NSError **)  outError

Enable the crash reporter.

Once called, all application crashes will result in a crash report being written prior to application exit.

This method must only be invoked once. Further invocations will throw a PLCrashReporterException.

Parameters
outErrorA pointer to an NSError object variable. If an error occurs, this pointer will contain an error object indicating why the Crash Reporter could not be enabled. If no error occurs, this parameter will be left unmodified. You may specify nil for this parameter, and no error information will be provided.
Returns
Returns YES on success, or NO if the crash reporter could not be enabled.
- (NSData *) generateLiveReport

Generate a live crash report, without triggering an actual crash condition.

This may be used to log current process state without actually crashing. The crash report data will be returned on success.

Returns
Returns nil if the crash report data could not be loaded.
- (NSData *) generateLiveReportAndReturnError: (NSError **)  outError

Generate a live crash report, without triggering an actual crash condition.

This may be used to log current process state without actually crashing. The crash report data will be returned on success.

Parameters
outErrorA pointer to an NSError object variable. If an error occurs, this pointer will contain an error object indicating why the pending crash report could not be loaded. If no error occurs, this parameter will be left unmodified. You may specify nil for this parameter, and no error information will be provided.
Returns
Returns nil if the crash report data could not be loaded.
- (NSData *) loadPendingCrashReportData

If an application has a pending crash report, this method returns the crash report data.

You may use this to submit the report to your own HTTP server, over e-mail, or even parse and introspect the report locally using the PLCrashReport API.

Returns
Returns nil if the crash report data could not be loaded.
- (NSData *) loadPendingCrashReportDataAndReturnError: (NSError **)  outError

If an application has a pending crash report, this method returns the crash report data.

You may use this to submit the report to your own HTTP server, over e-mail, or even parse and introspect the report locally using the PLCrashReport API.

Parameters
outErrorA pointer to an NSError object variable. If an error occurs, this pointer will contain an error object indicating why the pending crash report could not be loaded. If no error occurs, this parameter will be left unmodified. You may specify nil for this parameter, and no error information will be provided.
Returns
Returns nil if the crash report data could not be loaded.
- (BOOL) purgePendingCrashReport

Purge a pending crash report.

Returns
Returns YES on success, or NO on error.
- (BOOL) purgePendingCrashReportAndReturnError: (NSError **)  outError

Purge a pending crash report.

Returns
Returns YES on success, or NO on error.
- (void) setCrashCallbacks: (PLCrashReporterCallbacks *)  callbacks

Set the callbacks that will be executed by the receiver after a crash has occured and been recorded by PLCrashReporter.

Parameters
callbacksA pointer to an initialized PLCrashReporterCallbacks structure.
Note
This method must be called prior to enableCrashReporter or enableCrashReporterAndReturnError:
See Also
Async-Safe Programming Guide

The documentation for this class was generated from the following files: