From 15952065416d8122bfea068d18fe5a3bf8f736a4 Mon Sep 17 00:00:00 2001 From: Timothy Risi Date: Wed, 4 Oct 2017 21:48:53 -0800 Subject: [PATCH] [HealthKit] Bind Xcode 9 APIs (#2817) * [HealthKit] Update to Xcode 9 GM * Add new xcode 9 beta APIs * Fix PR comments Marking SyncVersion as an int based on SpeedySloth sample from Apple: guard let version = route.metadata?[HKMetadataKeySyncVersion] as? NSNumber else { print("Route does not have a sync version for route \(route)") return } if version.intValue == 1 { self.makeWorkoutRouteSlothy(workout: workout, route: route) } * Didn't save after deleting the FIXME * Fix build issue * Fix introspection tests * Add new enum values to HKQuantityType.ToKey * QuantityTypeIdentifierTest needs xcode version check for new enum types --- src/HealthKit/Enums.cs | 37 +++ src/HealthKit/HKObjectType.cs | 6 + src/healthkit.cs | 244 +++++++++++++++++- tests/introspection/ApiTypoTest.cs | 9 +- tests/introspection/iOS/iOSApiProtocolTest.cs | 8 + .../HealthKit/QuantityTypeIdentifierTest.cs | 5 + 6 files changed, 304 insertions(+), 5 deletions(-) diff --git a/src/HealthKit/Enums.cs b/src/HealthKit/Enums.cs index 6be1f01712..7e65e6b7c4 100644 --- a/src/HealthKit/Enums.cs +++ b/src/HealthKit/Enums.cs @@ -240,6 +240,10 @@ namespace XamCore.HealthKit DistanceSwimming, [iOS (10,0), Watch (3,0)] SwimmingStrokeCount, + [iOS (11,0), Watch (4,0)] + WaistCircumference, + [iOS (11, 0), Watch (4, 0)] + VO2Max, } // Convenience enum, ObjC uses NSString @@ -318,6 +322,7 @@ namespace XamCore.HealthKit Lacrosse, MartialArts, MindAndBody, + [Availability (Deprecated = Platform.iOS_11_0 | Platform.Watch_4_0, Message = "Use 'MixedCardio' or 'HighIntensityIntervalTraining' instead.")] MixedMetabolicCardioTraining, PaddleSports, Play, @@ -374,6 +379,12 @@ namespace XamCore.HealthKit WheelchairWalkPace, [iOS (10,0), Watch (3,0)] WheelchairRunPace, + [iOS (11,0), Watch (4,0)] + TaiChi, + [iOS (11, 0), Watch (4, 0)] + MixedCardio, + [iOS (11, 0), Watch (4, 0)] + HandCycling, [iOS (8,2)] Other = 3000 } @@ -392,6 +403,10 @@ namespace XamCore.HealthKit MotionPaused, [iOS (10,0), Watch (3,0)] MotionResumed, + [iOS (11, 0), Watch (4, 0)] + Segment, + [iOS (11, 0), Watch (4, 0)] + PauseOrResumeRequest, } [Watch (2,0)] @@ -514,4 +529,26 @@ namespace XamCore.HealthKit Breaststroke, Butterfly, } + + [Watch (4, 0), iOS (11, 0)] + [Native] + public enum HKInsulinDeliveryReason : nint { + Asal = 1, + Olus, + } + + [Watch (4, 0), iOS (11, 0)] + [Native] + public enum HKBloodGlucoseMealTime : nint { + Reprandial = 1, + Ostprandial, + } + + [Watch (4, 0), iOS (11, 0)] + [Native] + public enum HKVO2MaxTestType : nint { + MaxExercise = 1, + PredictionSubMaxExercise, + PredictionNonExercise, + } } diff --git a/src/HealthKit/HKObjectType.cs b/src/HealthKit/HKObjectType.cs index 5e56d51cd9..9594c1908d 100644 --- a/src/HealthKit/HKObjectType.cs +++ b/src/HealthKit/HKObjectType.cs @@ -238,6 +238,12 @@ namespace XamCore.HealthKit case HKQuantityTypeIdentifier.UVExposure: return HKQuantityTypeIdentifierKey.UVExposure; + + case HKQuantityTypeIdentifier.WaistCircumference: + return HKQuantityTypeIdentifierKey.WaistCircumference; + + case HKQuantityTypeIdentifier.VO2Max: + return HKQuantityTypeIdentifierKey.VO2Max; } return null; } diff --git a/src/healthkit.cs b/src/healthkit.cs index 93b3db473e..ce8edb24d0 100644 --- a/src/healthkit.cs +++ b/src/healthkit.cs @@ -13,6 +13,7 @@ using XamCore.ObjCRuntime; using XamCore.Foundation; using System; using System.ComponentModel; +using XamCore.CoreLocation; namespace XamCore.HealthKit { @@ -60,6 +61,15 @@ namespace XamCore.HealthKit { Paused, } + [iOS (11,0)] + [Watch (4,0)] + [Native] + public enum HKHeartRateMotionContext : nint { + NotSet = 0, + Sedentary, + Active, + } + delegate void HKAnchoredObjectResultHandler2 (HKAnchoredObjectQuery query, HKSample[] results, nuint newAnchor, NSError error); #if XAMCORE_2_0 [Obsolete ("Use HKAnchoredObjectResultHandler2 instead")] @@ -70,6 +80,8 @@ namespace XamCore.HealthKit { delegate void HKAnchoredObjectUpdateHandler (HKAnchoredObjectQuery query, HKSample[] addedObjects, HKDeletedObject[] deletedObjects, HKQueryAnchor newAnchor, NSError error); + delegate void HKWorkoutRouteBuilderDataHandler (HKWorkoutRouteQuery query, CLLocation [] routeData, bool done, NSError error); + [Watch (2,0)] [iOS (8,0)] [BaseType (typeof (HKQuery))] @@ -173,6 +185,10 @@ namespace XamCore.HealthKit { [Watch (3,0), iOS (10,0)] [Field ("HKPredicateKeyPathCDACustodianName")] NSString CdaCustodianName { get; } + + [Watch (4, 0), iOS (11, 0)] + [Field ("HKPredicateKeyPathWorkoutTotalFlightsClimbed")] + NSString TotalFlightsClimbed { get; } } [NoWatch] // headers says it's available but it's only usable from another, unavailable, type @@ -586,6 +602,30 @@ namespace XamCore.HealthKit { [Watch (3,0), iOS (10,0)] [Export ("SwimmingStrokeStyle")] NSString SwimmingStrokeStyle { get; } + + [Watch (4, 0), iOS (11, 0)] + [Export ("SyncIdentifier")] + string SyncIdentifier { get; } + + [Watch (4, 0), iOS (11, 0)] + [Export ("SyncVersion")] + int SyncVersion { get; } + + [Watch (4, 0), iOS (11, 0)] + [Export ("InsulinDeliveryReason")] + HKInsulinDeliveryReason InsulinDeliveryReason { get; } + + [Watch (4, 0), iOS (11, 0)] + [Export ("BloodGlucoseMealTime")] + HKBloodGlucoseMealTime BloodGlucoseMealTime { get; } + + [Watch (4, 0), iOS (11, 0)] + [Export ("VO2MaxTestType")] + HKVO2MaxTestType VO2MaxTestType { get; } + + [Watch (4,0), iOS (11,0)] + [Export ("HeartRateMotionContext")] + HKHeartRateMotionContext HeartRateMotionContext { get; } } [Watch (2,0)] @@ -680,6 +720,30 @@ namespace XamCore.HealthKit { [Watch (3,0), iOS (10,0)] [Field ("HKMetadataKeySwimmingStrokeStyle")] NSString SwimmingStrokeStyle { get; } + + [Watch (4, 0), iOS (11, 0)] + [Field ("HKMetadataKeySyncIdentifier")] + NSString SyncIdentifier { get; } + + [Watch (4, 0), iOS (11, 0)] + [Field ("HKMetadataKeySyncVersion")] + NSString SyncVersion { get; } + + [Watch (4, 0), iOS (11, 0)] + [Field ("HKMetadataKeyInsulinDeliveryReason")] + NSString InsulinDeliveryReason { get; } + + [Watch (4, 0), iOS (11, 0)] + [Field ("HKMetadataKeyBloodGlucoseMealTime")] + NSString BloodGlucoseMealTime { get; } + + [Watch (4, 0), iOS (11, 0)] + [Field ("HKMetadataKeyVO2MaxTestType")] + NSString VO2MaxTestType { get; } + + [Watch (4,0), iOS (11,0)] + [Field ("HKMetadataKeyHeartRateMotionContext")] + NSString HeartRateMotionContext { get; } } [Watch (2,0)] @@ -783,6 +847,12 @@ namespace XamCore.HealthKit { [Static] [Export ("activitySummaryType")] HKActivitySummaryType ActivitySummaryType { get; } + + [Watch (4, 0), iOS (11, 0)] + [Static] + [Export ("seriesTypeForIdentifier:")] + [return: NullAllowed] + HKSeriesType GetSeriesType (string identifier); } [Watch (2,0)] @@ -1008,6 +1078,11 @@ namespace XamCore.HealthKit { [Export ("predicateForWorkoutsWithOperatorType:totalSwimmingStrokeCount:")] NSPredicate GetPredicateForTotalSwimmingStrokeCount (NSPredicateOperatorType operatorType, HKQuantity totalSwimmingStrokeCount); + [Watch (4, 0), iOS (11, 0)] + [Static] + [Export ("predicateForWorkoutsWithOperatorType:totalFlightsClimbed:")] + NSPredicate GetPredicateForTotalFlightsClimbed (NSPredicateOperatorType operatorType, HKQuantity totalFlightsClimbed); + // HKActivitySummaryPredicates [iOS (9,3), Watch (2,2)] @@ -1304,6 +1379,18 @@ namespace XamCore.HealthKit { [Field ("HKQuantityTypeIdentifierRespiratoryRate")] NSString RespiratoryRate { get; } + [iOS (11,0), Watch (4,0)] + [Field ("HKQuantityTypeIdentifierRestingHeartRate")] + NSString RestingHeartRate { get; } + + [iOS (11,0), Watch (4,0)] + [Field ("HKQuantityTypeIdentifierWalkingHeartRateAverage")] + NSString WalkingHeartRateAverage { get; } + + [iOS (11,0), Watch (4,0)] + [Field ("HKQuantityTypeIdentifierHeartRateVariabilitySDNN")] + NSString HeartRateVariabilitySdnn { get; } + [Field ("HKQuantityTypeIdentifierBodyTemperature")] NSString BodyTemperature { get; } @@ -1434,7 +1521,15 @@ namespace XamCore.HealthKit { [Field ("HKQuantityTypeIdentifierUVExposure")] NSString UVExposure { get; } - // If you add field, add them to the enum too. + [Watch (4, 0), iOS (11, 0)] + [Field ("HKQuantityTypeIdentifierWaistCircumference")] + NSString WaistCircumference { get; } + + [Watch (4, 0), iOS (11, 0)] + [Field ("HKQuantityTypeIdentifierVO2Max")] + NSString VO2Max { get; } + + // If you add field, add them to the enum too. } [Watch (2,0)] @@ -1700,6 +1795,7 @@ namespace XamCore.HealthKit { [Export ("jouleUnit")] HKUnit Joule { get; } + [Availability (Deprecated = Platform.iOS_11_0 | Platform.Watch_4_0, Message = "Use 'SmallCalorie' or 'LargeCalorie' instead.")] [Static] [Export ("calorieUnit")] HKUnit Calorie { get; } @@ -1708,6 +1804,16 @@ namespace XamCore.HealthKit { [Export ("kilocalorieUnit")] HKUnit Kilocalorie { get; } + [Watch (4, 0), iOS (11, 0)] + [Static] + [Export ("smallCalorieUnit")] + HKUnit SmallCalorie { get; } + + [Watch (4, 0), iOS (11, 0)] + [Static] + [Export ("largeCalorieUnit")] + HKUnit LargeCalorie { get; } + // HKUnit (Temperature) Category [Static] @@ -1755,6 +1861,12 @@ namespace XamCore.HealthKit { [Export ("reciprocalUnit")] HKUnit ReciprocalUnit (); + + // HKUnit (Pharmacology) Category + [Watch (4, 0), iOS (11, 0)] + [Static] + [Export ("internationalUnit")] + HKUnit InternationalUnit { get; } } [Watch (2,0)] @@ -1828,6 +1940,16 @@ namespace XamCore.HealthKit { [Wrap ("Create (workoutActivityType, startDate, endDate, workoutEvents, totalEnergyBurned, totalDistance, totalSwimmingStrokeCount, device, metadata == null ? null : metadata.Dictionary)")] HKWorkout Create (HKWorkoutActivityType workoutActivityType, NSDate startDate, NSDate endDate, HKWorkoutEvent[] workoutEvents, HKQuantity totalEnergyBurned, HKQuantity totalDistance, HKQuantity totalSwimmingStrokeCount, HKDevice device, HKMetadata metadata); + [Watch (4, 0), iOS (11, 0)] + [Static] + [Export ("workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalFlightsClimbed:device:metadata:")] + HKWorkout CreateFlightsClimbedWorkout (HKWorkoutActivityType workoutActivityType, NSDate startDate, NSDate endDate, [NullAllowed] HKWorkoutEvent [] workoutEvents, [NullAllowed] HKQuantity totalEnergyBurned, [NullAllowed] HKQuantity totalDistance, [NullAllowed] HKQuantity totalFlightsClimbed, [NullAllowed] HKDevice device, [NullAllowed] NSDictionary metadata); + + [Watch (4, 0), iOS (11, 0)] + [Static] + [Wrap ("CreateFlightsClimbedWorkout (workoutActivityType, startDate, endDate, workoutEvents, totalEnergyBurned, totalDistance, totalFlightsClimbed, device, metadata == null ? null : metadata.Dictionary)")] + HKWorkout CreateFlightsClimbedWorkout (HKWorkoutActivityType workoutActivityType, NSDate startDate, NSDate endDate, [NullAllowed] HKWorkoutEvent [] workoutEvents, [NullAllowed] HKQuantity totalEnergyBurned, [NullAllowed] HKQuantity totalDistance, [NullAllowed] HKQuantity totalFlightsClimbed, [NullAllowed] HKDevice device, [NullAllowed] HKMetadata metadata); + // TODO: where is this thing used? [Field ("HKWorkoutSortIdentifierDuration")] NSString SortIdentifierDuration { get; } @@ -1843,6 +1965,14 @@ namespace XamCore.HealthKit { [Watch (3,0), iOS (10,0)] [Field ("HKWorkoutSortIdentifierTotalSwimmingStrokeCount")] NSString SortIdentifierTotalSwimmingStrokeCount { get; } + + [Watch (4, 0), iOS (11, 0)] + [Field ("HKWorkoutSortIdentifierTotalFlightsClimbed")] + NSString SortIdentifierTotalFlightsClimbed { get; } + + [Watch (4, 0), iOS (11, 0)] + [NullAllowed, Export ("totalFlightsClimbed", ArgumentSemantic.Strong)] + HKQuantity TotalFlightsClimbed { get; } } [Watch (2,0)] @@ -1853,6 +1983,7 @@ namespace XamCore.HealthKit { [Export ("type")] HKWorkoutEventType Type { get; } + [Availability (Deprecated = Platform.iOS_11_0 | Watch_4_0, Message = "Use 'DateInterval' instead.")] [Export ("date", ArgumentSemantic.Copy)] NSDate Date { get; } @@ -1864,19 +1995,34 @@ namespace XamCore.HealthKit { [Wrap ("WeakMetadata")] HKMetadata Metadata { get; } + [Availability (Deprecated = Platform.iOS_11_0 | Platform.Watch_4_0, Message = "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] [Static, Export ("workoutEventWithType:date:")] HKWorkoutEvent Create (HKWorkoutEventType type, NSDate date); - [Watch (3,0), iOS (10,0)] + [Availability (Introduced = Platform.iOS_10_0 | Platform.Watch_3_0, Deprecated = Platform.iOS_11_0 | Platform.Watch_4_0, Message = "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] [Static] [EditorBrowsable (EditorBrowsableState.Advanced)] // this is not the one we want to be seen (compat only) [Export ("workoutEventWithType:date:metadata:")] HKWorkoutEvent Create (HKWorkoutEventType type, NSDate date, NSDictionary metadata); - [Watch (3,0), iOS (10,0)] + [Availability (Introduced = Platform.iOS_10_0 | Platform.Watch_3_0, Deprecated = Platform.iOS_11_0 | Platform.Watch_4_0, Message = "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] [Static] [Wrap ("Create (type, date, metadata != null ? metadata.Dictionary : null)")] HKWorkoutEvent Create (HKWorkoutEventType type, NSDate date, HKMetadata metadata); + + [Watch (4, 0), iOS (11, 0)] + [Static] + [Export ("workoutEventWithType:dateInterval:metadata:")] + HKWorkoutEvent Create (HKWorkoutEventType type, NSDateInterval dateInterval, [NullAllowed] NSDictionary metadata); + + [Watch (4, 0), iOS (11, 0)] + [Static] + [Wrap ("Create (type, dateInterval, metadata != null ? metadata.Dictionary : null)")] + HKWorkoutEvent Create (HKWorkoutEventType type, NSDateInterval dateInterval, HKMetadata metadata); + + [Watch (4, 0), iOS (11, 0)] + [Export ("dateInterval", ArgumentSemantic.Copy)] + NSDateInterval DateInterval { get; } } [Watch (2,0)] @@ -1895,6 +2041,14 @@ namespace XamCore.HealthKit { interface HKDeletedObject : NSSecureCoding { [Export ("UUID", ArgumentSemantic.Strong)] NSUuid Uuid { get; } + + [Watch (4, 0), iOS (11, 0)] + [NullAllowed, Export ("metadata", ArgumentSemantic.Copy)] + NSDictionary WeakMetadata { get; } + + [Watch (4, 0), iOS (11, 0)] + [Wrap ("WeakMetadata")] + HKMetadata Metadata { get; } } [Watch (2,0)] @@ -2010,6 +2164,32 @@ namespace XamCore.HealthKit { [Export ("initWithSource:version:")] IntPtr Constructor (HKSource source, [NullAllowed] string version); + + [Watch (4, 0), iOS (11, 0)] + [NullAllowed, Export ("productType")] + string ProductType { get; } + + [Watch (4, 0), iOS (11, 0)] + [Export ("operatingSystemVersion", ArgumentSemantic.Assign)] + NSOperatingSystemVersion OperatingSystemVersion { get; } + + [Watch (4, 0), iOS (11, 0)] + [Export ("initWithSource:version:productType:operatingSystemVersion:")] + IntPtr Constructor (HKSource source, [NullAllowed] string version, [NullAllowed] string productType, NSOperatingSystemVersion operatingSystemVersion); + } + + interface HKSourceRevisionInfo { + [Watch (4, 0), iOS (11, 0)] + [Field ("HKSourceRevisionAnyVersion")] + NSString AnyVersion { get; } + + [Watch (4, 0), iOS (11, 0)] + [Field ("HKSourceRevisionAnyProductType")] + NSString AnyProductType { get; } + + [Watch (4, 0), iOS (11, 0)] + [Export ("HKSourceRevisionAnyOperatingSystem")] + NSOperatingSystemVersion AnyOperatingSystem { get; } } [Watch (2,0)] @@ -2142,4 +2322,62 @@ namespace XamCore.HealthKit { [NullAllowed, Export ("lapLength", ArgumentSemantic.Copy)] HKQuantity LapLength { get; set; } } + + [Watch (4, 0), iOS (11, 0)] + [BaseType (typeof (HKSampleType))] + [DisableDefaultCtor] + interface HKSeriesType { + [Static] + [Export ("workoutRouteType")] + HKSeriesType WorkoutRouteType { get; } + } + + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface HKSeriesBuilder { + [Export ("discard")] + void Discard (); + } + + [BaseType (typeof(HKSample))] + [DisableDefaultCtor] + interface HKSeriesSample : NSCopying { + [Export ("count")] + nuint Count { get; } + } + + [BaseType (typeof(HKSeriesSample))] + [DisableDefaultCtor] + interface HKWorkoutRoute : NSCopying { + [Watch (4, 0), iOS (11, 0)] + [Field ("HKWorkoutRouteTypeIdentifier")] + NSString TypeIdentifier { get; } + } + + [Watch (4, 0), iOS (11, 0)] + [BaseType (typeof (HKSeriesBuilder))] + [DisableDefaultCtor] + interface HKWorkoutRouteBuilder { + [Export ("initWithHealthStore:device:")] + [DesignatedInitializer] + IntPtr Constructor (HKHealthStore healthStore, [NullAllowed] HKDevice device); + + [Async, Export ("insertRouteData:completion:")] + void InsertRouteData (CLLocation [] routeData, Action completion); + + [Async, Protected, Export ("finishRouteWithWorkout:metadata:completion:")] + void FinishRoute (HKWorkout workout, [NullAllowed] NSDictionary metadata, Action completion); + + [Async, Wrap ("FinishRoute (workout, metadata != null ? metadata.Dictionary : null, completion)")] + void FinishRoute (HKWorkout workout, HKMetadata metadata, Action completion); + } + + [Watch (4,0), iOS (11,0)] + [BaseType (typeof(HKQuery))] + interface HKWorkoutRouteQuery { + [Export ("initWithRoute:dataHandler:")] + [DesignatedInitializer] + IntPtr Constructor (HKWorkoutRoute workoutRoute, HKWorkoutRouteBuilderDataHandler dataHandler); + } + } diff --git a/tests/introspection/ApiTypoTest.cs b/tests/introspection/ApiTypoTest.cs index 8254214f25..c4430c865c 100644 --- a/tests/introspection/ApiTypoTest.cs +++ b/tests/introspection/ApiTypoTest.cs @@ -70,7 +70,7 @@ namespace Introspection "MacAttribute", }; - HashSet allowed = new HashSet () { + HashSet allowed = new HashSet() { "Aac", "Accurracy", "Achivements", @@ -88,6 +88,7 @@ namespace Introspection "Anglet", "Arraycollation", "Argb", + "Asal", "Asin", "Atan", "Ats", // App Transport Security @@ -175,7 +176,7 @@ namespace Introspection "Ecdh", // Elliptic Curve Diffie–Hellman "Ecdsa", // Elliptic Curve Digital Signature Algorithm "Ecies", // Elliptic Curve Integrated Encryption Scheme - "Editability", + "Editability", "Eof", // acronym End-Of-File "Emagic", "Emaili", @@ -303,8 +304,10 @@ namespace Introspection "Ocurrences", "Octree", "Oid", + "Olus", "Oneup", // TVElementKeyOneupTemplate "Orthographyrange", + "Ostprandial", "ove", "Paeth", // PNG filter "Parms", // short for Parameters @@ -339,6 +342,7 @@ namespace Introspection "Reacquirer", "Reinvitation", "Reinvite", + "Reprandial", "Replayable", "Requestwith", "Ridesharing", @@ -358,6 +362,7 @@ namespace Introspection "Scn", "Sdk", "Sdtv", // acronym: Standard Definition Tele Vision + "Sdnn", "Seekable", "Shadable", "Sharegroup", diff --git a/tests/introspection/iOS/iOSApiProtocolTest.cs b/tests/introspection/iOS/iOSApiProtocolTest.cs index 6c11bef935..194afa65ed 100644 --- a/tests/introspection/iOS/iOSApiProtocolTest.cs +++ b/tests/introspection/iOS/iOSApiProtocolTest.cs @@ -214,6 +214,10 @@ namespace Introspection { case "FPUIActionExtensionContext": // Conformance not in headers case "UIDocumentBrowserAction": // Conformance not in headers return true; + // Header shows implementing NSSecureCoding, but supportsSecureCoding returns false. Radar #34800025 + case "HKSeriesBuilder": + case "HKWorkoutRouteBuilder": + return true; #if __WATCHOS__ case "CLKComplicationTemplate": case "CLKComplicationTemplateCircularSmallRingImage": @@ -355,6 +359,10 @@ namespace Introspection { case "FPUIActionExtensionContext": // Conformance not in headers case "UIDocumentBrowserAction": // Conformance not in headers return true; + // Header shows implementing NSSecureCoding, but supportsSecureCoding returns false. Radar #34800025 + case "HKSeriesBuilder": + case "HKWorkoutRouteBuilder": + return true; #if __WATCHOS__ case "CLKComplicationTemplate": case "CLKComplicationTemplateCircularSmallRingImage": diff --git a/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs b/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs index 4e63a5ebf3..3766ad5fb1 100644 --- a/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs +++ b/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs @@ -54,6 +54,11 @@ namespace MonoTouchFixtures.HealthKit { if (!TestRuntime.CheckXcodeVersion (8, 0)) continue; break; + case HKQuantityTypeIdentifier.WaistCircumference: + case HKQuantityTypeIdentifier.VO2Max: + if (!TestRuntime.CheckXcodeVersion(9, 0)) + continue; + break; } try {