Skip to content

OSLog watchOS xcode13.0 beta4

Manuel de la Pena edited this page Aug 10, 2021 · 2 revisions

#OSLog.framework https://github.com/xamarin/xamarin-macios/pull/12392

diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Entry.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Entry.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Entry.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Entry.h	2021-07-23 13:30:55.000000000 -0400
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_ENTRY_H__
+#define __OSLOG_ENTRY_H__
+
+#ifndef __INDIRECT_OSLOG_HEADER_USER__
+#error "Please use <OSLog/OSLog.h> instead of directly using this file."
+#endif
+
+@class OSLogMessageComponent;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @enum OSLogEntryStoreCategory
+ *
+ * @abstract
+ * A classification of how the entry was to be stored and
+ * rotated at the point when it was created.
+ *
+ * @discussion
+ * The unified logging system keeps entries in one of two
+ * places: a ring buffer in memory and a persisted data store.
+ * Entries are rotated out of both places to free up resources.
+ * This rotation is not strictly aligned with entries'
+ * timestamps --- in particular, they can be rotated in bulk,
+ * and they are rotated according to a series of heuristics that
+ * take into account space, time, and how the entries were
+ * classified.
+ *
+ * @constant OSLogEntryStoreCategoryMetadata
+ * This entry was generated as information about the other
+ * entries or about the sequence of entries as a whole.
+ *
+ * @constant OSLogEntryStoreCategoryShortTerm
+ * This entry was not intended to be long-lived and was captured
+ * in the ring buffer.
+ *
+ * @constant OSLogEntryStoreCategoryLongTermAuto
+ * The entry was intended to be persisted in a filesystem-backed
+ * data store and kept mainly based on the amount of space
+ * available.
+ *
+ * @constant OSLogEntryStoreCategoryLongTerm1
+ * @constant OSLogEntryStoreCategoryLongTerm3
+ * @constant OSLogEntryStoreCategoryLongTerm7
+ * @constant OSLogEntryStoreCategoryLongTerm14
+ * @constant OSLogEntryStoreCategoryLongTerm30
+ * The entry was tagged with a hint indicating that the system
+ * should try to preserve it for a certain amount of time. It
+ * was persisted in the filesystem-backed data store, and
+ * rotation of these entries was based on both time and space
+ * considerations.
+ */
+typedef NS_ENUM(NSInteger, OSLogEntryStoreCategory) {
+    OSLogEntryStoreCategoryUndefined,
+    OSLogEntryStoreCategoryMetadata,
+    OSLogEntryStoreCategoryShortTerm,
+    OSLogEntryStoreCategoryLongTermAuto,
+    OSLogEntryStoreCategoryLongTerm1,
+    OSLogEntryStoreCategoryLongTerm3,
+    OSLogEntryStoreCategoryLongTerm7,
+    OSLogEntryStoreCategoryLongTerm14,
+    OSLogEntryStoreCategoryLongTerm30,
+}
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_NAME(OSLogEntry.StoreCategory);
+
+/*!
+ * @class OSLogEntry
+ *
+ * @abstract
+ * A single entry from the unified logging system.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@interface OSLogEntry : NSObject
+
+/*!
+ * @property composedMessage
+ *
+ * @abstract
+ * The fully formatted message for the entry.
+ */
+@property (nonatomic, readonly) NSString *composedMessage
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property date
+ *
+ * @abstract
+ * The timestamp of the entry.
+ */
+@property (nonatomic, readonly) NSDate *date
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property storeCategory
+ *
+ * @abstract
+ * This entry's storage tag. See OSLogEntryStoreCategory.
+ */
+@property (nonatomic, readonly) OSLogEntryStoreCategory storeCategory
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+@end
+
+/*!
+ * @protocol OSLogEntryFromProcess
+ *
+ * @abstract
+ * Entry subclasses conforming to this protocol represent data
+ * that are generated from a process; they have metadata about
+ * the originator.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@protocol OSLogEntryFromProcess
+
+/*!
+ * @property activityIdentifier
+ *
+ * @abstract
+ * The activity ID associated with the entry.
+ */
+@property (nonatomic, readonly) os_activity_id_t activityIdentifier
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property process
+ *
+ * @abstract
+ * The name of the process that made the entry.
+ */
+@property (nonatomic, readonly) NSString *process
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property processIdentifier
+ *
+ * @abstract
+ * The pid of the process that made the entry.
+ */
+@property (nonatomic, readonly) pid_t processIdentifier
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property sender
+ *
+ * @abstract
+ * The name of the binary image that made the entry.
+ */
+@property (nonatomic, readonly) NSString *sender
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property threadIdentifier
+ *
+ * @abstract
+ * The tid of the thread that made the entry.
+ */
+@property (nonatomic, readonly) uint64_t threadIdentifier
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+@end
+
+/*!
+ * @protocol OSLogEntryWithPayload
+ *
+ * @abstract
+ * Entry subclasses conforming to this protocol represent
+ * entries that were made using a handle and a format string.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@protocol OSLogEntryWithPayload
+
+/*!
+ * @property category
+ *
+ * @abstract
+ * The category from the os_log_t handle used.
+ */
+@property (nonatomic, readonly) NSString *category
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property components
+ *
+ * @abstract
+ * An array of the various parts of the composed message.
+ */
+@property (nonatomic, readonly) NSArray<OSLogMessageComponent *> *components
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property formatString
+ *
+ * @abstract
+ * The format string used.
+ */
+@property (nonatomic, readonly) NSString *formatString
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property subsystem
+ *
+ * @abstract
+ * The subsystem of the os_log_t handle used.
+ */
+@property (nonatomic, readonly) NSString *subsystem
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+@end
+
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
+@interface OSLogEntry () <NSSecureCoding>
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* __OSLOG_ENTRY_H__ */
diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryActivity.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryActivity.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryActivity.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryActivity.h	2021-07-23 13:32:40.000000000 -0400
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_ENTRY_ACTIVITY_H__
+#define __OSLOG_ENTRY_ACTIVITY_H__
+
+#ifndef __INDIRECT_OSLOG_HEADER_USER__
+#error "Please use <OSLog/OSLog.h> instead of directly using this file."
+#endif
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @class OSLogEntryActivity
+ *
+ * @abstract
+ * An entry generated by an activity event.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@interface OSLogEntryActivity : OSLogEntry <OSLogEntryFromProcess>
+
+/*!
+ * @property parentActivityIdentifier
+ *
+ * @abstract
+ * This parent activity's activity ID.
+ */
+@property (nonatomic, readonly) os_activity_id_t parentActivityIdentifier
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* __OSLOG_ENTRY_ACTIVITY_H__ */
diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryBoundary.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryBoundary.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryBoundary.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryBoundary.h	2021-07-23 13:32:40.000000000 -0400
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_ENTRY_BOUNDARY_H__
+#define __OSLOG_ENTRY_BOUNDARY_H__
+
+#ifndef __INDIRECT_OSLOG_HEADER_USER__
+#error "Please use <OSLog/OSLog.h> instead of directly using this file."
+#endif
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @class OSLogEntryBoundary
+ *
+ * @abstract
+ * This entry represents metadata that partitions sequences of
+ * other entries.
+ *
+ * @discussion
+ * For example, this kind of entry is used for boot boundaries.
+ * The data here are currently informational and carried in the
+ * composedMessage property.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@interface OSLogEntryBoundary : OSLogEntry
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* __OSLOG_ENTRY_BOUNDARY_H__ */
diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryLog.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryLog.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryLog.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntryLog.h	2021-07-23 13:32:40.000000000 -0400
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_ENTRY_LOG_H__
+#define __OSLOG_ENTRY_LOG_H__
+
+#ifndef __INDIRECT_OSLOG_HEADER_USER__
+#error "Please use <OSLog/OSLog.h> instead of directly using this file."
+#endif
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @enum OSLogEntryLogLevel
+ *
+ * @abstract
+ * The level that this entry was generated at.
+ */
+typedef NS_ENUM(NSInteger, OSLogEntryLogLevel) {
+    OSLogEntryLogLevelUndefined,
+    OSLogEntryLogLevelDebug,
+    OSLogEntryLogLevelInfo,
+    OSLogEntryLogLevelNotice,
+    OSLogEntryLogLevelError,
+    OSLogEntryLogLevelFault,
+}
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_NAME(OSLogEntryLog.Level);
+
+/*!
+ * @class OSLogEntryLog
+ *
+ * @abstract
+ * Entries made by the os_log API.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@interface OSLogEntryLog : OSLogEntry <OSLogEntryFromProcess, OSLogEntryWithPayload>
+
+/*!
+ * @property level
+ *
+ * @abstract
+ * The level of the entry, e.g., info, debug.
+ */
+@property (nonatomic, readonly) OSLogEntryLogLevel level
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* __OSLOG_ENTRY_LOG_H__ */
diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntrySignpost.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntrySignpost.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntrySignpost.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/EntrySignpost.h	2021-07-23 13:32:40.000000000 -0400
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_ENTRY_SIGNPOST_H__
+#define __OSLOG_ENTRY_SIGNPOST_H__
+
+#ifndef __INDIRECT_OSLOG_HEADER_USER__
+#error "Please use <OSLog/OSLog.h> instead of directly using this file."
+#endif
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @enum OSLogEntrySignpostType
+ *
+ * @discussion
+ * The kind of of signpost emitted.
+ */
+typedef NS_ENUM(NSInteger, OSLogEntrySignpostType) {
+    OSLogEntrySignpostTypeUndefined,
+    OSLogEntrySignpostTypeIntervalBegin,
+    OSLogEntrySignpostTypeIntervalEnd,
+    OSLogEntrySignpostTypeEvent,
+}
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_NAME(OSLogEntrySignpost.SignpostType);
+
+/*!
+ * @class OSLogEntrySignpost
+ *
+ * @abstract
+ * Entries made by the os_signpost API.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@interface OSLogEntrySignpost : OSLogEntry <OSLogEntryFromProcess, OSLogEntryWithPayload>
+
+/*!
+ * @property signpostIdentifier
+ *
+ * @abstract
+ * The signpost ID associated with this entry.
+ */
+@property (nonatomic, readonly) os_signpost_id_t signpostIdentifier
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property signpostName
+ *
+ * @abstract
+ * The signpost name associated with this entry.
+ */
+@property (nonatomic, readonly) NSString *signpostName
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property signpostType
+ *
+ * @abstract
+ * The signpost type associated with this entry.
+ */
+@property (nonatomic, readonly) OSLogEntrySignpostType signpostType
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* __OSLOG_ENTRY_SIGNPOST_H__ */
diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Enumerator.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Enumerator.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Enumerator.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Enumerator.h	2021-07-23 13:32:40.000000000 -0400
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_ENUMERATOR_H__
+#define __OSLOG_ENUMERATOR_H__
+
+#ifndef __INDIRECT_OSLOG_HEADER_USER__
+#error "Please use <OSLog/OSLog.h> instead of directly using this file."
+#endif
+
+@class OSLogPosition;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @enum OSLogEnumeratorOptions
+ *
+ * @abstract
+ * Control the direction of the iteration.
+ *
+ * @constant OSLogEnumeratorReverse
+ * Iterate backward in time. If no starting position is specified,
+ * start at the latest entry.
+ */
+typedef NS_OPTIONS(NSUInteger, OSLogEnumeratorOptions) {
+    OSLogEnumeratorReverse                                  = 0x01,
+}
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_NAME(OSLogEnumerator.Options);
+
+/*!
+ * @class OSLogEnumerator
+ *
+ * @abstract
+ * An enumerator that views entries in the unified logging system.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@interface OSLogEnumerator : NSEnumerator
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* __OSLOG_ENUMERATOR_H__ */
diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/MessageComponent.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/MessageComponent.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/MessageComponent.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/MessageComponent.h	2021-07-22 14:33:54.000000000 -0400
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_MESSAGE_COMPONENT_H__
+#define __OSLOG_MESSAGE_COMPONENT_H__
+
+#ifndef __INDIRECT_OSLOG_HEADER_USER__
+#error "Please use <OSLog/OSLog.h> instead of directly using this file."
+#endif
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @enum OSLogMessageComponentArgumentCategory
+ *
+ * @abstract
+ * The kind of data corresponding to an argument in a message
+ * payload, like the number associated with a "%d" placeholder.
+ * This value can be undefined if the argument data cannot be
+ * decoded; for example, it may be redacted.
+ */
+typedef NS_ENUM(NSInteger, OSLogMessageComponentArgumentCategory) {
+    OSLogMessageComponentArgumentCategoryUndefined,
+    OSLogMessageComponentArgumentCategoryData,
+    OSLogMessageComponentArgumentCategoryDouble,
+    OSLogMessageComponentArgumentCategoryInt64,
+    OSLogMessageComponentArgumentCategoryString,
+    OSLogMessageComponentArgumentCategoryUInt64,
+}
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_NAME(OSLogMessageComponent.ArgumentCategory);
+
+/*!
+ * @class OSLogMessageComponent
+ *
+ * @abstract
+ * The message arguments for a particular entry. There is one
+ * component for each placeholder in the formatString plus one
+ * component for any text after the last placeholder.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@interface OSLogMessageComponent : NSObject <NSSecureCoding>
+
+/*!
+ * @property formatSubstring
+ *
+ * @abstract
+ * The text immediately preceding a placeholder. This can be an
+ * empty string if there is nothing between two placeholders, or
+ * between the placeholder and the bounds of the string.
+ */
+@property (nonatomic, readonly) NSString *formatSubstring
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property placeholder
+ *
+ * @abstract
+ * The placeholder text. Is empty for is the last component.
+ */
+@property (nonatomic, readonly) NSString *placeholder
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property argumentCategory
+ *
+ * @abstract
+ * The type of argument corresponding to the placeholder; see
+ * OSLogMessageComponentArgumentCategory.
+ */
+@property (nonatomic, readonly) OSLogMessageComponentArgumentCategory argumentCategory
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property argumentDataValue
+ *
+ * @abstract
+ * The argument as a sequence of bytes. Can be nil if the
+ * argument cannot be decoded (for example, it could be
+ * redacted), or if this is the last component.
+ */
+@property (nonatomic, readonly, nullable) NSData *argumentDataValue
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property argumentDoubleValue
+ *
+ * @abstract
+ * The argument as a double-precision floating point number; the
+ * value is undefined if the argument cannot be decoded or if this
+ * is the last component.
+ */
+@property (nonatomic, readonly) double argumentDoubleValue
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property argumentInt64Value
+ *
+ * @abstract
+ * The argument as a 64-bit signed integer; the value is undefined
+ * if it cannot be decoded or if this is the last component.
+ */
+@property (nonatomic, readonly) int64_t argumentInt64Value
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property argumentNumberValue
+ *
+ * @abstract
+ * The argument as a number. Can be nil if the argument cannot
+ * be decoded (for example, it could be redacted), or if this is
+ * the last component.
+ */
+@property (nonatomic, readonly, nullable) NSNumber *argumentNumberValue
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property argumentStringValue
+ *
+ * @abstract
+ * The argument as a string. Can be nil if the argument cannot
+ * be decoded (for example, it could be redacted), or if this is
+ * the last component.
+ */
+@property (nonatomic, readonly, nullable) NSString *argumentStringValue
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @property argumentUInt64Value
+ *
+ * @abstract
+ * The argument as a 64-bit unsigned integer; the value is
+ * undefined if the argument cannot be decoded or if this is the
+ * last component.
+ */
+@property (nonatomic, readonly) uint64_t argumentUInt64Value
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* __OSLOG_MESSAGE_COMPONENT_H__ */
diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/OSLog.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/OSLog.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/OSLog.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/OSLog.h	2021-07-17 12:35:51.000000000 -0400
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_OSLOG_H__
+#define __OSLOG_OSLOG_H__
+
+#import <Foundation/Foundation.h>
+#import <os/activity.h>
+#import <os/signpost.h>
+
+#define __INDIRECT_OSLOG_HEADER_USER__
+#import <OSLog/Entry.h>
+#import <OSLog/EntryActivity.h>
+#import <OSLog/EntryBoundary.h>
+#import <OSLog/EntryLog.h>
+#import <OSLog/EntrySignpost.h>
+#import <OSLog/Enumerator.h>
+#import <OSLog/MessageComponent.h>
+#import <OSLog/Position.h>
+#import <OSLog/Store.h>
+
+#endif /* __OSLOG_OSLOG_H__ */
diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Position.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Position.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Position.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Position.h	2021-07-23 13:32:40.000000000 -0400
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_POSITION_H__
+#define __OSLOG_POSITION_H__
+
+#ifndef __INDIRECT_OSLOG_HEADER_USER__
+#error "Please use <OSLog/OSLog.h> instead of directly using this file."
+#endif
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @class OSLogPosition
+ *
+ * @abstract
+ * An opaque abstraction representing a point in a sequence of
+ * entries in the unified logging system.
+ *
+ * @discussion
+ * Generate positions with OSLogStore instance methods and use them
+ * to start viewing entries from a particular starting point.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@interface OSLogPosition : NSObject
+- (instancetype)init NS_UNAVAILABLE;
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* __OSLOG_POSITION_H__ */
diff -ruN /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Store.h /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Store.h
--- /Applications/Xcode_13.0.0-beta3.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Store.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/OSLog.framework/Headers/Store.h	2021-07-22 14:22:51.000000000 -0400
@@ -0,0 +1,217 @@
+/*
+ * Copyright (c) 2018-2019 Apple Inc. All rights reserved.
+ */
+
+#ifndef __OSLOG_STORE_H__
+#define __OSLOG_STORE_H__
+
+#ifndef __INDIRECT_OSLOG_HEADER_USER__
+#error "Please use <OSLog/OSLog.h> instead of directly using this file."
+#endif
+
+@class OSLogEnumerator;
+@class OSLogPosition;
+
+/*!
+ * @enum OSLogStoreScope
+ *
+ * @abstract
+ * Create a store to a subset of the libtrace entries.
+ *
+ * @constant OSLogStoreSystem
+ * @constant OSLogStoreCurrentProcessIdentifier
+ * "System" scope indicates the entire system; i.e., all logs. Entries can be
+ * retrieved for the current calling process, i.e., matching pid.
+ */
+typedef NS_ENUM(NSInteger, OSLogStoreScope) {
+    OSLogStoreSystem API_AVAILABLE(macos(12.0)) API_UNAVAILABLE(ios, tvos, watchos) = 0,
+    OSLogStoreCurrentProcessIdentifier = 1,
+}
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_NAME(OSLogStore.Scope);
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @class OSLogStore
+ *
+ * @abstract
+ * A set of entries from the unified logging system. Instances
+ * represent a fixed range of entries and may be backed by a
+ * logarchive or the Mac's local store.
+ *
+ * @discussion
+ * Entries in OSLogStore objects are used by OSLogEnumerator
+ * instances; one store can support multiple OSLogEnumerator
+ * instances concurrently.
+ */
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+OS_EXPORT
+@interface OSLogStore : NSObject
+
+/*!
+ * @method localStoreAndReturnError
+ *
+ * @abstract
+ * Create an OSLogStore representing the Mac's local store.
+ *
+ * @param error
+ * If initialization is unsuccessful --- for example, this process
+ * does not have access to local logs --- return nil and set this
+ * parameter to a pointer to an error object describing the reason.
+ *
+ * @discussion
+ * This enables processing of a sequence of logs as of the particular
+ * point in time when this object is created.
+ *
+ * Gaining access to the local unified logging system requires
+ * permission from the system. The caller must be run by an admin
+ * account.
+ */
++ (nullable instancetype)localStoreAndReturnError:(NSError **)error
+API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, tvos, watchos)
+NS_SWIFT_NAME(local());
+
+/*!
+ * @method storeWithScope
+ *
+ * @abstract
+ * Create an OSLogStore for a subset of entries in the local store.
+ *
+ * @param scope
+ * The kind of subset the OSLogStore is for.
+ *
+ * @param error
+ * If initialization is unsuccessful, return nil and set this parameter to a
+ * pointer to an error object that describes the reason.
+ */
++ (nullable instancetype)storeWithScope:(OSLogStoreScope)scope
+                                  error:(NSError **)error
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0));
+
+/*!
+ * @method storeWithURL
+ *
+ * @abstract
+ * Create an OSLogStore based on a logarchive.
+ *
+ * @param url
+ * The path identifying a logarchive to be read.
+ *
+ * @param error
+ * If initialization is unsuccessful --- for example, the path is not
+ * to a valid logarchive or the logarchive is not compatible because
+ * it is from a newer version --- return nil and set this parameter
+ * to a pointer to an error object that describes the reason.
+ */
++ (nullable instancetype)storeWithURL:(NSURL *)url
+                                error:(NSError **)error
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0));
+
+- (instancetype)init
+API_DEPRECATED("Use one of the factory methods", macos(10.15, 12.0))
+API_UNAVAILABLE(ios, tvos, watchos);
+
+/*!
+ * @method entriesEnumeratorWithOptions
+ *
+ * @abstract
+ * Return an OSLogEnumerator object based on an underlying store.
+ * This object represents the sequence of entries for the store.
+ * OSLogStore. Additional parameters control which entries are
+ * yielded and their order.
+ *
+ * @param options
+ * Control the direction of iteration.
+ *
+ * @param position
+ * Where to start iteration. If nil, depend on the direction of
+ * the iteration: if forwards, start with the earliest entry; if
+ * reverse, start with the latest entry.
+ *
+ * @param predicate
+ * A predicate that filters which entries are in the sequence. If
+ * this is nil, yield all entries.
+ *
+ * @param error
+ * If the enumerator cannot be set up --- for example, the
+ * predicate has an unrecognized key --- return nil and set this
+ * to a pointer to an error object that describes the reason.
+ */
+- (nullable OSLogEnumerator *)entriesEnumeratorWithOptions:(OSLogEnumeratorOptions)options
+                                                  position:(nullable OSLogPosition *)position
+                                                 predicate:(nullable NSPredicate *)predicate
+                                                     error:(NSError **)error
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_REFINED_FOR_SWIFT;
+
+/*!
+ * @method entriesEnumeratorAndReturnError
+ *
+ * @abstract
+ * Return an OSLogEnumerator object with default options for
+ * viewing the entries; all are viewed, from earliest to latest.
+ *
+ * @param error
+ * If the enumerator cannot be set up, return nil and set this
+ * to a pointer to an error object that describes the reason.
+ */
+- (nullable OSLogEnumerator *)entriesEnumeratorAndReturnError:(NSError **)error
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_UNAVAILABLE("Use `entries` method");
+
+/*!
+ * @method positionWithDate
+ *
+ * @abstract
+ * Return a position representing the time specified.
+ *
+ * @param date
+ * The date to look for.
+ *
+ * @discussion
+ * If there are multiple occurences of the same time --- if, for
+ * example, there was a time change during the range of entries
+ * --- the earliest occurrence is used.
+ */
+- (OSLogPosition *)positionWithDate:(NSDate *)date
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_NAME(position(date:));
+
+/*!
+ * @method positionWithTimeIntervalSinceEnd
+ *
+ * @abstract
+ * Return a position representing an offset since the end of the time
+ * range that the entries span.
+ *
+ * @param seconds
+ * The seconds to add to the last time point in the range of entries.
+ */
+- (OSLogPosition *)positionWithTimeIntervalSinceEnd:(NSTimeInterval)seconds
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_NAME(position(timeIntervalSinceEnd:));
+
+/*!
+ * @method positionWithTimeIntervalSinceLatestBoot
+ *
+ * @abstract
+ * Return a position representing time since the last boot in the
+ * series of entries.
+ *
+ * @param seconds
+ * The seconds to add to the boot time point in the log time range.
+ *
+ * @discussion
+ * Negative seconds would create an ambiguous or imprecise position;
+ * this function asserts that the interval is positive.
+ */
+- (OSLogPosition *)positionWithTimeIntervalSinceLatestBoot:(NSTimeInterval)seconds
+API_AVAILABLE(macos(10.15), ios(15.0), tvos(15.0), watchos(8.0))
+NS_SWIFT_NAME(position(timeIntervalSinceLatestBoot:));
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* __OSLOG_STORE_H__ */
Clone this wiki locally