JXCrashHandler.h 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // JXCrashHandler.h
  3. // AICity
  4. //
  5. // Feature: 003-ios-api-https
  6. // 剧星平台崩溃处理器
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface JXCrashInfo : NSObject
  11. @property (nonatomic, assign) NSTimeInterval timestamp;
  12. @property (nonatomic, strong) NSString *exceptionName;
  13. @property (nonatomic, strong) NSString *exceptionReason;
  14. @property (nonatomic, strong) NSArray<NSString *> *callStack;
  15. @property (nonatomic, strong) NSDictionary *deviceInfo;
  16. @property (nonatomic, strong) NSDictionary *appInfo;
  17. @end
  18. @interface JXCrashHandler : NSObject
  19. + (instancetype)sharedHandler;
  20. - (void)installCrashHandler;
  21. - (void)uninstallCrashHandler;
  22. // 崩溃日志管理
  23. - (NSArray<NSString *> *)getLocalCrashLogs;
  24. - (void)cleanupOldCrashLogs:(NSTimeInterval)maxAge;
  25. // 手动上报崩溃信息
  26. - (void)reportCrashInfo:(JXCrashInfo *)crashInfo;
  27. @end
  28. NS_ASSUME_NONNULL_END