开发者

Send Crash Reports from within App

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

How is this achieve开发者_Python百科d? 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?


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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