从App中发送崩溃报告

时间:2010-08-05 17:25:56

标签: iphone reporting-services crash

FourSquare iPhone应用程序似乎已经这样做了:http://screencast.com/t/NjRkNmIwNWQ

这是如何实现的?这个SO question指出了CrashReporter.framework,但这不是苹果公司在App Store中不允许的那种第三方框架吗?

3 个答案:

答案 0 :(得分:4)

只是从您提供的代码段中猜测,但他们可能正在使用Plausible Labs'Crash Reporter(因为他们的崩溃日志是.plcrash文件)。

答案 1 :(得分:3)

在我发布这个问题几分钟后,该框架的作者在Twitter上回答了我:

  

在   PLCrashReporter.framework只显示   像一个,但不是。相当多的应用程序   正在使用它没有问题。 4Square   也在使用PLCrashReporter   框架,但发出报告   通过电子邮件。所以没有自动分组   服务器

答案 2 :(得分:1)

一种简单的方法是向NSUserDefault实例添加一个布尔标志:

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

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

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

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

然后,您可以在发布时检查此密钥,以查看最后一个实例是否正确关闭并采取相应措施。

相关问题