Skip to content

MetricKit iOS xcode15.0 b1

Haritha Mohan edited this page Sep 7, 2023 · 3 revisions

#MetricKit.framework https://github.com/xamarin/xamarin-macios/pull/18958

diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXCrashDiagnostic.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXCrashDiagnostic.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXCrashDiagnostic.h	2023-03-09 23:53:04
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXCrashDiagnostic.h	2023-05-19 21:21:40
@@ -9,6 +9,7 @@
 #import <os/availability.h>
 #import <MetricKit/MXDiagnostic.h>
 #import <MetricKit/MXCallStackTree.h>
+#import <MetricKit/MXCrashDiagnosticObjectiveCExceptionReason.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -63,6 +64,13 @@
 @see           sys/signal.h
 */
 @property (readonly, strong, nullable) NSNumber *signal;
+
+/*!
+@property      exceptionReason
+@abstract      The MXCrashDiagnosticObjectiveCExceptionReason object associated with this crash.
+@see           <MetricKit/MXCrashDiagnosticObjectiveCExceptionReason.h>
+*/
+@property (readonly, strong, nullable) MXCrashDiagnosticObjectiveCExceptionReason *exceptionReason API_AVAILABLE(macos(14.0), ios(17.0)) API_UNAVAILABLE(tvos, watchos);
 
 @end
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXCrashDiagnosticObjectiveCExceptionReason.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXCrashDiagnosticObjectiveCExceptionReason.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXCrashDiagnosticObjectiveCExceptionReason.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXCrashDiagnosticObjectiveCExceptionReason.h	2023-05-19 21:21:40
@@ -0,0 +1,71 @@
+//
+//  MXCrashException.h
+//  MetricKit
+//
+//  Created by Aditya Bhushan on 3/1/23.
+//
+
+#import <Foundation/Foundation.h>
+#import <os/availability.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ @class         MXCrashDiagnosticObjectiveCExceptionReason
+ @abstract      A class that represents Crash exception reason.
+ @discussion    Crash reports that are caused by an uncaught Objective-C NSException can in some cases contain detailed information about the type, name and description of the exception object.
+                This information is captured in a structured way in a MXCrashDiagnosticObjectiveCExceptionReason object and may have some pieces redacted to avoid exposing sensitive user data.
+ */
+
+API_AVAILABLE(macos(14.0), ios(17.0)) API_UNAVAILABLE(tvos, watchos)
+@interface MXCrashDiagnosticObjectiveCExceptionReason: NSObject <NSSecureCoding>
+/*!
+ @property      composedMessage
+ @abstract      A human-readable message string summarizing the reason for the exception.
+ */
+@property (readonly, copy, nonnull) NSString *composedMessage;
+/*!
+ @property      formatString
+ @abstract      A string representing the exception message before arguments are substituted into the message
+ */
+@property (readonly, copy, nonnull) NSString *formatString;
+/*!
+ @property      arguments
+ @abstract      An NSArray of strings representing arguments passed to the formatString.
+ */
+@property (readonly, copy, nonnull) NSArray<NSString *>*arguments;
+/*!
+ @property      exceptionType
+ @abstract      A human-readable string denoting type of the exception
+ */
+@property (readonly, copy, nonnull) NSString *exceptionType;
+/*!
+ @property      className
+ @abstract      A string representing the class name of the exception, for example NSException.
+ */
+@property (readonly, copy, nonnull) NSString *className;
+/*!
+ @property      exceptionName
+ @abstract      A string representing name of the exception
+ @discussion    This will align with the "name" field of the NSException
+ */
+@property (readonly, copy, nonnull) NSString *exceptionName;
+
+/*!
+ @method        JSONRepresentation
+ @abstract      Convenience method to return a JSON representation of this MXCrashDiagnosticObjectiveCExceptionReason object.
+ @result        An NSData object containing the JSON representation
+ */
+- (NSData *)JSONRepresentation;
+
+/*!
+@method        dictionaryRepresentation
+@abstract      Convenience method to return a NSDictionary representation of this MXCrashDiagnosticObjectiveCExceptionReason object.
+@result        An NSDictionary object containing the dictionary representation
+*/
+- (NSDictionary *)dictionaryRepresentation;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXDiagnostic.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXDiagnostic.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXDiagnostic.h	2023-03-09 23:53:04
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXDiagnostic.h	2023-05-19 21:21:40
@@ -7,6 +7,7 @@
 
 #import <Foundation/Foundation.h>
 #import <MetricKit/MXMetaData.h>
+#import <MetricKit/MXSignpostRecord.h>
 #import <os/availability.h>
 
 NS_ASSUME_NONNULL_BEGIN
@@ -26,6 +27,13 @@
  @abstract      An NSString representation of the application version from which this diagnostic was generated.
  */
 @property (readonly, strong, nonnull) NSString *applicationVersion;
