mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-24 20:20:51 +00:00
Add anonID to crash reports
CrashReporter Key is actually an anonymous ID for each device/installation where the crash occurred
This commit is contained in:
parent
2c4dc33f36
commit
f211182f49
@ -566,7 +566,8 @@ NSString *const kBITCrashManagerStatus = @"BITCrashManagerStatus";
|
||||
if ([report respondsToSelector:@selector(reportInfo)]) {
|
||||
crashUUID = report.reportInfo.reportGUID ?: @"";
|
||||
}
|
||||
NSString *crashLogString = [BITCrashReportTextFormatter stringValueForCrashReport:report];
|
||||
NSString *installString = bit_appAnonID() ?: @"";
|
||||
NSString *crashLogString = [BITCrashReportTextFormatter stringValueForCrashReport:report crashReporterKey:installString];
|
||||
|
||||
if ([report.applicationInfo.applicationVersion compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] == NSOrderedSame) {
|
||||
_crashIdenticalCurrentVersion = YES;
|
||||
@ -581,7 +582,6 @@ NSString *const kBITCrashManagerStatus = @"BITCrashManagerStatus";
|
||||
NSString *userid = @"";
|
||||
NSString *applicationLog = @"";
|
||||
NSString *description = @"";
|
||||
NSString *installString = bit_appAnonID() ?: @"";
|
||||
|
||||
NSString *errorString = nil;
|
||||
NSPropertyListFormat format;
|
||||
|
@ -47,7 +47,7 @@
|
||||
@interface BITCrashReportTextFormatter : NSObject {
|
||||
}
|
||||
|
||||
+ (NSString *)stringValueForCrashReport:(PLCrashReport *)report;
|
||||
+ (NSString *)stringValueForCrashReport:(PLCrashReport *)report crashReporterKey:(NSString *)crashReporterKey;
|
||||
+ (NSArray *)arrayOfAppUUIDsForCrashReport:(PLCrashReport *)report;
|
||||
|
||||
@end
|
||||
|
@ -76,7 +76,7 @@ static NSInteger binaryImageSort(id binary1, id binary2, void *context) {
|
||||
*
|
||||
* @return Returns the formatted result on success, or nil if an error occurs.
|
||||
*/
|
||||
+ (NSString *)stringValueForCrashReport:(PLCrashReport *)report {
|
||||
+ (NSString *)stringValueForCrashReport:(PLCrashReport *)report crashReporterKey:(NSString *)crashReporterKey {
|
||||
NSMutableString* text = [NSMutableString string];
|
||||
boolean_t lp64 = true; // quiesce GCC uninitialized value warning
|
||||
|
||||
@ -178,13 +178,17 @@ static NSInteger binaryImageSort(id binary1, id binary2, void *context) {
|
||||
if (report.hasReportInfo && report.reportInfo.reportGUID != nil)
|
||||
reportGUID = report.reportInfo.reportGUID;
|
||||
}
|
||||
|
||||
|
||||
NSString *reporterKey = @"[TODO]";
|
||||
if (crashReporterKey)
|
||||
reporterKey = crashReporterKey;
|
||||
|
||||
NSString *hardwareModel = @"???";
|
||||
if (report.hasMachineInfo && report.machineInfo.modelName != nil)
|
||||
hardwareModel = report.machineInfo.modelName;
|
||||
|
||||
[text appendFormat: @"Incident Identifier: %@\n", reportGUID];
|
||||
[text appendFormat: @"CrashReporter Key: [TODO]\n"];
|
||||
[text appendFormat: @"CrashReporter Key: %@\n", reporterKey];
|
||||
[text appendFormat: @"Hardware Model: %@\n", hardwareModel];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user