forked from Countly/countly-sdk-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CountlyCrashReporter.h
33 lines (28 loc) · 1.25 KB
/
CountlyCrashReporter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// CountlyCrashReporter.h
//
// This code is provided under the MIT License.
//
// Please visit www.count.ly for more information.
#import <Foundation/Foundation.h>
@interface CountlyCrashReporter : NSObject
@property (nonatomic) BOOL isEnabledOnInitialConfig;
@property (nonatomic) NSDictionary<NSString *, NSString *>* crashSegmentation;
@property (nonatomic) NSUInteger crashLogLimit;
@property (nonatomic) NSRegularExpression* crashFilter;
@property (nonatomic) BOOL shouldUsePLCrashReporter;
@property (nonatomic) BOOL shouldUseMachSignalHandler;
@property (nonatomic, copy) void (^crashOccuredOnPreviousSessionCallback)(NSDictionary * crashReport);
@property (nonatomic, copy) BOOL (^shouldSendCrashReportCallback)(NSDictionary * crashReport);
+ (instancetype)sharedInstance;
- (void)startCrashReporting;
- (void)stopCrashReporting;
- (void)recordException:(NSException *)exception withStackTrace:(NSArray *)stackTrace isFatal:(BOOL)isFatal;
- (void)log:(NSString *)log;
- (void)clearCrashLogs;
@end
#if (TARGET_OS_OSX)
#import <Cocoa/Cocoa.h>
//NOTE: Due to some macOS innerworkings limitations, NSPrincipalClass in the app's Info.plist file needs to be set as CLYExceptionHandlingApplication.
@interface CLYExceptionHandlingApplication : NSApplication
@end
#endif