Skip to content

Commit

Permalink
Xcode 4,
Browse files Browse the repository at this point in the history
documentation cleanup,
  • Loading branch information
tcurdt committed Jul 1, 2011
1 parent 5788fee commit c263810
Show file tree
Hide file tree
Showing 9 changed files with 349 additions and 236 deletions.
2 changes: 1 addition & 1 deletion DIST.txt
@@ -1,6 +1,6 @@
LICENSE.txt
HISTORY.md
README.txt
README.md
Server/*
Sources/*
Resources/*
Expand Down
87 changes: 87 additions & 0 deletions Documentation/Integration.md
@@ -0,0 +1,87 @@
### Integration into your projects

## Call out into the framework

Once you got the framework embedded into you application the actual
integration is really easy. Just include the header file and a few class
methods become available.

[[FRFeedbackReporter sharedReporter] reportFeedback];
[[FRFeedbackReporter sharedReporter] reportIfCrash];


Method `reportIfCash` should preferably be called just after your application
has started. A good place is `applicationDidFinishLaunching` of the
application controller. It checks whether there has been a crash or hang
report since the last run. If so, it presents the user the feedback dialog. If
there wasn't it moves on quietly.

Method `reportFeedback` is usually called from a "Feedback" menu item in your
"Help" menu. This way users can send feedback at any time using the same
mechanism.

You can set a delegate and...

...
[[FRFeedbackReporter sharedReporter] setDelegate:self];
}

pass in arbitrary data on the submission e.g. like license information,

- (NSDictionary*) customParametersForFeedbackReport
{
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
...
return dict;
}

there is a hook to anonymize the preference information

- (NSMutableDictionary*) anonymizePreferencesForFeedbackReport:(NSMutableDictionary *)preferences
{
...
return preferences;
}

and you can change/set the target for the feedback report

- (NSString *) targetUrlForFeedbackReport
{
return "http://somewhere.com/"
}

## Catch uncaught exceptions

FeedbackReporter can also catch uncaught exceptions and pop up whenever they
happen. All you have to do is to specify a new principal class in the
project's `Info.plist`.

<key>Principal class</key>
<string>FRExceptionReportingApplication</string>

## Specify the target in your projects Info.plist

The framework needs to know where to post the information to. The target needs
to be specified in the application's `Info.plist`. Note: the %@ will get
expanded to your application's name. If you don't want this URL to be
guessable it can also be hard coded to whatever you like. The `project`
parameter must just match the directory on the server.

<key>FRFeedbackReporter.targetURL</key>
<string>http://yourdomain.com/feedback/submit.php?project=%@</string>

## Gather custom information from a shell script

In case your application needs more details from the user's system than what
is provided by the FeedbackReporter framework you can include a shell script
called `FRFeedbackReporter.sh` into your application bundle. It will be called
whenever the feedback dialog comes up and the stdout and stderr output gets
included in the `shell` pane.

#!/bin/sh
ls -la ~/Library/Something

Please check the [documentation][1] for more how to receive the data on the
server.

[1]: http://github.com/tcurdt/feedbackreporter/Documentation/Server.md
22 changes: 22 additions & 0 deletions Documentation/Server.md
@@ -0,0 +1,22 @@
## Receiving the information on the server

The framework is using a standard multi-part post request to upload the data
to the web server. It uses the target URL that is specified in the
`Info.plist`. Once on the server you can easily inject them into your bug
tracking/ticketing system or just zip them up and send them to you via email.

There are couple -mostly contributed- scripts that can receive the reports on
the server side.

* a PHP script that sends you an email
* a PHP script that just writes the data to disk and let's cron send the email
* a PHP script that directly creates an issue in [Mantis][1]
* a node.js app that stores the reports to disk as json and (optinally) sends a notification via [prowl][2]

...of course you can easily write your own backend. In the end it's just the
same as receiving a form POST submission.

Please check the various scripts/backends for how to configure them.

[1]: http://www.mantisbt.org/
[2]: http://www.prowlapp.com/
32 changes: 14 additions & 18 deletions FeedbackReporter.xcodeproj/project.pbxproj
Expand Up @@ -541,11 +541,12 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Sources/Main/FeedbackReporter.pch;
GCC_VERSION = "";
INFOPLIST_FILE = Sources/Main/Info.plist;
INSTALL_PATH = "@loader_path/../Frameworks";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = FeedbackReporter;
SDKROOT = macosx10.5;
SDKROOT = macosx;
WRAPPER_EXTENSION = framework;
};
name = Debug;
Expand All @@ -561,11 +562,12 @@
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Sources/Main/FeedbackReporter.pch;
GCC_VERSION = "";
INFOPLIST_FILE = Sources/Main/Info.plist;
INSTALL_PATH = "@loader_path/../Frameworks";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = FeedbackReporter;
SDKROOT = macosx10.5;
SDKROOT = macosx;
WRAPPER_EXTENSION = framework;
};
name = Release;
Expand All @@ -574,17 +576,14 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = (
i386,
ppc,
);
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_ENABLE_OBJC_GC = supported;
GCC_ENABLE_SYMBOL_SEPARATION = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Sources/Main/FeedbackReporter.pch;
GCC_VERSION = 4.0;
GCC_VERSION = com.apple.compilers.llvmgcc42;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
Expand All @@ -604,28 +603,25 @@
GCC_WARN_UNUSED_PARAMETER = NO;
GCC_WARN_UNUSED_VALUE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.4;
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
SDKROOT = macosx10.5;
SDKROOT = macosx;
};
name = Debug;
};
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = (
i386,
ppc,
);
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_ENABLE_OBJC_GC = supported;
GCC_ENABLE_SYMBOL_SEPARATION = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Sources/Main/FeedbackReporter.pch;
GCC_VERSION = 4.0;
GCC_VERSION = com.apple.compilers.llvmgcc42;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
Expand All @@ -646,11 +642,11 @@
GCC_WARN_UNUSED_PARAMETER = NO;
GCC_WARN_UNUSED_VALUE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.4;
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
SDKROOT = macosx10.5;
SDKROOT = macosx;
};
name = Release;
};
Expand Down Expand Up @@ -680,7 +676,7 @@
);
PREBINDING = NO;
PRODUCT_NAME = Tests;
SDKROOT = macosx10.5;
SDKROOT = macosx;
WRAPPER_EXTENSION = octest;
};
name = Debug;
Expand Down Expand Up @@ -709,7 +705,7 @@
);
PREBINDING = NO;
PRODUCT_NAME = Tests;
SDKROOT = macosx10.5;
SDKROOT = macosx;
WRAPPER_EXTENSION = octest;
ZERO_LINK = NO;
};
Expand Down
1 change: 1 addition & 0 deletions HISTORY.md
Expand Up @@ -5,6 +5,7 @@
* [FIX] PLIST_KEY_LOGHOURS should come from the info plist. Thanks to Rico.
* [CHG] Link against Foundation and 10.4 compatibility. Thanks to Linas Valiukas.


## Version 1.3.0, released 18.06.2010

New localizations. New options. Many little fixes. Better CPU detection.
Expand Down
32 changes: 32 additions & 0 deletions README.md
@@ -0,0 +1,32 @@
When writing desktop applications you are dealing with a huge amount of
different installations. Tracking down a bug requires to get detailed
information on what happened on the user's computer. But most likely you don't
want to bother the users with how to make this information available to you.

I wasn't really satisfied with the frameworks available so I came up with one
that suits my needs. Hopefully it will also suit yours.

For information on how to integrate the FeedbackReporter Framework please see
the [screencast][1] and the [documentation][1].

Suggestions, bug reports and fixes are much welcome. The source code is
available through git at

git clone git://github.com/tcurdt/feedbackreporter.git

or via [web interface][3]

Enjoy!


Credits:

* Fraser Speirs, Multipart/Form construction, BSD License
* Jens Alfke, Exception handling and callstack, BSD License
* Torsten Curdt, initial codebase, ASL2.0 License

any more contributors sending patches. Thanks!

[1]: http://vafer.org/project/feedbackreporter/screencasts/Integrating%20with%20FeedbackReporter.mov
[2]: http://github.com/tcurdt/feedbackreporter/Documentation/Integration.md
[3]: http://github.com/tcurdt/feedbackreporter/tree/master
22 changes: 0 additions & 22 deletions README.txt

This file was deleted.

0 comments on commit c263810

Please sign in to comment.