1
当TestFlight崩溃时,我有一个我希望上传的带有崩溃报告的日志。当发生崩溃时,TestFlight TFLog不能上传
按照他们网站上的说明,我想出了这个解决方案,但它似乎没有发送我传递给TFLog的日志。不过,它报告的崩溃很好。
-(void)applicationDidFinishLaunching:(UIApplication *)application {
/*Setup crash handlers for TestFlight so we can send logs. */
NSSetUncaughtExceptionHandler(&testFlightHandleExceptions);
// create the signal action structure
struct sigaction newSignalAction;
// initialize the signal action structure
memset(&newSignalAction, 0, sizeof(newSignalAction));
// set SignalHandler as the handler in the signal action structure
newSignalAction.sa_handler = &testFlightSignalHandler;
// set SignalHandler as the handlers for SIGABRT, SIGILL and SIGBUS
sigaction(SIGABRT, &newSignalAction, NULL);
sigaction(SIGILL, &newSignalAction, NULL);
sigaction(SIGBUS, &newSignalAction, NULL);
[TestFlight takeOff:TESTFLIGHT_API_KEY];
}
void testFlightHandleExceptions(NSException *exception) {
[LogManager e: @"Sending crash to TestFlight" Tag:@"AppDelegate"];
TFLog(@"%@",[LogManager getLog]);
}
我在哪里出了错?还是有更好的方法呢?
啊开溜。我不想一直使用TFLog,因为我想要控制台上打印的内容。有没有另一种上传崩溃日志的方法?曲棍球有一个“crashReportDescription”委托,TestFlight有类似的东西吗? – Zammbi 2013-03-28 01:12:11
您可以将TFLog的打印关闭到控制台。这会有帮助吗? – jasongregori 2013-03-28 14:52:54
是的,这就是我所做的感谢:)也许TestFlight的一个领域将来会改进。 – Zammbi 2013-04-01 20:15:32