From ef82814471729f4e8f3ffb2f242be6eb78d03e38 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Mon, 3 Nov 2014 15:45:37 +0100 Subject: [PATCH] Improve app binary detection in crash reports - Fix iOS 8 issue with not remove part of a path when using `stringByStandardizingPath` (removed leading `/private`) - Exclude iOS swift libraries from being detect as app specific --- Classes/BITCrashReportTextFormatter.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Classes/BITCrashReportTextFormatter.m b/Classes/BITCrashReportTextFormatter.m index 01c9ea6842..a4956aa560 100644 --- a/Classes/BITCrashReportTextFormatter.m +++ b/Classes/BITCrashReportTextFormatter.m @@ -539,8 +539,13 @@ static const char *findSEL (const char *imageName, NSString *imageUUID, uint64_t NSString *imagePath = [imageInfo.imageName stringByStandardizingPath]; NSString *appBundleContentsPath = [[report.processInfo.processPath stringByDeletingLastPathComponent] stringByDeletingLastPathComponent]; - if ([imagePath isEqual: report.processInfo.processPath] || [imagePath hasPrefix:appBundleContentsPath]) - binaryDesignator = @"+"; + // exclude iOS swift dylibs + if (![imageInfo.imageName containsString:@".app/Frameworks/libswift"]) { + if ([imagePath isEqual: report.processInfo.processPath] || + [imagePath hasPrefix:appBundleContentsPath] || + [imageInfo.imageName hasPrefix:appBundleContentsPath]) // Fix issue with iOS 8 `stringByStandardizingPath` removing leading `/private` path (when not running in the debugger only) + binaryDesignator = @"+"; + } /* base_address - terminating_address [designator]file_name arch file_path */ NSString *fmt = nil;