+
+/*!
+ @property      signpostData
+ @abstract      An NSArray representing the list of signpost records.
+ */
+
+@property (readonly, strong, nullable) NSArray<MXSignpostRecord *> *signpostData API_AVAILABLE(macos(14.0), ios(17.0)) API_UNAVAILABLE(tvos, watchos);
 
 /*!
  @method        JSONRepresentation
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXMetaData.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXMetaData.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXMetaData.h	2023-03-09 23:53:03
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXMetaData.h	2023-05-19 21:21:40
@@ -47,6 +47,27 @@
  */
 @property (readonly, strong, nonnull) NSString *platformArchitecture API_AVAILABLE(ios(14.0), macos(12.0)) API_UNAVAILABLE(tvos, watchos);
 
+/*!
+ @property      lowPowerModeEnabled
+ @abstract      A boolean representing low power mode enablement on device
+ */
+
+@property (readonly) bool lowPowerModeEnabled API_AVAILABLE(macos(14.0), ios(17.0)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+ @property      isTestFlightApp
+ @abstract      A boolean representing if the app is registered as a testFlightApp
+ */
+
+@property (readonly) bool isTestFlightApp API_AVAILABLE(macos(14.0), ios(17.0)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+ @property      pid
+ @abstract      pid of the process for which this diagnostic  was generated
+ */
+
+@property (readonly) pid_t pid API_AVAILABLE(macos(14.0), ios(17.0)) API_UNAVAILABLE(tvos, watchos);
+
 
 /*!
  @method        JSONRepresentation
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXSignpostRecord.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXSignpostRecord.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXSignpostRecord.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MXSignpostRecord.h	2023-05-19 21:21:40
@@ -0,0 +1,80 @@
+//
+//  MXSignpostRecord.h
+//  MetricKit
+//  Copyright (c) 2023 Apple Inc.
+//  All rights reserved.
+//
+#import <Foundation/Foundation.h>
+#import <os/availability.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ @class         MXSignpostRecord
+ @abstract      A class that represents a record of signpost instance.
+ @discussion    Signpost instances are either Signpost intervals or events and MXSignpostRecord captures information reagarding such signpost instances
+ */
+API_AVAILABLE(macos(14.0), ios(17.0)) API_UNAVAILABLE(tvos, watchos)
+@interface MXSignpostRecord : NSObject <NSSecureCoding>
+
+/*!
+ @property      subsystem
+ @abstract      An NSString representation of the subsystem of the signpost instance.
+ */
+@property (readonly, copy, nonnull) NSString *subsystem;
+/*!
+ @property      category
+ @abstract      An NSString representation of the category of the signpost instance.
+ */
+
+@property (readonly, copy, nonnull) NSString *category;
+/*!
+ @property      name
+ @abstract      An NSString representation of the name of the signpost instance.
+ */
+
+@property (readonly, copy, nonnull) NSString *name;
+/*!
+ @property      beginTimeStamp
+ @abstract      An NSDate representation of the begin time stamp of the signpost instance.
+ */
+
+@property (readonly, copy, nonnull) NSDate *beginTimeStamp;
+/*!
+ @property      endTimeStamp
+ @abstract      An NSDate representation of the end time stamp of the signpost instances which are intervals and will be nil for signpost events.
+ */
+
+@property (readonly, copy, nullable) NSDate *endTimeStamp;
+/*!
+ @property      duration
+ @abstract      An NSMeasurement representing the duration in milliseconds of signpost instances which are intervals and will be nil for signpost events.
+ */
+
+@property (readonly, copy, nullable) NSMeasurement<NSUnitDuration *> *duration;
+
+/*!
+ @property      isInterval
+ @abstract      A BOOL denoting whether the signpost instance is an interval or not..
+ */
+
+@property (readonly) BOOL isInterval;
+
+/*!
+ @method        JSONRepresentation
+ @abstract      Convenience method to return a JSON representation of this SignpostRecord.
+ @result        An NSData object containing the JSON representation
+ */
+- (NSData *)JSONRepresentation;
+
+/*!
+@method        dictionaryRepresentation
+@abstract      Convenience method to return a NSDictionary representation of this SignpostRecord.
+@result        An NSDictionary object containing the dictionary representation
+*/
+- (NSDictionary *)dictionaryRepresentation;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MetricKit.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MetricKit.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MetricKit.h	2023-03-04 19:42:29
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetricKit.framework/Headers/MetricKit.h	2023-05-19 21:21:38
@@ -36,3 +36,5 @@
 #import <MetricKit/MXAppLaunchDiagnostic.h>
 #import <MetricKit/MXAppExitMetric.h>
 #import <MetricKit/MXError.h>
+#import <MetricKit/MXSignpostRecord.h>
+#import <MetricKit/MXCrashDiagnosticObjectiveCExceptionReason.h>
Clone this wiki locally