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
/**
* UUID for the crash report
*/
@property (nonatomic, readonly, strong) NSString *incidentIdentifier;
/**
* UUID for the app installation on the device
*/
@property (nonatomic, readonly, strong) NSString *reporterKey;
/**
* Signal that caused the crash
*/
@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;
/**
* Exception reason, nil if the crash was not caused by an exception
*/
@property (nonatomic, readonly, strong) NSString *exceptionReason;
/**
* Date and time the app started, nil if unknown
*/
@property (nonatomic, readonly, strong) NSDate *appStartTime;
/**
* Date and time the crash occured, nil if unknown
*/
@property (nonatomic, readonly, strong) NSDate *crashTime;
/**
* CFBundleVersion value of the app that crashed
*/
@property (nonatomic, readonly, strong) NSString *appBuild;
- (instancetype)initWithIncidentIdentifier:(NSString *)incidentIdentifier
reporterKey:(NSString *)reporterKey
signal:(NSString *)signal
exceptionName:(NSString *)exceptionName
exceptionReason:(NSString *)exceptionReason
appStartTime:(NSDate *)appStartTime
crashTime:(NSDate *)crashTime;
crashTime:(NSDate *)crashTime
appBuild:(NSString *)appBuild;
@end

View File

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

View File

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