[sensorkit] Update for Xcode 12 beta 2 (#9142)

This commit is contained in:
Sebastien Pouliot 2020-07-21 13:12:51 -04:00 коммит произвёл GitHub
Родитель 819acdaad3
Коммит f36b2ae7b8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
11 изменённых файлов: 898 добавлений и 201 удалений

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

@ -148,6 +148,7 @@ namespace ObjCRuntime {
public const string AccessibilityLibrary = "/System/Library/Frameworks/Accessibility.framework/Accessibility";
public const string AppClipLibrary = "/System/Library/Frameworks/AppClip.framework/AppClip";
public const string MediaSetupLibrary = "/System/Library/Frameworks/MediaSetup.framework/MediaSetup";
public const string SensorKitLibrary = "/System/Library/Frameworks/SensorKit.framework/SensorKit";
public const string UniformTypeIdentifiersLibrary = "/System/Library/Frameworks/UniformTypeIdentifiers.framework/UniformTypeIdentifiers";
}
}

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

@ -0,0 +1,25 @@
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
#nullable enable
namespace SensorKit {
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
public static class SRAbsoluteTime {
[DllImport (Constants.SensorKitLibrary, EntryPoint = "SRAbsoluteTimeGetCurrent")]
public static extern /* SRAbsoluteTime */ double GetCurrent ();
[DllImport (Constants.SensorKitLibrary, EntryPoint = "SRAbsoluteTimeFromCFAbsoluteTime")]
public static extern /* SRAbsoluteTime */ double FromCFAbsoluteTime (/* CFAbsoluteTime */ double cfAbsoluteTime);
[DllImport (Constants.SensorKitLibrary, EntryPoint = "SRAbsoluteTimeToCFAbsoluteTime")]
public static extern /* CFAbsoluteTime */ double ToCFAbsoluteTime (double srAbsoluteTime);
[DllImport (Constants.SensorKitLibrary, EntryPoint = "SRAbsoluteTimeFromContinuousTime")]
public static extern /* SRAbsoluteTime */ double FromContinuousTime (ulong continuousTime);
}
}

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

@ -0,0 +1,16 @@
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
#nullable enable
namespace SensorKit {
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[StructLayout (LayoutKind.Sequential)]
public struct SRAmbientLightChromaticity {
public float X;
public float Y;
}
}

21
src/SensorKit/SRSensor.cs Normal file
Просмотреть файл

@ -0,0 +1,21 @@
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
#nullable enable
namespace SensorKit {
public partial class SRSensorExtensions {
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
public static SRSensor GetSensorForDeletionRecords (this SRSensor self)
{
var constant = self.GetConstant ();
if (constant == null)
return SRSensor.Invalid;
return GetValue (constant._GetSensorForDeletionRecordsFromSensor ());
}
}
}

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

@ -3746,6 +3746,24 @@ namespace Foundation
[Export ("isEqualToDate:")]
bool IsEqualToDate (NSDate other);
// NSDate_SensorKit
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Static]
[Export ("dateWithSRAbsoluteTime:")]
NSDate CreateFromSRAbsoluteTime (double time);
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Export ("initWithSRAbsoluteTime:")]
IntPtr Constructor (double srAbsoluteTime);
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Export ("srAbsoluteTime")]
double SrAbsoluteTime { get; }
}
[BaseType (typeof (NSObject))]

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

@ -1430,6 +1430,15 @@ SECURITY_SOURCES = \
Security/SslConnection.cs \
Security/SslContext.cs \
# SensorKit
SENSORKIT_CORE_SOURCES = \
SensorKit/SRAmbientLightChromaticity.cs \
SENSORKIT_SOURCES = \
SensorKit/SRAbsoluteTime.cs \
SensorKit/SRSensor.cs \
# Social
SOCIAL_CORE_SOURCES = \
@ -1973,6 +1982,7 @@ IOS_FRAMEWORKS = \
ReplayKit \
SafariServices \
Security \
SensorKit \
Social \
Speech \
SystemConfiguration \

785
src/sensorkit.cs Normal file
Просмотреть файл

