Muvicado HD
Loading...
Searching...
No Matches
VVCrashReporter Class Reference

Simple class which automatically uploads crash logs and other relevant diagnostic information automatically made available by os x to a remote server. More...

#include <VVCrashReporter.h>

Inheritance diagram for VVCrashReporter:
Collaboration diagram for VVCrashReporter:

Instance Methods

(void) - check
 This is the main method- when you call 'check', the crash reporter looks for crash logs, gets a basic system profile, and collects anything your applications has dumped to the console log.
(void) - openCrashReporter
(IBAction) - replyButtonClicked:
(IBAction) - doneClicked:
(void) - sendACrashLog
(void) - closeCrashReporter
(NSString *) - _nibName
(NSString *) - _consoleLogString
(NSMutableDictionary *) - _systemProfilerDict
(NSString *) - _stringForSystemProfilerDataType:
(void) - updateCrashLogTimeout:
(void) - dlFinished:
(void) - setDeveloperEmail:
 Sets the developer email address; this is displayed if the user has a problem connecting to the internet/the server the crash reporter is supposed to be connecting to.
(NSString *) - developerEmail
(void) - setUploadURL:
 This is the URL of the php/cgi/etc. page which the crash data will be POSTed to.
(NSString *) - uploadURL

Protected Attributes

NSString * uploadURL
NSString * developerEmail
MutLockArraycrashLogArray
NSMutableDictionary * systemProfilerDict
NSString * consoleLog
int jobSize
int jobCurrentIndex
int currentCrashLogTimeout
NSTimer * currentCrashLogTimer
IBOutlet NSWindow * window
IBOutlet NSButton * replyButton
IBOutlet NSView * emailFieldHolder
IBOutlet NSTextField * emailField
IBOutlet NSTextView * descriptionField
IBOutlet NSTextField * submittingLabel
IBOutlet NSProgressIndicator * progressIndicator
IBOutlet NSTextField * countdownLabel
NSNib * theNib
NSArray * nibTopLevelObjects

Properties

id delegate
 The crash reporter's delegate is notified when the check has completed.

Detailed Description

Simple class which automatically uploads crash logs and other relevant diagnostic information automatically made available by os x to a remote server.

it's been my experience that most apps crash much more frequently on end-users than the app's developers would guess. the simplest and easiest way to improve the end-user's experience is to have the application check their machine for crash logs- which are generated automatically by os x whenever an application crashes- and send them to the developer.

this class exists so i have a really easy way to make my apps send their crash logs to me; the goal here is to make it as easy as possible to get all the information i need to troubleshoot a problem with as little work on the user's part as possible. it also sends a basic system profile, anything the app- and ONLY the app, not other apps- recently printed to the console log, and optional description/email fields to facilitate communication directly with the user. this data is then uploaded to a given URL using an HTTP POST.

on the server side, i use a PHP page which sanitizes the POST data (i can't stress how important this step is) and works with it. i've included a sample PHP page that simply dumps the received data to a file on disk (and optionally emails someone) with this project.

HOW TO USE THIS CLASS:

1)- create an instance of this class

2)- set the instance's delegate, uploadURL, and developerEmail.  these are necessary!

3)- call "check" on the instance.  when it's done, it calls "crashReporterCheckDone" on the 
    delegate.  that's it- you're done.

Definition at line 39 of file VVCrashReporter.h.

Method Documentation

◆ _consoleLogString

- (NSString *) _consoleLogString
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _nibName

- (NSString *) _nibName
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _stringForSystemProfilerDataType:

- (NSString *) _stringForSystemProfilerDataType: (NSString *) t

◆ _systemProfilerDict

- (NSMutableDictionary *) _systemProfilerDict
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check

- (void) check

This is the main method- when you call 'check', the crash reporter looks for crash logs, gets a basic system profile, and collects anything your applications has dumped to the console log.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closeCrashReporter

- (void) closeCrashReporter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ developerEmail

- (NSString *) developerEmail

◆ dlFinished:

- (void) dlFinished: (id) h

Reimplemented from <VVCURLDLDelegate>.

◆ doneClicked:

- (IBAction) doneClicked: (id) sender

◆ openCrashReporter

- (void) openCrashReporter
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replyButtonClicked:

- (IBAction) replyButtonClicked: (id) sender

◆ sendACrashLog

- (void) sendACrashLog
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDeveloperEmail:

- (void) setDeveloperEmail: (NSString *) n

Sets the developer email address; this is displayed if the user has a problem connecting to the internet/the server the crash reporter is supposed to be connecting to.

◆ setUploadURL:

- (void) setUploadURL: (NSString *) n

This is the URL of the php/cgi/etc. page which the crash data will be POSTed to.

◆ updateCrashLogTimeout:

- (void) updateCrashLogTimeout: (NSTimer *) t

◆ uploadURL

- (NSString *) uploadURL

Member Data Documentation

◆ consoleLog

- (NSString*) consoleLog
protected

Definition at line 45 of file VVCrashReporter.h.

◆ countdownLabel

- (IBOutlet NSTextField*) countdownLabel
protected

Definition at line 58 of file VVCrashReporter.h.

◆ crashLogArray

- (MutLockArray*) crashLogArray
protected

Definition at line 43 of file VVCrashReporter.h.

◆ currentCrashLogTimeout

- (int) currentCrashLogTimeout
protected

Definition at line 48 of file VVCrashReporter.h.

◆ currentCrashLogTimer

- (NSTimer*) currentCrashLogTimer
protected

Definition at line 49 of file VVCrashReporter.h.

◆ descriptionField

- (IBOutlet NSTextView*) descriptionField
protected

Definition at line 55 of file VVCrashReporter.h.

◆ developerEmail

- (NSString*) developerEmail
protected

Definition at line 41 of file VVCrashReporter.h.

◆ emailField

- (IBOutlet NSTextField*) emailField
protected

Definition at line 54 of file VVCrashReporter.h.

◆ emailFieldHolder

- (IBOutlet NSView*) emailFieldHolder
protected

Definition at line 53 of file VVCrashReporter.h.

◆ jobCurrentIndex

- (int) jobCurrentIndex
protected

Definition at line 47 of file VVCrashReporter.h.

◆ jobSize

- (int) jobSize
protected

Definition at line 46 of file VVCrashReporter.h.

◆ nibTopLevelObjects

- (NSArray*) nibTopLevelObjects
protected

Definition at line 61 of file VVCrashReporter.h.

◆ progressIndicator

- (IBOutlet NSProgressIndicator*) progressIndicator
protected

Definition at line 57 of file VVCrashReporter.h.

◆ replyButton

- (IBOutlet NSButton*) replyButton
protected

Definition at line 52 of file VVCrashReporter.h.

◆ submittingLabel

- (IBOutlet NSTextField*) submittingLabel
protected

Definition at line 56 of file VVCrashReporter.h.

◆ systemProfilerDict

- (NSMutableDictionary*) systemProfilerDict
protected

Definition at line 44 of file VVCrashReporter.h.

◆ theNib

- (NSNib*) theNib
protected

Definition at line 60 of file VVCrashReporter.h.

◆ uploadURL

- (NSString*) uploadURL
protected

Definition at line 40 of file VVCrashReporter.h.

◆ window

- (IBOutlet NSWindow*) window
protected

Definition at line 51 of file VVCrashReporter.h.

Property Documentation

◆ delegate

- (id) delegate
readwriteatomicassign

The crash reporter's delegate is notified when the check has completed.

Definition at line 42 of file VVCrashReporter.h.


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