views:

96

answers:

3

The FourSquare iPhone app seems to be doing it already: http://screencast.com/t/NjRkNmIwNWQ

How is this achieved? This SO question pointed out CrashReporter.framework, but isn't this the kind of 3rd party framework Apple doesn't allow in the App Store?

+1  A: 

Just guessing from the snippet you provided, but they may be using Plausible Labs' Crash Reporter (since their crashlog is a .plcrash file).

Ben Gottlieb
Good call, indeed they are. (see my answer below)
Sam V
+1  A: 

One easy way to find out is to add a Boolean flag to your NSUserDefault instance:

In - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

[[NSUserDefault standardUserDefaults] setBool:FALSE forKey:@"FinishedSafely"];

In - (void)applicationWillTerminate:(UIApplication *)application

[[NSUserDefault standardUserDefaults] setBool:TRUE forKey:@"FinishedSafely"];

You can then check against this key at launch time to see if the last instance was close properly and act accordingly.

Pier-Olivier Thibault
This only tells whether the app closed nicely or not. What I want to do is send the crash report my way on next launch.
Sam V
Sorry read the question a bit fast. I know three20 had some support for crash report althought those are good when you build with symbols (debug) but are quite useless for application build for production.
Pier-Olivier Thibault
A: 

The author of the framework answered me on twitter a few minutes after I posted this question:

The PLCrashReporter.framework only looks like one, but isn't. Quite a few apps are using it without issues. 4Square is using also PLCrashReporter framework, but sends out the reports via email. So no automatic grouping on server.

Sam V