Skip to content
Browse files

moved some files back into place :: misc cleanup :: added some docume…

…ntation for the crash reporter
  • Loading branch information...
1 parent f4ca9dd commit d37a617b80af1e9a712c91c58f5fee5b640a0795 raycutler committed Jan 13, 2010
View
0 MutNRLockDict.h → VVBasics/src/MutNRLockDict.h
File renamed without changes.
View
0 MutNRLockDict.m → VVBasics/src/MutNRLockDict.m
File renamed without changes.
View
3 VVBasics/src/NamedMutLockArray.h
@@ -21,6 +21,9 @@
NSString *name;
}
++ (id) arrayWithCapacity:(int)c;
++ (id) create;
+
- (NSComparisonResult) nameCompare:(NamedMutLockArray *)comp;
@property (assign, readwrite) NSString *name;
View
14 VVBasics/src/NamedMutLockArray.m
@@ -7,6 +7,20 @@
@implementation NamedMutLockArray
++ (id) arrayWithCapacity:(int)c {
+ NamedMutLockArray *returnMe = [[NamedMutLockArray alloc] initWithCapacity:c];
+ if (returnMe == nil)
+ return nil;
+ return [returnMe autorelease];
+}
++ (id) create {
+ NamedMutLockArray *returnMe = [[NamedMutLockArray alloc] initWithCapacity:0];
+ if (returnMe == nil)
+ return nil;
+ return [returnMe autorelease];
+}
+
+
- (NSString *) description {
return [NSString stringWithFormat:@"<NamedMutLockArray: %@, %@>",name,array];
}
View
2 VVBasics/src/VVCURLDL.h
@@ -4,7 +4,7 @@
basic http transfer ops
basically, this class exists because at this time NSURLConnection is problematic and
- top-heavy, and i wanted a small, quick, and effective interface for handling the extremely
+ top-heavy, and i wanted an easy, effective, and reliable interface for handling the extremely
limited set of http data transfer operations required by my frameworks/apps.
this class was meant to be used as a one-shot throwaway; that is, you're meant to create an
View
52 VVBasics/src/VVCrashReporter.h
@@ -1,30 +1,3 @@
-/*
- 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 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 and uploadURL. these are necessary!
-
- 3)- call "check" on the instance. when it's done, it calls "crashReporterCheckDone" on the
- delegate.
-*/
-
#import <Cocoa/Cocoa.h>
#import <SystemConfiguration/SCNetwork.h>
@@ -35,12 +8,33 @@
+/// The crash reporter's delegate must adhere to this protocol
+/*!
+ This protocol exists largely because it's conceivable that objects will want to know when the crash reporter- which uploads asynchronously- has finished sending its data to the remote server.
+*/
@protocol VVCrashReporterDelegate
- (void) crashReporterCheckDone;
@end
+/// 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 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.
+*/
@interface VVCrashReporter : NSObject <VVCURLDLDelegate> {
NSString *uploadURL; // does NOT includes http://
@@ -65,6 +59,7 @@
NSArray *nibTopLevelObjects;
}
+/// 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) check;
- (void) openCrashReporter;
- (IBAction) doneClicked:(id)sender;
@@ -81,11 +76,14 @@
// VVCURLDLDelegate method- this class will be the delegate of multiple VVCURLDL instances
- (void) dlFinished:(id)h;
+/// 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
- (void) setDeveloperEmail:(NSString *)n;
- (NSString *) developerEmail;
+/// This is the URL of the php/cgi/etc. page which the crash data will be POSTed to
- (void) setUploadURL:(NSString *)n;
- (NSString *) uploadURL;
+/// The crash reporter's delegate is notified when the check has completed
@property (assign,readwrite) id delegate;
@end
View
4 VVOpenSource.xcodeproj/project.pbxproj
@@ -548,8 +548,8 @@
/* Begin PBXFileReference section */
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
32DBCF5E0370ADEE00C91783 /* VVOpenSource_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VVOpenSource_Prefix.pch; sourceTree = "<group>"; };
- 5107014010E14BF200A67653 /* MutNRLockDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutNRLockDict.h; sourceTree = "<group>"; };
- 5107014110E14BF200A67653 /* MutNRLockDict.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MutNRLockDict.m; sourceTree = "<group>"; };
+ 5107014010E14BF200A67653 /* MutNRLockDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MutNRLockDict.h; path = VVBasics/src/MutNRLockDict.h; sourceTree = "<group>"; };
+ 5107014110E14BF200A67653 /* MutNRLockDict.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MutNRLockDict.m; path = VVBasics/src/MutNRLockDict.m; sourceTree = "<group>"; };
96017707108D71D6008F90CA /* VVCrashReporterEmailField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VVCrashReporterEmailField.h; path = VVBasics/src/VVCrashReporterEmailField.h; sourceTree = "<group>"; };
96017708108D71D6008F90CA /* VVCrashReporterEmailField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VVCrashReporterEmailField.m; path = VVBasics/src/VVCrashReporterEmailField.m; sourceTree = "<group>"; };
9601770B108D71EA008F90CA /* VVCrashReporterDescriptionField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VVCrashReporterDescriptionField.h; path = VVBasics/src/VVCrashReporterDescriptionField.h; sourceTree = "<group>"; };

0 comments on commit d37a617

Please sign in to comment.
Something went wrong with that request. Please try again.