diff --git a/Classes/BITCrashManager.h b/Classes/BITCrashManager.h index 64f695d60f..bf651da527 100644 --- a/Classes/BITCrashManager.h +++ b/Classes/BITCrashManager.h @@ -166,6 +166,20 @@ typedef NS_ENUM(NSUInteger, BITCrashManagerStatus) { @property (nonatomic, assign, getter=isMachExceptionHandlerEnabled) BOOL enableMachExceptionHandler; +/** + * Enable on device symbolication for system symbols + * + * By default, the SDK does not symbolicate on the device, since this can + * take a few seconds at each crash. Also note that symbolication on the + * device might not be able to retrieve all symbols. + * + * Enable if you want to analyze crashes on unreleased OS versions. + * + * Default: _NO_ + */ +@property (nonatomic, assign, getter=isOnDeviceSymbolicationEnabled) BOOL enableOnDeviceSymbolication; + + /** * Set the callbacks that will be executed prior to program termination after a crash has occurred * diff --git a/Classes/BITCrashManager.m b/Classes/BITCrashManager.m index 17e079f6e6..fca13fc4bf 100644 --- a/Classes/BITCrashManager.m +++ b/Classes/BITCrashManager.m @@ -660,8 +660,14 @@ NSString *const kBITCrashManagerStatus = @"BITCrashManagerStatus"; if (self.isMachExceptionHandlerEnabled) { signalHandlerType = PLCrashReporterSignalHandlerTypeMach; } + + PLCrashReporterSymbolicationStrategy symbolicationStrategy = PLCrashReporterSymbolicationStrategyNone; + if (self.isOnDeviceSymbolicationEnabled) { + symbolicationStrategy = PLCrashReporterSymbolicationStrategyAll; + } + BITPLCrashReporterConfig *config = [[BITPLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType - symbolicationStrategy: PLCrashReporterSymbolicationStrategyAll]; + symbolicationStrategy: symbolicationStrategy]; self.plCrashReporter = [[BITPLCrashReporter alloc] initWithConfiguration: config]; // Check if we previously crashed