dbukowski/DBDebugToolkit

keyWindow should be used from main thread only

Closed this issue · 1 comments

- (void)saveCrashReportWithName:(NSString *)name
                         reason:(NSString *)reason
                       userInfo:(NSDictionary *)userInfo
               callStackSymbols:(NSArray<NSString *> *)callStackSymbols {
    NSDate *date = [NSDate date];
    NSString *consoleOutput = self.consoleOutputCaptor.consoleOutput;
    UIImage *screenshot = [[UIApplication sharedApplication].keyWindow snapshot];
-[UIApplication keyWindow] must be used from main thread only

This is sometimes called on a thread that isn't main and prevents crash reports from being saved.

Thanks for reporting that. It's fixed in the new release: v. 0.3.1!