[MetricKit] Added support for Xcode 14 beta 1 & 3 (#15629)

Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
This commit is contained in:
Israel Soto 2022-08-26 17:25:46 -05:00 коммит произвёл GitHub
Родитель 4b63786dac
Коммит 76e395bcfb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 61 добавлений и 18 удалений

27
src/MetricKit/MXEnums.cs Normal file
Просмотреть файл

@ -0,0 +1,27 @@
//
// MetricKit enumerations
//
// Copyright 2022 Microsoft Inc.
//
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using CoreFoundation;
using Foundation;
using ObjCRuntime;
namespace MetricKit {
[NoMac, iOS (16,0), MacCatalyst (16,0), NoWatch, NoTV]
[ErrorDomain ("MXErrorDomain")]
[Native]
public enum MXErrorCode : long
{
InvalidId,
MaxCount,
PastDeadline,
Duplicated,
Unknown,
InternalFailure,
}
}

Просмотреть файл

@ -1202,6 +1202,9 @@ METALPERFORMANCESHADERSGRAPH_SOURCES = \
# MetricKit
METRICKIT_API_SOURCES = \
MetricKit/MXEnums.cs \
METRICKIT_SOURCES = \
MetricKit/MXMetaData.cs \
MetricKit/MXMetric.cs \

Просмотреть файл

@ -229,6 +229,10 @@ namespace MetricKit {
[NoWatch, NoTV, NoMac, iOS (15,2), MacCatalyst (15,2)]
[Export ("histogrammedOptimizedTimeToFirstDraw", ArgumentSemantic.Strong)]
MXHistogram<NSUnitDuration> HistogrammedOptimizedTimeToFirstDraw { get; }
[NoMac, iOS (16,0), MacCatalyst (16,0), NoWatch, NoTV]
[Export ("histogrammedExtendedLaunch", ArgumentSemantic.Strong)]
MXHistogram<NSUnitDuration> HistogrammedExtendedLaunch { get; }
}
[NoWatch, NoTV, NoMac, iOS (13,0)]
@ -422,6 +426,16 @@ namespace MetricKit {
[Internal]
[Export ("makeLogHandleWithCategory:")]
IntPtr /* os_log_t */ _MakeLogHandle (NSString category);
[NoMac, iOS (16,0), MacCatalyst (16,0), NoWatch, NoTV]
[Static]
[Export ("extendLaunchMeasurementForTaskID:error:")]
bool ExtendLaunchMeasurement (string taskId, [NullAllowed] out NSError error);
[NoMac, iOS (16,0), MacCatalyst (16,0), NoWatch, NoTV]
[Static]
[Export ("finishExtendedLaunchMeasurementForTaskID:error:")]
bool FinishExtendedLaunchMeasurement (string taskId, [NullAllowed] out NSError error);
}
interface IMXMetricManagerSubscriber { }
@ -610,6 +624,19 @@ namespace MetricKit {
NSDictionary DictionaryRepresentation { get; }
}
// @interface MXAppLaunchDiagnostic : MXDiagnostic
[NoMac, iOS (16,0), Mac (16,0), NoWatch, NoTV]
[BaseType (typeof (MXDiagnostic))]
[DisableDefaultCtor]
interface MXAppLaunchDiagnostic
{
[Export ("callStackTree", ArgumentSemantic.Strong)]
MXCallStackTree CallStackTree { get; }
[Export ("launchDuration", ArgumentSemantic.Strong)]
NSMeasurement<NSUnitDuration> LaunchDuration { get; }
}
[NoWatch, NoTV, Mac (12,0)]
[iOS (14,0)]
[MacCatalyst (14,0)]
@ -626,6 +653,10 @@ namespace MetricKit {
[NullAllowed, Export ("hangDiagnostics", ArgumentSemantic.Strong)]
MXHangDiagnostic[] HangDiagnostics { get; }
[NoMac, iOS (16,0), MacCatalyst (16,0), NoWatch, NoTV]
[NullAllowed, Export ("appLaunchDiagnostics", ArgumentSemantic.Strong)]
MXAppLaunchDiagnostic[] AppLaunchDiagnostics { get; }
[NullAllowed, Export ("crashDiagnostics", ArgumentSemantic.Strong)]
MXCrashDiagnostic[] CrashDiagnostics { get; }

Просмотреть файл

@ -1,9 +0,0 @@
!missing-enum! MXErrorCode not bound
!missing-field! MXErrorDomain not bound
!missing-selector! +MXMetricManager::extendLaunchMeasurementForTaskID:error: not bound
!missing-selector! +MXMetricManager::finishExtendedLaunchMeasurementForTaskID:error: not bound
!missing-selector! MXAppLaunchDiagnostic::callStackTree not bound
!missing-selector! MXAppLaunchDiagnostic::launchDuration not bound
!missing-selector! MXAppLaunchMetric::histogrammedExtendedLaunch not bound
!missing-selector! MXDiagnosticPayload::appLaunchDiagnostics not bound
!missing-type! MXAppLaunchDiagnostic not bound

Просмотреть файл

@ -1,9 +0,0 @@
!missing-enum! MXErrorCode not bound
!missing-field! MXErrorDomain not bound
!missing-selector! +MXMetricManager::extendLaunchMeasurementForTaskID:error: not bound
!missing-selector! +MXMetricManager::finishExtendedLaunchMeasurementForTaskID:error: not bound
!missing-selector! MXAppLaunchDiagnostic::callStackTree not bound
!missing-selector! MXAppLaunchDiagnostic::launchDuration not bound
!missing-selector! MXAppLaunchMetric::histogrammedExtendedLaunch not bound
!missing-selector! MXDiagnosticPayload::appLaunchDiagnostics not bound
!missing-type! MXAppLaunchDiagnostic not bound