@ -0,0 +1,785 @@
using System;
using System.Runtime.InteropServices;
using Foundation;
using ObjCRuntime;
namespace SensorKit {
// helpers for code generation
interface NSUnitDuration : NSUnit { }
interface NSUnitIlluminance : NSUnit { }
interface NSUnitLength : NSUnit { }
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Native]
enum SRAmbientLightSensorPlacement : long {
Unknown,
FrontTop,
FrontBottom,
FrontRight,
FrontLeft,
FrontTopRight,
FrontTopLeft,
FrontBottomRight,
FrontBottomLeft,
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Native]
enum SRCrownOrientation : long
{
Left,
Right,
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Native]
enum SRDeletionReason : long
{
UserInitiated,
LowDiskSpace,
AgeLimit,
NoInterestedClients,
SystemInitiated,
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Native]
[ErrorDomain ("SRErrorDomain")]
enum SRErrorCode : long
{
InvalidEntitlement,
NoAuthorization,
DataInaccessible,
FetchRequestInvalid,
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Native]
enum SRLocationCategory : long
{
Unknown,
Home,
Work,
School,
Gym,
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Native]
enum SRNotificationEvent : long
{
Unknown,
Received,
DefaultAction,
SupplementaryAction,
Clear,
NotificationCenterClearAll,
Removed,
Hide,
LongLook,
Silence,
AppLaunch,
Expired,
BannerPulldown,
TapCoalesce,
Deduped,
DeviceActivated,
DeviceUnlocked,
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Native]
enum SRWristLocation : long
{
Left,
Right,
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
enum SRDeviceUsageCategory {
[Field ("SRDeviceUsageCategoryGames")]
Games,
[Field ("SRDeviceUsageCategoryBusiness")]
Business,
[Field ("SRDeviceUsageCategoryWeather")]
Weather,
[Field ("SRDeviceUsageCategoryUtilities")]
Utilities,
[Field ("SRDeviceUsageCategoryTravel")]
Travel,
[Field ("SRDeviceUsageCategorySports")]
Sports,
[Field ("SRDeviceUsageCategorySocialNetworking")]
SocialNetworking,
[Field ("SRDeviceUsageCategoryReference")]
Reference,
[Field ("SRDeviceUsageCategoryProductivity")]
Productivity,
[Field ("SRDeviceUsageCategoryPhotoAndVideo")]
PhotoAndVideo,
[Field ("SRDeviceUsageCategoryNews")]
News,
[Field ("SRDeviceUsageCategoryNavigation")]
Navigation,
[Field ("SRDeviceUsageCategoryMusic")]
Music,
[Field ("SRDeviceUsageCategoryLifestyle")]
Lifestyle,
[Field ("SRDeviceUsageCategoryHealthAndFitness")]
HealthAndFitness,
[Field ("SRDeviceUsageCategoryFinance")]
Finance,
[Field ("SRDeviceUsageCategoryEntertainment")]
Entertainment,
[Field ("SRDeviceUsageCategoryEducation")]
Education,
[Field ("SRDeviceUsageCategoryBooks")]
Books,
[Field ("SRDeviceUsageCategoryMedical")]
Medical,
[Field ("SRDeviceUsageCategoryNewsstand")]
Newsstand,
[Field ("SRDeviceUsageCategoryCatalogs")]
Catalogs,
[Field ("SRDeviceUsageCategoryKids")]
Kids,
[Field ("SRDeviceUsageCategoryMiscellaneous")]
Miscellaneous,
[Field ("SRDeviceUsageCategoryFoodAndDrink")]
FoodAndDrink,
[Field ("SRDeviceUsageCategoryDeveloperTools")]
DeveloperTools,
[Field ("SRDeviceUsageCategoryGraphicsAndDesign")]
GraphicsAndDesign,
[Field ("SRDeviceUsageCategoryShopping")]
Shopping,
[Field ("SRDeviceUsageCategoryStickers")]
Stickers,
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRAmbientLightSample {
[Export ("placement")]
SRAmbientLightSensorPlacement Placement { get; }
[Export ("chromaticity")]
SRAmbientLightChromaticity Chromaticity { get; }
[Export ("lux", ArgumentSemantic.Copy)]
NSMeasurement<NSUnitIlluminance> Lux { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRApplicationUsage {
[NullAllowed, Export ("bundleIdentifier")]
string BundleIdentifier { get; }
[Export ("usageTime")]
double /* NSTimeInterval */ UsageTime { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRDeletionRecord : NSSecureCoding {
[Export ("startTime")]
double /* SRAbsoluteTime */ StartTime { get; }
[Export ("endTime")]
double /* SRAbsoluteTime */ EndTime { get; }
[Export ("reason")]
SRDeletionReason Reason { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRDevice : NSSecureCoding, NSCopying {
[Static]
[Export ("currentDevice")]
SRDevice CurrentDevice { get; }
[Export ("name")]
string Name { get; }
[Export ("model")]
string Model { get; }
[Export ("systemName")]
string SystemName { get; }
[Export ("systemVersion")]
string SystemVersion { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRDeviceUsageReport {
[Export ("duration")]
double /* NSTimeInterval */ Duration { get; }
[Export ("applicationUsageByCategory", ArgumentSemantic.Copy)]
NSDictionary<NSString, NSArray<SRApplicationUsage>> ApplicationUsageByCategory { get; }
[Export ("notificationUsageByCategory", ArgumentSemantic.Copy)]
NSDictionary<NSString, NSArray<SRNotificationUsage>> NotificationUsageByCategory { get; }
[Export ("webUsageByCategory", ArgumentSemantic.Copy)]
NSDictionary<NSString, NSArray<SRWebUsage>> WebUsageByCategory { get; }
[Export ("totalScreenWakes")]
nint TotalScreenWakes { get; }
[Export ("totalUnlocks")]
nint TotalUnlocks { get; }
[Export ("totalUnlockDuration")]
double /* NSTimeInterval */ TotalUnlockDuration { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
interface SRFetchRequest {
[Export ("from")]
double /* SRAbsoluteTime */ From { get; set; }
[Export ("to")]
double /* SRAbsoluteTime */ To { get; set; }
[Export ("device", ArgumentSemantic.Strong)]
SRDevice Device { get; set; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRFetchResult<SampleType> : NSCopying where SampleType : NSObject {
[Export ("sample", ArgumentSemantic.Copy)]
SampleType Sample { get; }
[Export ("timestamp")]
double /* SRAbsoluteTime */ Timestamp { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRKeyboardProbabilityMetric<UnitType> where UnitType : NSUnit {
[Export ("distributionSampleValues", ArgumentSemantic.Copy)]
NSMeasurement<UnitType>[] DistributionSampleValues { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRKeyboardMetrics {
[Export ("duration")]
double /* NSTimeInterval */ Duration { get; }
[Export ("keyboardIdentifier")]
string KeyboardIdentifier { get; }
[Export ("version")]
string Version { get; }
[Export ("width")]
NSMeasurement<NSUnitLength> Width { get; }
[Export ("height")]
NSMeasurement<NSUnitLength> Height { get; }
// SRKeyboardMetrics_ScalarMetrics
[Export ("totalWords")]
nint TotalWords { get; }
[Export ("totalAlteredWords")]
nint TotalAlteredWords { get; }
[Export ("totalTaps")]
nint TotalTaps { get; }
[Export ("totalDrags")]
nint TotalDrags { get; }
[Export ("totalDeletes")]
nint TotalDeletes { get; }
[Export ("totalEmojis")]
nint TotalEmojis { get; }
[Export ("totalPaths")]
nint TotalPaths { get; }
[Export ("totalPathTime")]
double TotalPathTime { get; }
[Export ("totalPathLength")]
NSMeasurement<NSUnitLength> TotalPathLength { get; }
[Export ("totalAutoCorrections")]
nint TotalAutoCorrections { get; }
[Export ("totalSpaceCorrections")]
nint TotalSpaceCorrections { get; }
[Export ("totalRetroCorrections")]
nint TotalRetroCorrections { get; }
[Export ("totalTranspositionCorrections")]
nint TotalTranspositionCorrections { get; }
[Export ("totalInsertKeyCorrections")]
nint TotalInsertKeyCorrections { get; }
[Export ("totalSkipTouchCorrections")]
nint TotalSkipTouchCorrections { get; }
[Export ("totalNearKeyCorrections")]
nint TotalNearKeyCorrections { get; }
[Export ("totalSubstitutionCorrections")]
nint TotalSubstitutionCorrections { get; }
[Export ("totalHitTestCorrections")]
nint TotalHitTestCorrections { get; }
[Export ("totalTypingDuration")]
double TotalTypingDuration { get; }
// SRKeyboardMetrics_ProbabilityMetrics
[Export ("upErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength> UpErrorDistance { get; }
[Export ("downErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength> DownErrorDistance { get; }
[Export ("spaceUpErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength> SpaceUpErrorDistance { get; }
[Export ("spaceDownErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength> SpaceDownErrorDistance { get; }
[Export ("deleteUpErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength> DeleteUpErrorDistance { get; }
[Export ("deleteDownErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength> DeleteDownErrorDistance { get; }
[Export ("shortWordCharKeyUpErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength> ShortWordCharKeyUpErrorDistance { get; }
[Export ("shortWordCharKeyDownErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength> ShortWordCharKeyDownErrorDistance { get; }
[Export ("touchDownUp", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> TouchDownUp { get; }
[Export ("spaceTouchDownUp", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> SpaceTouchDownUp { get; }
[Export ("deleteTouchDownUp", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> DeleteTouchDownUp { get; }
[Export ("shortWordCharKeyTouchDownUp", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> ShortWordCharKeyTouchDownUp { get; }
[Export ("touchDownDown", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> TouchDownDown { get; }
[Export ("charKeyToPrediction", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> CharKeyToPrediction { get; }
[Export ("shortWordCharKeyToCharKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> ShortWordCharKeyToCharKey { get; }
[Export ("charKeyToAnyTapKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> CharKeyToAnyTapKey { get; }
[Export ("anyTapToCharKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> AnyTapToCharKey { get; }
[Export ("spaceToCharKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> SpaceToCharKey { get; }
[Export ("charKeyToSpaceKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> CharKeyToSpaceKey { get; }
[Export ("spaceToDeleteKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> SpaceToDeleteKey { get; }
[Export ("deleteToSpaceKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> DeleteToSpaceKey { get; }
[Export ("spaceToSpaceKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> SpaceToSpaceKey { get; }
[Export ("spaceToShiftKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> SpaceToShiftKey { get; }
[Export ("spaceToPlaneChangeKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> SpaceToPlaneChangeKey { get; }
[Export ("spaceToPredictionKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> SpaceToPredictionKey { get; }
[Export ("deleteToCharKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> DeleteToCharKey { get; }
[Export ("charKeyToDelete", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> CharKeyToDelete { get; }
[Export ("deleteToDelete", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> DeleteToDelete { get; }
[Export ("deleteToShiftKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> DeleteToShiftKey { get; }
[Export ("deleteToPlaneChangeKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> DeleteToPlaneChangeKey { get; }
[Export ("anyTapToPlaneChangeKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> AnyTapToPlaneChangeKey { get; }
[Export ("planeChangeToAnyTap", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> PlaneChangeToAnyTap { get; }
[Export ("charKeyToPlaneChangeKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> CharKeyToPlaneChangeKey { get; }
[Export ("planeChangeKeyToCharKey", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> PlaneChangeKeyToCharKey { get; }
[Export ("pathErrorDistanceRatio", ArgumentSemantic.Strong)]
NSNumber[] PathErrorDistanceRatio { get; }
[Export ("deleteToPath", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> DeleteToPath { get; }
[Export ("pathToDelete", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> PathToDelete { get; }
[Export ("spaceToPath", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> SpaceToPath { get; }
[Export ("pathToSpace", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> PathToSpace { get; }
[Export ("pathToPath", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration> PathToPath { get; }
// SRKeyboardMetrics_PositionalMetrics
[Export ("longWordUpErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength>[] LongWordUpErrorDistance { get; }
[Export ("longWordDownErrorDistance", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitLength>[] LongWordDownErrorDistance { get; }
[Export ("longWordTouchDownUp", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration>[] LongWordTouchDownUp { get; }
[Export ("longWordTouchDownDown", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration>[] LongWordTouchDownDown { get; }
[Export ("deleteToDeletes", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration>[] DeleteToDeletes { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRMessagesUsageReport {
[Export ("duration")]
double /* NSTimeInterval */ Duration { get; }
[Export ("totalOutgoingMessages")]
nint TotalOutgoingMessages { get; }
[Export ("totalIncomingMessages")]
nint TotalIncomingMessages { get; }
[Export ("totalUniqueContacts")]
nint TotalUniqueContacts { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRNotificationUsage {
[NullAllowed, Export ("bundleIdentifier")]
string BundleIdentifier { get; }
[Export ("event")]
SRNotificationEvent Event { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRPhoneUsageReport {
[Export ("duration")]
double /* NSTimeInterval */ Duration { get; }
[Export ("totalOutgoingCalls")]
nint TotalOutgoingCalls { get; }
[Export ("totalIncomingCalls")]
nint TotalIncomingCalls { get; }
[Export ("totalUniqueContacts")]
nint TotalUniqueContacts { get; }
[Export ("totalPhoneCallDuration")]
double /* NSTimeInterval */ TotalPhoneCallDuration { get; }
}
interface ISRSensorReaderDelegate {}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Protocol, Model (AutoGeneratedName = true)]
[BaseType (typeof (NSObject))]
interface SRSensorReaderDelegate {
[Export ("sensorReader:fetchingRequest:didFetchResult:")]
bool DidFetchResult (SRSensorReader reader, SRFetchRequest fetchRequest, SRFetchResult<NSObject> result);
[Export ("sensorReader:didCompleteFetch:")]
void DidCompleteFetch (SRSensorReader reader, SRFetchRequest fetchRequest);
[Export ("sensorReader:fetchingRequest:failedWithError:")]
void FetchingRequestFailed (SRSensorReader reader, SRFetchRequest fetchRequest, NSError error);
[Export ("sensorReader:didChangeAuthorizationStatus:")]
void DidChangeAuthorizationStatus (SRSensorReader reader, bool authorized);
[Export ("sensorReaderWillStartRecording:")]
void WillStartRecording (SRSensorReader reader);
[Export ("sensorReader:startRecordingFailedWithError:")]
void StartRecordingFailed (SRSensorReader reader, NSError error);
[Export ("sensorReaderDidStopRecording:")]
void DidStopRecording (SRSensorReader reader);
[Export ("sensorReader:stopRecordingFailedWithError:")]
void StopRecordingFailed (SRSensorReader reader, NSError error);
[Export ("sensorReader:didFetchDevices:")]
void DidFetchDevices (SRSensorReader reader, SRDevice[] devices);
[Export ("sensorReader:fetchDevicesDidFailWithError:")]
void FetchDevicesFailed (SRSensorReader reader, NSError error);
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
enum SRSensor {
[Field (null)]
Invalid = -1,
[Field ("SRSensorAmbientLightSensor")]
AmbientLightSensor,
[Field ("SRSensorAccelerometer")]
Accelerometer,
[Field ("SRSensorGyroscope")]
Gyroscope,
[Field ("SRSensorVisits")]
Visits,
[Field ("SRSensorPedometerData")]
PedometerData,
[Field ("SRSensorDeviceUsageReport")]
DeviceUsageReport,
[Field ("SRSensorMessagesUsageReport")]
MessagesUsageReport,
[Field ("SRSensorPhoneUsageReport")]
PhoneUsageReport,
[Field ("SRSensorOnWristState")]
OnWristState,
[Field ("SRSensorKeyboardMetrics")]
KeyboardMetrics,
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRSensorReader {
[Export ("initWithSensor:")]
IntPtr Constructor (NSString sensor);
[Wrap ("this (sensor.GetConstant ()!)")]
IntPtr Constructor (SRSensor sensor);
[Export ("startRecording")]
void StartRecording ();
[Export ("stopRecording")]
void StopRecording ();
[Export ("fetchDevices")]
void FetchDevices ();
[Export ("fetch:")]
void Fetch (SRFetchRequest request);
[Export ("authorized")]
bool Authorized { [Bind ("isAuthorized")] get; }
[Export ("sensor")]
NSString WeakSensor { get; }
SRSensor Sensor {
[Wrap ("SRSensorExtensions.GetValue (WeakSensor)")]
get;
}
[Wrap ("WeakDelegate")]
[NullAllowed]
ISRSensorReaderDelegate Delegate { get; set; }
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
[Static]
[Export ("requestAuthorizationForSensors:")]
void RequestAuthorization (NSSet<NSString> sensors);
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRVisit {
[Export ("distanceFromHome")]
double /* CLLocationDistance */DistanceFromHome { get; }
[Export ("arrivalDateInterval", ArgumentSemantic.Strong)]
NSDateInterval ArrivalDateInterval { get; }
[Export ("departureDateInterval", ArgumentSemantic.Strong)]
NSDateInterval DepartureDateInterval { get; }
[Export ("locationCategory")]
SRLocationCategory LocationCategory { get; }
[Export ("identifier", ArgumentSemantic.Strong)]
NSUuid Identifier { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRWebUsage {
[Export ("totalUsageTime")]
double /* NSTimeInterval */ TotalUsageTime { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface SRWristDetection {
[Export ("onWrist")]
bool OnWrist { get; }
[Export ("wristLocation")]
SRWristLocation WristLocation { get; }
[Export ("crownOrientation")]
SRCrownOrientation CrownOrientation { get; }
}
[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[Category]
[BaseType (typeof (NSString))]
[Internal] // exposed thru SRSensor
interface NSString_SRDeletionRecord {
[return: NullAllowed]
[Export ("sr_sensorForDeletionRecordsFromSensor")]
NSString _GetSensorForDeletionRecordsFromSensor ();
}
}

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

@ -388,6 +388,16 @@ namespace Introspection {
#endif
// Xcode 12 beta 2
case "MSServiceAccount":
case "SRAmbientLightSample":
case "SRApplicationUsage":
case "SRDeviceUsageReport":
case "SRKeyboardMetrics":
case "SRKeyboardProbabilityMetric`1":
case "SRMessagesUsageReport":
case "SRNotificationUsage":
case "SRPhoneUsageReport":
case "SRVisit":
case "SRWebUsage":
return true;
}
break;
@ -619,6 +629,16 @@ namespace Introspection {
#endif
// Xcode 12 beta 2
case "MSServiceAccount":
case "SRAmbientLightSample":
case "SRApplicationUsage":
case "SRDeviceUsageReport":
case "SRKeyboardMetrics":
case "SRKeyboardProbabilityMetric`1":
case "SRMessagesUsageReport":
case "SRNotificationUsage":
case "SRPhoneUsageReport":
case "SRVisit":
case "SRWebUsage":
return true;
}
break;

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

@ -1,201 +0,0 @@
!missing-enum! SRAmbientLightSensorPlacement not bound
!missing-enum! SRCrownOrientation not bound
!missing-enum! SRDeletionReason not bound
!missing-enum! SRErrorCode not bound
!missing-enum! SRLocationCategory not bound
!missing-enum! SRWristLocation not bound
!missing-field! SRErrorDomain not bound
!missing-field! SRSensorAccelerometer not bound
!missing-field! SRSensorAmbientLightSensor not bound
!missing-field! SRSensorGyroscope not bound
!missing-field! SRSensorOnWristState not bound
!missing-field! SRSensorPedometerData not bound
!missing-field! SRSensorVisits not bound
!missing-pinvoke! SRAbsoluteTimeFromCFAbsoluteTime is not bound
!missing-pinvoke! SRAbsoluteTimeFromContinuousTime is not bound
!missing-pinvoke! SRAbsoluteTimeGetCurrent is not bound
!missing-pinvoke! SRAbsoluteTimeToCFAbsoluteTime is not bound
!missing-protocol! SRSensorReaderDelegate not bound
!missing-selector! +NSDate::dateWithSRAbsoluteTime: not bound
!missing-selector! +SRDevice::currentDevice not bound
!missing-selector! +SRSensorReader::requestAuthorizationForSensors: not bound
!missing-selector! NSDate::initWithSRAbsoluteTime: not bound
!missing-selector! NSDate::srAbsoluteTime not bound
!missing-selector! NSString::sr_sensorForDeletionRecordsFromSensor not bound
!missing-selector! SRAmbientLightSample::chromaticity not bound
!missing-selector! SRAmbientLightSample::lux not bound
!missing-selector! SRAmbientLightSample::placement not bound
!missing-selector! SRDeletionRecord::endTime not bound
!missing-selector! SRDeletionRecord::reason not bound
!missing-selector! SRDeletionRecord::startTime not bound
!missing-selector! SRDevice::model not bound
!missing-selector! SRDevice::name not bound
!missing-selector! SRDevice::systemName not bound
!missing-selector! SRDevice::systemVersion not bound
!missing-selector! SRFetchRequest::device not bound
!missing-selector! SRFetchRequest::from not bound
!missing-selector! SRFetchRequest::setDevice: not bound
!missing-selector! SRFetchRequest::setFrom: not bound
!missing-selector! SRFetchRequest::setTo: not bound
!missing-selector! SRFetchRequest::to not bound
!missing-selector! SRFetchResult::sample not bound
!missing-selector! SRFetchResult::timestamp not bound
!missing-selector! SRSensorReader::delegate not bound
!missing-selector! SRSensorReader::fetch: not bound
!missing-selector! SRSensorReader::fetchDevices not bound
!missing-selector! SRSensorReader::initWithSensor: not bound
!missing-selector! SRSensorReader::isAuthorized not bound
!missing-selector! SRSensorReader::sensor not bound
!missing-selector! SRSensorReader::setDelegate: not bound
!missing-selector! SRSensorReader::startRecording not bound
!missing-selector! SRSensorReader::stopRecording not bound
!missing-selector! SRVisit::arrivalDateInterval not bound
!missing-selector! SRVisit::departureDateInterval not bound
!missing-selector! SRVisit::distanceFromHome not bound
!missing-selector! SRVisit::identifier not bound
!missing-selector! SRVisit::locationCategory not bound
!missing-selector! SRWristDetection::crownOrientation not bound
!missing-selector! SRWristDetection::onWrist not bound
!missing-selector! SRWristDetection::wristLocation not bound
!missing-type! SRAmbientLightSample not bound
!missing-type! SRDeletionRecord not bound
!missing-type! SRDevice not bound
!missing-type! SRFetchRequest not bound
!missing-type! SRFetchResult not bound
!missing-type! SRSensorReader not bound
!missing-type! SRVisit not bound
!missing-type! SRWristDetection not bound
## appended from unclassified file
!missing-enum! SRNotificationEvent not bound
!missing-field! SRDeviceUsageCategoryBooks not bound
!missing-field! SRDeviceUsageCategoryBusiness not bound
!missing-field! SRDeviceUsageCategoryCatalogs not bound
!missing-field! SRDeviceUsageCategoryDeveloperTools not bound
!missing-field! SRDeviceUsageCategoryEducation not bound
!missing-field! SRDeviceUsageCategoryEntertainment not bound
!missing-field! SRDeviceUsageCategoryFinance not bound
!missing-field! SRDeviceUsageCategoryFoodAndDrink not bound
!missing-field! SRDeviceUsageCategoryGames not bound
!missing-field! SRDeviceUsageCategoryGraphicsAndDesign not bound
!missing-field! SRDeviceUsageCategoryHealthAndFitness not bound
!missing-field! SRDeviceUsageCategoryKids not bound
!missing-field! SRDeviceUsageCategoryLifestyle not bound
!missing-field! SRDeviceUsageCategoryMedical not bound
!missing-field! SRDeviceUsageCategoryMiscellaneous not bound
!missing-field! SRDeviceUsageCategoryMusic not bound
!missing-field! SRDeviceUsageCategoryNavigation not bound
!missing-field! SRDeviceUsageCategoryNews not bound
!missing-field! SRDeviceUsageCategoryNewsstand not bound
!missing-field! SRDeviceUsageCategoryPhotoAndVideo not bound
!missing-field! SRDeviceUsageCategoryProductivity not bound
!missing-field! SRDeviceUsageCategoryReference not bound
!missing-field! SRDeviceUsageCategoryShopping not bound
!missing-field! SRDeviceUsageCategorySocialNetworking not bound
!missing-field! SRDeviceUsageCategorySports not bound
!missing-field! SRDeviceUsageCategoryStickers not bound
!missing-field! SRDeviceUsageCategoryTravel not bound
!missing-field! SRDeviceUsageCategoryUtilities not bound
!missing-field! SRDeviceUsageCategoryWeather not bound
!missing-field! SRSensorDeviceUsageReport not bound
!missing-field! SRSensorKeyboardMetrics not bound
!missing-field! SRSensorMessagesUsageReport not bound
!missing-field! SRSensorPhoneUsageReport not bound
!missing-selector! SRApplicationUsage::bundleIdentifier not bound
!missing-selector! SRApplicationUsage::usageTime not bound
!missing-selector! SRDeviceUsageReport::applicationUsageByCategory not bound
!missing-selector! SRDeviceUsageReport::duration not bound
!missing-selector! SRDeviceUsageReport::notificationUsageByCategory not bound
!missing-selector! SRDeviceUsageReport::totalScreenWakes not bound
!missing-selector! SRDeviceUsageReport::totalUnlockDuration not bound
!missing-selector! SRDeviceUsageReport::totalUnlocks not bound
!missing-selector! SRDeviceUsageReport::webUsageByCategory not bound
!missing-selector! SRKeyboardMetrics::anyTapToCharKey not bound
!missing-selector! SRKeyboardMetrics::anyTapToPlaneChangeKey not bound
!missing-selector! SRKeyboardMetrics::charKeyToAnyTapKey not bound
!missing-selector! SRKeyboardMetrics::charKeyToDelete not bound
!missing-selector! SRKeyboardMetrics::charKeyToPlaneChangeKey not bound
!missing-selector! SRKeyboardMetrics::charKeyToPrediction not bound
!missing-selector! SRKeyboardMetrics::charKeyToSpaceKey not bound
!missing-selector! SRKeyboardMetrics::deleteDownErrorDistance not bound
!missing-selector! SRKeyboardMetrics::deleteToCharKey not bound
!missing-selector! SRKeyboardMetrics::deleteToDelete not bound
!missing-selector! SRKeyboardMetrics::deleteToDeletes not bound
!missing-selector! SRKeyboardMetrics::deleteToPath not bound
!missing-selector! SRKeyboardMetrics::deleteToPlaneChangeKey not bound
!missing-selector! SRKeyboardMetrics::deleteToShiftKey not bound
!missing-selector! SRKeyboardMetrics::deleteToSpaceKey not bound
!missing-selector! SRKeyboardMetrics::deleteTouchDownUp not bound
!missing-selector! SRKeyboardMetrics::deleteUpErrorDistance not bound
!missing-selector! SRKeyboardMetrics::downErrorDistance not bound
!missing-selector! SRKeyboardMetrics::duration not bound
!missing-selector! SRKeyboardMetrics::height not bound
!missing-selector! SRKeyboardMetrics::keyboardIdentifier not bound
!missing-selector! SRKeyboardMetrics::longWordDownErrorDistance not bound
!missing-selector! SRKeyboardMetrics::longWordTouchDownDown not bound
!missing-selector! SRKeyboardMetrics::longWordTouchDownUp not bound
!missing-selector! SRKeyboardMetrics::longWordUpErrorDistance not bound
!missing-selector! SRKeyboardMetrics::pathErrorDistanceRatio not bound
!missing-selector! SRKeyboardMetrics::pathToDelete not bound
!missing-selector! SRKeyboardMetrics::pathToPath not bound
!missing-selector! SRKeyboardMetrics::pathToSpace not bound
!missing-selector! SRKeyboardMetrics::planeChangeKeyToCharKey not bound
!missing-selector! SRKeyboardMetrics::planeChangeToAnyTap not bound
!missing-selector! SRKeyboardMetrics::shortWordCharKeyDownErrorDistance not bound
!missing-selector! SRKeyboardMetrics::shortWordCharKeyToCharKey not bound
!missing-selector! SRKeyboardMetrics::shortWordCharKeyTouchDownUp not bound
!missing-selector! SRKeyboardMetrics::shortWordCharKeyUpErrorDistance not bound
!missing-selector! SRKeyboardMetrics::spaceDownErrorDistance not bound
!missing-selector! SRKeyboardMetrics::spaceToCharKey not bound
!missing-selector! SRKeyboardMetrics::spaceToDeleteKey not bound
!missing-selector! SRKeyboardMetrics::spaceToPath not bound
!missing-selector! SRKeyboardMetrics::spaceToPlaneChangeKey not bound
!missing-selector! SRKeyboardMetrics::spaceToPredictionKey not bound
!missing-selector! SRKeyboardMetrics::spaceToShiftKey not bound
!missing-selector! SRKeyboardMetrics::spaceToSpaceKey not bound
!missing-selector! SRKeyboardMetrics::spaceTouchDownUp not bound
!missing-selector! SRKeyboardMetrics::spaceUpErrorDistance not bound
!missing-selector! SRKeyboardMetrics::totalAlteredWords not bound
!missing-selector! SRKeyboardMetrics::totalAutoCorrections not bound
!missing-selector! SRKeyboardMetrics::totalDeletes not bound
!missing-selector! SRKeyboardMetrics::totalDrags not bound
!missing-selector! SRKeyboardMetrics::totalEmojis not bound
!missing-selector! SRKeyboardMetrics::totalHitTestCorrections not bound
!missing-selector! SRKeyboardMetrics::totalInsertKeyCorrections not bound
!missing-selector! SRKeyboardMetrics::totalNearKeyCorrections not bound
!missing-selector! SRKeyboardMetrics::totalPathLength not bound
!missing-selector! SRKeyboardMetrics::totalPaths not bound
!missing-selector! SRKeyboardMetrics::totalPathTime not bound
!missing-selector! SRKeyboardMetrics::totalRetroCorrections not bound
!missing-selector! SRKeyboardMetrics::totalSkipTouchCorrections not bound
!missing-selector! SRKeyboardMetrics::totalSpaceCorrections not bound
!missing-selector! SRKeyboardMetrics::totalSubstitutionCorrections not bound
!missing-selector! SRKeyboardMetrics::totalTaps not bound
!missing-selector! SRKeyboardMetrics::totalTranspositionCorrections not bound
!missing-selector! SRKeyboardMetrics::totalTypingDuration not bound
!missing-selector! SRKeyboardMetrics::totalWords not bound
!missing-selector! SRKeyboardMetrics::touchDownDown not bound
!missing-selector! SRKeyboardMetrics::touchDownUp not bound
!missing-selector! SRKeyboardMetrics::upErrorDistance not bound
!missing-selector! SRKeyboardMetrics::version not bound
!missing-selector! SRKeyboardMetrics::width not bound
!missing-selector! SRKeyboardProbabilityMetric::distributionSampleValues not bound
!missing-selector! SRMessagesUsageReport::duration not bound
!missing-selector! SRMessagesUsageReport::totalIncomingMessages not bound
!missing-selector! SRMessagesUsageReport::totalOutgoingMessages not bound
!missing-selector! SRMessagesUsageReport::totalUniqueContacts not bound
!missing-selector! SRNotificationUsage::bundleIdentifier not bound
!missing-selector! SRNotificationUsage::event not bound
!missing-selector! SRPhoneUsageReport::duration not bound
!missing-selector! SRPhoneUsageReport::totalIncomingCalls not bound
!missing-selector! SRPhoneUsageReport::totalOutgoingCalls not bound
!missing-selector! SRPhoneUsageReport::totalPhoneCallDuration not bound
!missing-selector! SRPhoneUsageReport::totalUniqueContacts not bound
!missing-selector! SRWebUsage::totalUsageTime not bound
!missing-type! SRApplicationUsage not bound
!missing-type! SRDeviceUsageReport not bound
!missing-type! SRKeyboardMetrics not bound
!missing-type! SRKeyboardProbabilityMetric not bound
!missing-type! SRMessagesUsageReport not bound
!missing-type! SRNotificationUsage not bound
!missing-type! SRPhoneUsageReport not bound
!missing-type! SRWebUsage not bound

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

@ -338,6 +338,7 @@ public class Frameworks : Dictionary <string, Framework>
{ "AppClip", "AppClip", 14,0 },
{ "MediaSetup", "MediaSetup", new Version (14, 0), NotAvailableInSimulator /* no headers in beta 2 */ },
{ "SensorKit", "SensorKit", 14,0 },
{ "UniformTypeIdentifiers", "UniformTypeIdentifiers", 14,0 },
{ "Accessibility", "Accessibility", 14,0 },

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

@ -163,6 +163,7 @@ SIMLAUNCHER_FRAMEWORKS = \
\
-weak_framework AppClip \
-weak_framework Accessibility \
-weak_framework SensorKit \
# keep the above list of weak_framework
# 1. grouped by iOS versions;