Add app build property to BITCrashDetails

This commit is contained in:
Andreas Linde 2014-05-01 16:57:28 +02:00
parent db45c6654a
commit 2155f5f93b
3 changed files with 33 additions and 2 deletions

View File

@ -10,26 +10,53 @@
@interface BITCrashDetails : NSObject @interface BITCrashDetails : NSObject
/**
* UUID for the crash report
*/
@property (nonatomic, readonly, strong) NSString *incidentIdentifier; @property (nonatomic, readonly, strong) NSString *incidentIdentifier;
/**
* UUID for the app installation on the device
*/
@property (nonatomic, readonly, strong) NSString *reporterKey; @property (nonatomic, readonly, strong) NSString *reporterKey;
/**
* Signal that caused the crash
*/
@property (nonatomic, readonly, strong) NSString *signal; @property (nonatomic, readonly, strong) NSString *signal;
/**
* Exception name that triggered the crash, nil if the crash was not caused by an exception
*/
@property (nonatomic, readonly, strong) NSString *exceptionName; @property (nonatomic, readonly, strong) NSString *exceptionName;
/**
* Exception reason, nil if the crash was not caused by an exception
*/
@property (nonatomic, readonly, strong) NSString *exceptionReason; @property (nonatomic, readonly, strong) NSString *exceptionReason;
/**
* Date and time the app started, nil if unknown
*/
@property (nonatomic, readonly, strong) NSDate *appStartTime; @property (nonatomic, readonly, strong) NSDate *appStartTime;
/**
* Date and time the crash occured, nil if unknown
*/
@property (nonatomic, readonly, strong) NSDate *crashTime; @property (nonatomic, readonly, strong) NSDate *crashTime;
/**
* CFBundleVersion value of the app that crashed
*/
@property (nonatomic, readonly, strong) NSString *appBuild;
- (instancetype)initWithIncidentIdentifier:(NSString *)incidentIdentifier - (instancetype)initWithIncidentIdentifier:(NSString *)incidentIdentifier
reporterKey:(NSString *)reporterKey reporterKey:(NSString *)reporterKey
signal:(NSString *)signal signal:(NSString *)signal
exceptionName:(NSString *)exceptionName exceptionName:(NSString *)exceptionName
exceptionReason:(NSString *)exceptionReason exceptionReason:(NSString *)exceptionReason
appStartTime:(NSDate *)appStartTime appStartTime:(NSDate *)appStartTime
crashTime:(NSDate *)crashTime; crashTime:(NSDate *)crashTime
appBuild:(NSString *)appBuild;
@end @end

View File

@ -16,7 +16,8 @@
exceptionName:(NSString *)exceptionName exceptionName:(NSString *)exceptionName
exceptionReason:(NSString *)exceptionReason exceptionReason:(NSString *)exceptionReason
appStartTime:(NSDate *)appStartTime appStartTime:(NSDate *)appStartTime
crashTime:(NSDate *)crashTime; crashTime:(NSDate *)crashTime
appBuild:(NSString *)appBuild
{ {
if ((self = [super init])) { if ((self = [super init])) {
_incidentIdentifier = incidentIdentifier; _incidentIdentifier = incidentIdentifier;
@ -26,6 +27,7 @@
_exceptionReason = exceptionReason; _exceptionReason = exceptionReason;
_appStartTime = appStartTime; _appStartTime = appStartTime;
_crashTime = crashTime; _crashTime = crashTime;
_appBuild = appBuild;
} }
return self; return self;
} }

View File

@ -788,6 +788,7 @@ static PLCrashReporterCallbacks plCrashCallbacks = {
exceptionReason:report.exceptionInfo.exceptionReason exceptionReason:report.exceptionInfo.exceptionReason
appStartTime:appStartTime appStartTime:appStartTime
crashTime:appCrashTime crashTime:appCrashTime
appBuild:report.applicationInfo.applicationVersion
]; ];
} }
} }
@ -1135,6 +1136,7 @@ static PLCrashReporterCallbacks plCrashCallbacks = {
exceptionReason:nil exceptionReason:nil
appStartTime:nil appStartTime:nil
crashTime:nil crashTime:nil
appBuild:fakeReportAppVersion
]; ];
NSData *plist = [NSPropertyListSerialization dataFromPropertyList:(id)rootObj NSData *plist = [NSPropertyListSerialization dataFromPropertyList:(id)rootObj