From dfb5e380f1a5eaa8f38229d244a24f503246a9c4 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Fri, 1 Sep 2023 15:40:43 -0400 Subject: [PATCH 1/3] [CoreMotion] Add support for Xcode1 5 beta 7. --- src/coremotion.cs | 165 +++++++++++++++++- .../iOS-CoreMotion.todo | 57 ------ .../macOS-CoreMotion.ignore | 9 +- .../macOS-CoreMotion.todo | 32 ---- tests/xtro-sharpie/iOS-CoreMotion.todo | 57 ------ tests/xtro-sharpie/macOS-CoreMotion.ignore | 7 + tests/xtro-sharpie/macOS-CoreMotion.todo | 32 ---- tests/xtro-sharpie/watchOS-CoreMotion.todo | 37 ---- 8 files changed, 171 insertions(+), 225 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreMotion.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMotion.todo delete mode 100644 tests/xtro-sharpie/iOS-CoreMotion.todo delete mode 100644 tests/xtro-sharpie/macOS-CoreMotion.todo delete mode 100644 tests/xtro-sharpie/watchOS-CoreMotion.todo diff --git a/src/coremotion.cs b/src/coremotion.cs index 9cb21f13ba11..d921956ba014 100644 --- a/src/coremotion.cs +++ b/src/coremotion.cs @@ -483,6 +483,16 @@ public enum CMAuthorizationStatus : long { Authorized, } + [Watch (8,4), iOS (15,4), MacCatalyst (15,4), TV (15,4)] + [Native] + public enum CMOdometerOriginDevice : long + { + Unknown = 0, + Local, + Remote, + } + + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -631,6 +641,10 @@ interface CMMovementDisorderManager { [NullAllowed, Export ("monitorKinesiasExpirationDate")] NSDate MonitorKinesiasExpirationDate { get; } + + [Static] + [NullAllowed, Export ("version")] + string Version { get; } } [MacCatalyst (13, 1)] @@ -687,6 +701,16 @@ public enum CMDeviceMotionSensorLocation : long { HeadphoneRight, } + [Watch (10,0), NoTV, NoMac, iOS (17,0), MacCatalyst (17,0)] + [Native] + public enum CMHighFrequencyHeartRateDataConfidence : long + { + Low = 0, + Medium, + High, + Highest, + } + [iOS (14, 0)] [Watch (7, 0)] [MacCatalyst (14, 0)] @@ -696,7 +720,7 @@ public enum CMDeviceMotionSensorLocation : long { [iOS (14, 0)] [Watch (7, 0)] [MacCatalyst (14, 0)] - [NoMac] + [Mac (13,0)] [BaseType (typeof (NSObject))] interface CMHeadphoneMotionManager { @@ -735,7 +759,7 @@ interface ICMHeadphoneMotionManagerDelegate { } [iOS (14, 0)] [Watch (7, 0)] [MacCatalyst (14, 0)] - [NoMac] + [Mac (13,0)] #if NET [Protocol, Model] #else @@ -879,7 +903,7 @@ interface CMRecordedPressureData { NSDate StartDate { get; } } - [NoMac, NoiOS, NoMacCatalyst, Watch (9, 0), NoTV] + [Mac (13,0), iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] [Native] public enum CMWaterSubmersionState : long { Unknown = 0, @@ -887,7 +911,7 @@ public enum CMWaterSubmersionState : long { Submerged, } - [NoMac, NoiOS, NoMacCatalyst, Watch (9, 0), NoTV] + [Mac (13,0), iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] [Native] public enum CMWaterSubmersionDepthState : long { Unknown = 0, @@ -899,7 +923,7 @@ public enum CMWaterSubmersionDepthState : long { SensorDepthError = 600, } - [NoMac, NoiOS, NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] [BaseType (typeof (NSObject))] interface CMWaterSubmersionEvent : NSSecureCoding, NSCopying { [Export ("date")] @@ -909,7 +933,7 @@ interface CMWaterSubmersionEvent : NSSecureCoding, NSCopying { CMWaterSubmersionState State { get; } } - [NoMac, NoiOS, NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] [BaseType (typeof (NSObject))] interface CMWaterSubmersionMeasurement : NSSecureCoding, NSCopying { [Export ("date")] @@ -928,7 +952,7 @@ interface CMWaterSubmersionMeasurement : NSSecureCoding, NSCopying { CMWaterSubmersionDepthState SubmersionState { get; } } - [NoMac, NoiOS, NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] [BaseType (typeof (NSObject))] interface CMWaterTemperature : NSSecureCoding, NSCopying { [Export ("date")] @@ -943,7 +967,7 @@ interface CMWaterTemperature : NSSecureCoding, NSCopying { interface ICMWaterSubmersionManagerDelegate { } - [NoMac, NoiOS, NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] #if NET [Protocol, Model] #else @@ -968,7 +992,7 @@ interface CMWaterSubmersionManagerDelegate { void ErrorOccurred (CMWaterSubmersionManager manager, NSError error); } - [NoMac, NoiOS, NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] [BaseType (typeof (NSObject))] interface CMWaterSubmersionManager { [Wrap ("WeakDelegate")] @@ -985,5 +1009,128 @@ interface CMWaterSubmersionManager { [Static] [Export ("authorizationStatus")] CMAuthorizationStatus AuthorizationStatus { get; } + + [NullAllowed, Export ("maximumDepth")] + NSMeasurement MaximumDepth { get; } + } + + [Watch (10,0), NoMac, iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(NSObject))] + interface CMBatchedSensorManager + { + [Static] + [Export ("authorizationStatus")] + CMAuthorizationStatus AuthorizationStatus { get; } + + [Static] + [Export ("accelerometerSupported")] + bool AccelerometerSupported { [Bind ("isAccelerometerSupported")] get; } + + [Export ("accelerometerActive")] + bool AccelerometerActive { [Bind ("isAccelerometerActive")] get; } + + [Export ("accelerometerDataFrequency")] + nint AccelerometerDataFrequency { get; } + + [NullAllowed, Export ("accelerometerBatch")] + CMAccelerometerData[] AccelerometerBatch { get; } + + [Export ("startAccelerometerUpdates")] + void StartAccelerometerUpdates (); + + [Export ("startAccelerometerUpdatesWithHandler:")] + void StartAccelerometerUpdates (Action, NSError> handler); + + [Export ("stopAccelerometerUpdates")] + void StopAccelerometerUpdates (); + + [Static] + [Export ("deviceMotionSupported")] + bool DeviceMotionSupported { [Bind ("isDeviceMotionSupported")] get; } + + [Export ("deviceMotionDataFrequency")] + nint DeviceMotionDataFrequency { get; } + + [Export ("deviceMotionActive")] + bool DeviceMotionActive { [Bind ("isDeviceMotionActive")] get; } + + [NullAllowed, Export ("deviceMotionBatch")] + CMDeviceMotion[] DeviceMotionBatch { get; } + + [Export ("startDeviceMotionUpdates")] + void StartDeviceMotionUpdates (); + + [Export ("startDeviceMotionUpdatesWithHandler:")] + void StartDeviceMotionUpdates (Action, NSError> handler); + + [Export ("stopDeviceMotionUpdates")] + void StopDeviceMotionUpdates (); + } + + [Mac (14,0), MacCatalyst (13, 1)] + [BaseType (typeof(NSObject))] + interface CMOdometerData : NSSecureCoding, NSCopying + { + [Export ("startDate", ArgumentSemantic.Strong)] + NSDate StartDate { get; } + + [Export ("endDate", ArgumentSemantic.Strong)] + NSDate EndDate { get; } + + [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Export ("deltaDistance")] + double DeltaDistance { get; } + + [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Export ("deltaDistanceAccuracy")] + double DeltaDistanceAccuracy { get; } + + [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Export ("speed")] + double Speed { get; } + + [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Export ("speedAccuracy")] + double SpeedAccuracy { get; } + + [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Export ("gpsDate", ArgumentSemantic.Strong)] + NSDate GpsDate { get; } + + [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Export ("deltaAltitude")] + double DeltaAltitude { get; } + + [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Export ("verticalAccuracy")] + double VerticalAccuracy { get; } + + [Watch (8, 4), iOS (15, 4), MacCatalyst (15,4)] + [Export ("originDevice", ArgumentSemantic.Assign)] + CMOdometerOriginDevice OriginDevice { get; } + + [Watch (8, 4), iOS (15, 4), MacCatalyst (15,4)] + [NullAllowed] + [Export ("slope", ArgumentSemantic.Strong)] + NSNumber Slope { get; } + + [Watch (8, 4), iOS (15, 4), MacCatalyst (15,4)] + [NullAllowed] + [Export ("maxAbsSlope", ArgumentSemantic.Strong)] + NSNumber MaxAbsSlope { get; } + } + + [Watch (10,0), NoTV, NoMac, iOS (17,0), MacCatalyst (17,0)] + [BaseType (typeof(CMLogItem))] + interface CMHighFrequencyHeartRateData + { + [Export ("heartRate")] + double HeartRate { get; } + + [Export ("confidence")] + CMHighFrequencyHeartRateDataConfidence Confidence { get; } + + [NullAllowed, Export ("date")] + NSDate Date { get; } } } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreMotion.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreMotion.todo deleted file mode 100644 index d1d7b9c50793..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreMotion.todo +++ /dev/null @@ -1,57 +0,0 @@ -!missing-enum! CMWaterSubmersionDepthState not bound -!missing-enum! CMWaterSubmersionState not bound -!missing-protocol! CMWaterSubmersionManagerDelegate not bound -!missing-selector! +CMWaterSubmersionManager::authorizationStatus not bound -!missing-selector! +CMWaterSubmersionManager::waterSubmersionAvailable not bound -!missing-selector! CMWaterSubmersionEvent::date not bound -!missing-selector! CMWaterSubmersionEvent::state not bound -!missing-selector! CMWaterSubmersionManager::delegate not bound -!missing-selector! CMWaterSubmersionManager::setDelegate: not bound -!missing-selector! CMWaterSubmersionMeasurement::date not bound -!missing-selector! CMWaterSubmersionMeasurement::depth not bound -!missing-selector! CMWaterSubmersionMeasurement::pressure not bound -!missing-selector! CMWaterSubmersionMeasurement::submersionState not bound -!missing-selector! CMWaterSubmersionMeasurement::surfacePressure not bound -!missing-selector! CMWaterTemperature::date not bound -!missing-selector! CMWaterTemperature::temperature not bound -!missing-selector! CMWaterTemperature::temperatureUncertainty not bound -!missing-type! CMWaterSubmersionEvent not bound -!missing-type! CMWaterSubmersionManager not bound -!missing-type! CMWaterSubmersionMeasurement not bound -!missing-type! CMWaterTemperature not bound -!missing-enum! CMHighFrequencyHeartRateDataConfidence not bound -!missing-enum! CMOdometerOriginDevice not bound -!missing-selector! +CMBatchedSensorManager::authorizationStatus not bound -!missing-selector! +CMBatchedSensorManager::isAccelerometerSupported not bound -!missing-selector! +CMBatchedSensorManager::isDeviceMotionSupported not bound -!missing-selector! CMBatchedSensorManager::accelerometerBatch not bound -!missing-selector! CMBatchedSensorManager::accelerometerDataFrequency not bound -!missing-selector! CMBatchedSensorManager::deviceMotionBatch not bound -!missing-selector! CMBatchedSensorManager::deviceMotionDataFrequency not bound -!missing-selector! CMBatchedSensorManager::isAccelerometerActive not bound -!missing-selector! CMBatchedSensorManager::isDeviceMotionActive not bound -!missing-selector! CMBatchedSensorManager::startAccelerometerUpdates not bound -!missing-selector! CMBatchedSensorManager::startAccelerometerUpdatesWithHandler: not bound -!missing-selector! CMBatchedSensorManager::startDeviceMotionUpdates not bound -!missing-selector! CMBatchedSensorManager::startDeviceMotionUpdatesWithHandler: not bound -!missing-selector! CMBatchedSensorManager::stopAccelerometerUpdates not bound -!missing-selector! CMBatchedSensorManager::stopDeviceMotionUpdates not bound -!missing-selector! CMHighFrequencyHeartRateData::confidence not bound -!missing-selector! CMHighFrequencyHeartRateData::date not bound -!missing-selector! CMHighFrequencyHeartRateData::heartRate not bound -!missing-selector! CMOdometerData::deltaAltitude not bound -!missing-selector! CMOdometerData::deltaDistance not bound -!missing-selector! CMOdometerData::deltaDistanceAccuracy not bound -!missing-selector! CMOdometerData::endDate not bound -!missing-selector! CMOdometerData::gpsDate not bound -!missing-selector! CMOdometerData::maxAbsSlope not bound -!missing-selector! CMOdometerData::originDevice not bound -!missing-selector! CMOdometerData::slope not bound -!missing-selector! CMOdometerData::speed not bound -!missing-selector! CMOdometerData::speedAccuracy not bound -!missing-selector! CMOdometerData::startDate not bound -!missing-selector! CMOdometerData::verticalAccuracy not bound -!missing-selector! CMWaterSubmersionManager::maximumDepth not bound -!missing-type! CMBatchedSensorManager not bound -!missing-type! CMHighFrequencyHeartRateData not bound -!missing-type! CMOdometerData not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMotion.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMotion.ignore index d07224c3bfbe..bd7acb101edb 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMotion.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMotion.ignore @@ -10,4 +10,11 @@ !missing-selector! CMRotationRateData::rotationRate not bound !missing-type! CMAmbientPressureData not bound !missing-type! CMRecordedRotationRateData not bound -!missing-type! CMRotationRateData not bound \ No newline at end of file +!missing-type! CMRotationRateData not bound + +# added in 13 and deprecated in 14 so we will just ignore them +!missing-selector! +CMStepCounter::isStepCountingAvailable not bound +!missing-selector! CMStepCounter::queryStepCountStartingFrom:to:toQueue:withHandler: not bound +!missing-selector! CMStepCounter::startStepCountingUpdatesToQueue:updateOn:withHandler: not bound +!missing-selector! CMStepCounter::stopStepCountingUpdates not bound +!missing-type! CMStepCounter not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMotion.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMotion.todo deleted file mode 100644 index d64b6cb5f72a..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMotion.todo +++ /dev/null @@ -1,32 +0,0 @@ -!missing-enum! CMWaterSubmersionDepthState not bound -!missing-enum! CMWaterSubmersionState not bound -!missing-enum! CMOdometerOriginDevice not bound -!missing-protocol! CMHeadphoneMotionManagerDelegate not bound -!missing-selector! +CMHeadphoneMotionManager::authorizationStatus not bound -!missing-selector! +CMStepCounter::isStepCountingAvailable not bound -!missing-selector! CMHeadphoneMotionManager::delegate not bound -!missing-selector! CMHeadphoneMotionManager::deviceMotion not bound -!missing-selector! CMHeadphoneMotionManager::isDeviceMotionActive not bound -!missing-selector! CMHeadphoneMotionManager::isDeviceMotionAvailable not bound -!missing-selector! CMHeadphoneMotionManager::setDelegate: not bound -!missing-selector! CMHeadphoneMotionManager::startDeviceMotionUpdates not bound -!missing-selector! CMHeadphoneMotionManager::startDeviceMotionUpdatesToQueue:withHandler: not bound -!missing-selector! CMHeadphoneMotionManager::stopDeviceMotionUpdates not bound -!missing-selector! CMOdometerData::deltaAltitude not bound -!missing-selector! CMOdometerData::deltaDistance not bound -!missing-selector! CMOdometerData::deltaDistanceAccuracy not bound -!missing-selector! CMOdometerData::endDate not bound -!missing-selector! CMOdometerData::gpsDate not bound -!missing-selector! CMOdometerData::maxAbsSlope not bound -!missing-selector! CMOdometerData::originDevice not bound -!missing-selector! CMOdometerData::slope not bound -!missing-selector! CMOdometerData::speed not bound -!missing-selector! CMOdometerData::speedAccuracy not bound -!missing-selector! CMOdometerData::startDate not bound -!missing-selector! CMOdometerData::verticalAccuracy not bound -!missing-selector! CMStepCounter::queryStepCountStartingFrom:to:toQueue:withHandler: not bound -!missing-selector! CMStepCounter::startStepCountingUpdatesToQueue:updateOn:withHandler: not bound -!missing-selector! CMStepCounter::stopStepCountingUpdates not bound -!missing-type! CMHeadphoneMotionManager not bound -!missing-type! CMOdometerData not bound -!missing-type! CMStepCounter not bound diff --git a/tests/xtro-sharpie/iOS-CoreMotion.todo b/tests/xtro-sharpie/iOS-CoreMotion.todo deleted file mode 100644 index d1d7b9c50793..000000000000 --- a/tests/xtro-sharpie/iOS-CoreMotion.todo +++ /dev/null @@ -1,57 +0,0 @@ -!missing-enum! CMWaterSubmersionDepthState not bound -!missing-enum! CMWaterSubmersionState not bound -!missing-protocol! CMWaterSubmersionManagerDelegate not bound -!missing-selector! +CMWaterSubmersionManager::authorizationStatus not bound -!missing-selector! +CMWaterSubmersionManager::waterSubmersionAvailable not bound -!missing-selector! CMWaterSubmersionEvent::date not bound -!missing-selector! CMWaterSubmersionEvent::state not bound -!missing-selector! CMWaterSubmersionManager::delegate not bound -!missing-selector! CMWaterSubmersionManager::setDelegate: not bound -!missing-selector! CMWaterSubmersionMeasurement::date not bound -!missing-selector! CMWaterSubmersionMeasurement::depth not bound -!missing-selector! CMWaterSubmersionMeasurement::pressure not bound -!missing-selector! CMWaterSubmersionMeasurement::submersionState not bound -!missing-selector! CMWaterSubmersionMeasurement::surfacePressure not bound -!missing-selector! CMWaterTemperature::date not bound -!missing-selector! CMWaterTemperature::temperature not bound -!missing-selector! CMWaterTemperature::temperatureUncertainty not bound -!missing-type! CMWaterSubmersionEvent not bound -!missing-type! CMWaterSubmersionManager not bound -!missing-type! CMWaterSubmersionMeasurement not bound -!missing-type! CMWaterTemperature not bound -!missing-enum! CMHighFrequencyHeartRateDataConfidence not bound -!missing-enum! CMOdometerOriginDevice not bound -!missing-selector! +CMBatchedSensorManager::authorizationStatus not bound -!missing-selector! +CMBatchedSensorManager::isAccelerometerSupported not bound -!missing-selector! +CMBatchedSensorManager::isDeviceMotionSupported not bound -!missing-selector! CMBatchedSensorManager::accelerometerBatch not bound -!missing-selector! CMBatchedSensorManager::accelerometerDataFrequency not bound -!missing-selector! CMBatchedSensorManager::deviceMotionBatch not bound -!missing-selector! CMBatchedSensorManager::deviceMotionDataFrequency not bound -!missing-selector! CMBatchedSensorManager::isAccelerometerActive not bound -!missing-selector! CMBatchedSensorManager::isDeviceMotionActive not bound -!missing-selector! CMBatchedSensorManager::startAccelerometerUpdates not bound -!missing-selector! CMBatchedSensorManager::startAccelerometerUpdatesWithHandler: not bound -!missing-selector! CMBatchedSensorManager::startDeviceMotionUpdates not bound -!missing-selector! CMBatchedSensorManager::startDeviceMotionUpdatesWithHandler: not bound -!missing-selector! CMBatchedSensorManager::stopAccelerometerUpdates not bound -!missing-selector! CMBatchedSensorManager::stopDeviceMotionUpdates not bound -!missing-selector! CMHighFrequencyHeartRateData::confidence not bound -!missing-selector! CMHighFrequencyHeartRateData::date not bound -!missing-selector! CMHighFrequencyHeartRateData::heartRate not bound -!missing-selector! CMOdometerData::deltaAltitude not bound -!missing-selector! CMOdometerData::deltaDistance not bound -!missing-selector! CMOdometerData::deltaDistanceAccuracy not bound -!missing-selector! CMOdometerData::endDate not bound -!missing-selector! CMOdometerData::gpsDate not bound -!missing-selector! CMOdometerData::maxAbsSlope not bound -!missing-selector! CMOdometerData::originDevice not bound -!missing-selector! CMOdometerData::slope not bound -!missing-selector! CMOdometerData::speed not bound -!missing-selector! CMOdometerData::speedAccuracy not bound -!missing-selector! CMOdometerData::startDate not bound -!missing-selector! CMOdometerData::verticalAccuracy not bound -!missing-selector! CMWaterSubmersionManager::maximumDepth not bound -!missing-type! CMBatchedSensorManager not bound -!missing-type! CMHighFrequencyHeartRateData not bound -!missing-type! CMOdometerData not bound diff --git a/tests/xtro-sharpie/macOS-CoreMotion.ignore b/tests/xtro-sharpie/macOS-CoreMotion.ignore index 2717935754f5..bd7acb101edb 100644 --- a/tests/xtro-sharpie/macOS-CoreMotion.ignore +++ b/tests/xtro-sharpie/macOS-CoreMotion.ignore @@ -11,3 +11,10 @@ !missing-type! CMAmbientPressureData not bound !missing-type! CMRecordedRotationRateData not bound !missing-type! CMRotationRateData not bound + +# added in 13 and deprecated in 14 so we will just ignore them +!missing-selector! +CMStepCounter::isStepCountingAvailable not bound +!missing-selector! CMStepCounter::queryStepCountStartingFrom:to:toQueue:withHandler: not bound +!missing-selector! CMStepCounter::startStepCountingUpdatesToQueue:updateOn:withHandler: not bound +!missing-selector! CMStepCounter::stopStepCountingUpdates not bound +!missing-type! CMStepCounter not bound diff --git a/tests/xtro-sharpie/macOS-CoreMotion.todo b/tests/xtro-sharpie/macOS-CoreMotion.todo deleted file mode 100644 index d64b6cb5f72a..000000000000 --- a/tests/xtro-sharpie/macOS-CoreMotion.todo +++ /dev/null @@ -1,32 +0,0 @@ -!missing-enum! CMWaterSubmersionDepthState not bound -!missing-enum! CMWaterSubmersionState not bound -!missing-enum! CMOdometerOriginDevice not bound -!missing-protocol! CMHeadphoneMotionManagerDelegate not bound -!missing-selector! +CMHeadphoneMotionManager::authorizationStatus not bound -!missing-selector! +CMStepCounter::isStepCountingAvailable not bound -!missing-selector! CMHeadphoneMotionManager::delegate not bound -!missing-selector! CMHeadphoneMotionManager::deviceMotion not bound -!missing-selector! CMHeadphoneMotionManager::isDeviceMotionActive not bound -!missing-selector! CMHeadphoneMotionManager::isDeviceMotionAvailable not bound -!missing-selector! CMHeadphoneMotionManager::setDelegate: not bound -!missing-selector! CMHeadphoneMotionManager::startDeviceMotionUpdates not bound -!missing-selector! CMHeadphoneMotionManager::startDeviceMotionUpdatesToQueue:withHandler: not bound -!missing-selector! CMHeadphoneMotionManager::stopDeviceMotionUpdates not bound -!missing-selector! CMOdometerData::deltaAltitude not bound -!missing-selector! CMOdometerData::deltaDistance not bound -!missing-selector! CMOdometerData::deltaDistanceAccuracy not bound -!missing-selector! CMOdometerData::endDate not bound -!missing-selector! CMOdometerData::gpsDate not bound -!missing-selector! CMOdometerData::maxAbsSlope not bound -!missing-selector! CMOdometerData::originDevice not bound -!missing-selector! CMOdometerData::slope not bound -!missing-selector! CMOdometerData::speed not bound -!missing-selector! CMOdometerData::speedAccuracy not bound -!missing-selector! CMOdometerData::startDate not bound -!missing-selector! CMOdometerData::verticalAccuracy not bound -!missing-selector! CMStepCounter::queryStepCountStartingFrom:to:toQueue:withHandler: not bound -!missing-selector! CMStepCounter::startStepCountingUpdatesToQueue:updateOn:withHandler: not bound -!missing-selector! CMStepCounter::stopStepCountingUpdates not bound -!missing-type! CMHeadphoneMotionManager not bound -!missing-type! CMOdometerData not bound -!missing-type! CMStepCounter not bound diff --git a/tests/xtro-sharpie/watchOS-CoreMotion.todo b/tests/xtro-sharpie/watchOS-CoreMotion.todo deleted file mode 100644 index 992ea694707c..000000000000 --- a/tests/xtro-sharpie/watchOS-CoreMotion.todo +++ /dev/null @@ -1,37 +0,0 @@ -!missing-selector! +CMMovementDisorderManager::version not bound -!missing-enum! CMHighFrequencyHeartRateDataConfidence not bound -!missing-enum! CMOdometerOriginDevice not bound -!missing-selector! +CMBatchedSensorManager::authorizationStatus not bound -!missing-selector! +CMBatchedSensorManager::isAccelerometerSupported not bound -!missing-selector! +CMBatchedSensorManager::isDeviceMotionSupported not bound -!missing-selector! CMBatchedSensorManager::accelerometerBatch not bound -!missing-selector! CMBatchedSensorManager::accelerometerDataFrequency not bound -!missing-selector! CMBatchedSensorManager::deviceMotionBatch not bound -!missing-selector! CMBatchedSensorManager::deviceMotionDataFrequency not bound -!missing-selector! CMBatchedSensorManager::isAccelerometerActive not bound -!missing-selector! CMBatchedSensorManager::isDeviceMotionActive not bound -!missing-selector! CMBatchedSensorManager::startAccelerometerUpdates not bound -!missing-selector! CMBatchedSensorManager::startAccelerometerUpdatesWithHandler: not bound -!missing-selector! CMBatchedSensorManager::startDeviceMotionUpdates not bound -!missing-selector! CMBatchedSensorManager::startDeviceMotionUpdatesWithHandler: not bound -!missing-selector! CMBatchedSensorManager::stopAccelerometerUpdates not bound -!missing-selector! CMBatchedSensorManager::stopDeviceMotionUpdates not bound -!missing-selector! CMHighFrequencyHeartRateData::confidence not bound -!missing-selector! CMHighFrequencyHeartRateData::date not bound -!missing-selector! CMHighFrequencyHeartRateData::heartRate not bound -!missing-selector! CMOdometerData::deltaAltitude not bound -!missing-selector! CMOdometerData::deltaDistance not bound -!missing-selector! CMOdometerData::deltaDistanceAccuracy not bound -!missing-selector! CMOdometerData::endDate not bound -!missing-selector! CMOdometerData::gpsDate not bound -!missing-selector! CMOdometerData::maxAbsSlope not bound -!missing-selector! CMOdometerData::originDevice not bound -!missing-selector! CMOdometerData::slope not bound -!missing-selector! CMOdometerData::speed not bound -!missing-selector! CMOdometerData::speedAccuracy not bound -!missing-selector! CMOdometerData::startDate not bound -!missing-selector! CMOdometerData::verticalAccuracy not bound -!missing-selector! CMWaterSubmersionManager::maximumDepth not bound -!missing-type! CMBatchedSensorManager not bound -!missing-type! CMHighFrequencyHeartRateData not bound -!missing-type! CMOdometerData not bound From b9afed323f12e5618a4ab40820f8c3db8d22d5c0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Fri, 1 Sep 2023 19:46:36 +0000 Subject: [PATCH 2/3] Auto-format source code --- src/coremotion.cs | 73 ++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/src/coremotion.cs b/src/coremotion.cs index d921956ba014..0cd53e4b91b3 100644 --- a/src/coremotion.cs +++ b/src/coremotion.cs @@ -483,10 +483,9 @@ public enum CMAuthorizationStatus : long { Authorized, } - [Watch (8,4), iOS (15,4), MacCatalyst (15,4), TV (15,4)] + [Watch (8, 4), iOS (15, 4), MacCatalyst (15, 4), TV (15, 4)] [Native] - public enum CMOdometerOriginDevice : long - { + public enum CMOdometerOriginDevice : long { Unknown = 0, Local, Remote, @@ -701,10 +700,9 @@ public enum CMDeviceMotionSensorLocation : long { HeadphoneRight, } - [Watch (10,0), NoTV, NoMac, iOS (17,0), MacCatalyst (17,0)] + [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Native] - public enum CMHighFrequencyHeartRateDataConfidence : long - { + public enum CMHighFrequencyHeartRateDataConfidence : long { Low = 0, Medium, High, @@ -720,7 +718,7 @@ public enum CMHighFrequencyHeartRateDataConfidence : long [iOS (14, 0)] [Watch (7, 0)] [MacCatalyst (14, 0)] - [Mac (13,0)] + [Mac (13, 0)] [BaseType (typeof (NSObject))] interface CMHeadphoneMotionManager { @@ -759,7 +757,7 @@ interface ICMHeadphoneMotionManagerDelegate { } [iOS (14, 0)] [Watch (7, 0)] [MacCatalyst (14, 0)] - [Mac (13,0)] + [Mac (13, 0)] #if NET [Protocol, Model] #else @@ -903,7 +901,7 @@ interface CMRecordedPressureData { NSDate StartDate { get; } } - [Mac (13,0), iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] [Native] public enum CMWaterSubmersionState : long { Unknown = 0, @@ -911,7 +909,7 @@ public enum CMWaterSubmersionState : long { Submerged, } - [Mac (13,0), iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] [Native] public enum CMWaterSubmersionDepthState : long { Unknown = 0, @@ -923,7 +921,7 @@ public enum CMWaterSubmersionDepthState : long { SensorDepthError = 600, } - [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] [BaseType (typeof (NSObject))] interface CMWaterSubmersionEvent : NSSecureCoding, NSCopying { [Export ("date")] @@ -933,7 +931,7 @@ interface CMWaterSubmersionEvent : NSSecureCoding, NSCopying { CMWaterSubmersionState State { get; } } - [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] [BaseType (typeof (NSObject))] interface CMWaterSubmersionMeasurement : NSSecureCoding, NSCopying { [Export ("date")] @@ -952,7 +950,7 @@ interface CMWaterSubmersionMeasurement : NSSecureCoding, NSCopying { CMWaterSubmersionDepthState SubmersionState { get; } } - [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] [BaseType (typeof (NSObject))] interface CMWaterTemperature : NSSecureCoding, NSCopying { [Export ("date")] @@ -967,7 +965,7 @@ interface CMWaterTemperature : NSSecureCoding, NSCopying { interface ICMWaterSubmersionManagerDelegate { } - [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] #if NET [Protocol, Model] #else @@ -992,7 +990,7 @@ interface CMWaterSubmersionManagerDelegate { void ErrorOccurred (CMWaterSubmersionManager manager, NSError error); } - [NoMac, iOS (16,0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] [BaseType (typeof (NSObject))] interface CMWaterSubmersionManager { [Wrap ("WeakDelegate")] @@ -1014,10 +1012,9 @@ interface CMWaterSubmersionManager { NSMeasurement MaximumDepth { get; } } - [Watch (10,0), NoMac, iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(NSObject))] - interface CMBatchedSensorManager - { + [Watch (10, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] + interface CMBatchedSensorManager { [Static] [Export ("authorizationStatus")] CMAuthorizationStatus AuthorizationStatus { get; } @@ -1033,7 +1030,7 @@ interface CMBatchedSensorManager nint AccelerometerDataFrequency { get; } [NullAllowed, Export ("accelerometerBatch")] - CMAccelerometerData[] AccelerometerBatch { get; } + CMAccelerometerData [] AccelerometerBatch { get; } [Export ("startAccelerometerUpdates")] void StartAccelerometerUpdates (); @@ -1055,7 +1052,7 @@ interface CMBatchedSensorManager bool DeviceMotionActive { [Bind ("isDeviceMotionActive")] get; } [NullAllowed, Export ("deviceMotionBatch")] - CMDeviceMotion[] DeviceMotionBatch { get; } + CMDeviceMotion [] DeviceMotionBatch { get; } [Export ("startDeviceMotionUpdates")] void StartDeviceMotionUpdates (); @@ -1067,63 +1064,61 @@ interface CMBatchedSensorManager void StopDeviceMotionUpdates (); } - [Mac (14,0), MacCatalyst (13, 1)] - [BaseType (typeof(NSObject))] - interface CMOdometerData : NSSecureCoding, NSCopying - { + [Mac (14, 0), MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + interface CMOdometerData : NSSecureCoding, NSCopying { [Export ("startDate", ArgumentSemantic.Strong)] NSDate StartDate { get; } [Export ("endDate", ArgumentSemantic.Strong)] NSDate EndDate { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("deltaDistance")] double DeltaDistance { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("deltaDistanceAccuracy")] double DeltaDistanceAccuracy { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("speed")] double Speed { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("speedAccuracy")] double SpeedAccuracy { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("gpsDate", ArgumentSemantic.Strong)] NSDate GpsDate { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("deltaAltitude")] double DeltaAltitude { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("verticalAccuracy")] double VerticalAccuracy { get; } - [Watch (8, 4), iOS (15, 4), MacCatalyst (15,4)] + [Watch (8, 4), iOS (15, 4), MacCatalyst (15, 4)] [Export ("originDevice", ArgumentSemantic.Assign)] CMOdometerOriginDevice OriginDevice { get; } - [Watch (8, 4), iOS (15, 4), MacCatalyst (15,4)] + [Watch (8, 4), iOS (15, 4), MacCatalyst (15, 4)] [NullAllowed] [Export ("slope", ArgumentSemantic.Strong)] NSNumber Slope { get; } - [Watch (8, 4), iOS (15, 4), MacCatalyst (15,4)] + [Watch (8, 4), iOS (15, 4), MacCatalyst (15, 4)] [NullAllowed] [Export ("maxAbsSlope", ArgumentSemantic.Strong)] NSNumber MaxAbsSlope { get; } } - [Watch (10,0), NoTV, NoMac, iOS (17,0), MacCatalyst (17,0)] - [BaseType (typeof(CMLogItem))] - interface CMHighFrequencyHeartRateData - { + [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (CMLogItem))] + interface CMHighFrequencyHeartRateData { [Export ("heartRate")] double HeartRate { get; } From 8e9728b8a2f9be505b7af348bc424288458fde27 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Sun, 3 Sep 2023 12:53:47 -0400 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Alex Soto --- src/coremotion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coremotion.cs b/src/coremotion.cs index 0cd53e4b91b3..03d552c0c1a3 100644 --- a/src/coremotion.cs +++ b/src/coremotion.cs @@ -1036,7 +1036,7 @@ interface CMBatchedSensorManager { void StartAccelerometerUpdates (); [Export ("startAccelerometerUpdatesWithHandler:")] - void StartAccelerometerUpdates (Action, NSError> handler); + void StartAccelerometerUpdates (Action handler); [Export ("stopAccelerometerUpdates")] void StopAccelerometerUpdates (); @@ -1058,7 +1058,7 @@ interface CMBatchedSensorManager { void StartDeviceMotionUpdates (); [Export ("startDeviceMotionUpdatesWithHandler:")] - void StartDeviceMotionUpdates (Action, NSError> handler); + void StartDeviceMotionUpdates (Action handler); [Export ("stopDeviceMotionUpdates")] void StopDeviceMotionUpdates ();