app center;增加發送ping的秒

This commit is contained in:
Caiyanpeng committed 2021-11-12 16:21:13 +08:00
1 parent 1bd1ffdb5a
commit d754ff3b15
719 files changed
+34172 -2875

No files matched your search

@@ -0,0 +1,72 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#import "../Core/Utility/NSStringHelper.h"
#import "ErrorReport.h"
#import <AppCenterCrashes/AppCenterCrashes.h>
const char* app_center_unity_crashes_error_report_incident_identifier(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
return appcenter_unity_ns_string_to_cstr([report incidentIdentifier]);
}
const char* app_center_unity_crashes_error_report_reporter_key(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
return appcenter_unity_ns_string_to_cstr([report reporterKey]);
}
const char* app_center_unity_crashes_error_report_signal(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
return appcenter_unity_ns_string_to_cstr([report signal]);
}
const char* app_center_unity_crashes_error_report_exception_name(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
return appcenter_unity_ns_string_to_cstr([report exceptionName]);
}
const char* app_center_unity_crashes_error_report_exception_reason(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
return appcenter_unity_ns_string_to_cstr([report exceptionReason]);
}
const char* app_center_unity_crashes_error_report_app_start_time(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss ZZZZZ"];
NSString *dateStr = [dateFormatter stringFromDate:report.appStartTime];
return appcenter_unity_ns_string_to_cstr(dateStr);
}
const char* app_center_unity_crashes_error_report_app_error_time(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss ZZZZZ"];
NSString *dateStr = [dateFormatter stringFromDate:report.appErrorTime];
return appcenter_unity_ns_string_to_cstr(dateStr);
}
extern "C" void* app_center_unity_crashes_error_report_device(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
return (__bridge void*)[report device];
}
extern "C" unsigned int app_center_unity_crashes_error_report_app_process_identifier(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
return [report appProcessIdentifier];
}
extern "C" bool app_center_unity_crashes_error_report_is_app_kill(void* errorReport)
{
MSACErrorReport *report = (__bridge MSACErrorReport*)errorReport;
return [report isAppKill];
}