From b59b608a7e8c021ee02d8895d93bc10b656c4e78 Mon Sep 17 00:00:00 2001 From: Vincent Dondain Date: Tue, 29 Jan 2019 13:07:48 -0500 Subject: [PATCH] [healthkit] Update for Xcode 10.2 beta 1 (#5497) - Fix `CategoryTypeIdentifierTest` for 10.2 APIs --- src/healthkit.cs | 20 +++++++++++++++++++ .../HealthKit/CategoryTypeIdentifierTest.cs | 6 ++++++ tests/xtro-sharpie/iOS-HealthKit.todo | 4 ---- tests/xtro-sharpie/watchOS-HealthKit.todo | 4 ---- 4 files changed, 26 insertions(+), 8 deletions(-) delete mode 100644 tests/xtro-sharpie/iOS-HealthKit.todo delete mode 100644 tests/xtro-sharpie/watchOS-HealthKit.todo diff --git a/src/healthkit.cs b/src/healthkit.cs index 667b38a3b1..edb491e608 100644 --- a/src/healthkit.cs +++ b/src/healthkit.cs @@ -687,6 +687,10 @@ namespace HealthKit { [Watch (5, 0), iOS (12, 0)] [Export ("CrossTrainerDistance")] HKQuantity CrossTrainerDistance { get; set; } + + [Watch (5, 2), iOS (12, 2)] + [Export ("HeartRateEventThreshold")] + HKQuantity HeartRateEventThreshold { get; set; } } [Watch (2,0)] @@ -837,6 +841,10 @@ namespace HealthKit { [Watch (5, 0), iOS (12, 0)] [Field ("HKMetadataKeyCrossTrainerDistance")] NSString CrossTrainerDistance { get; } + + [Watch (5, 2), iOS (12, 2)] + [Field ("HKMetadataKeyHeartRateEventThreshold")] + NSString HeartRateEventThreshold { get; } } [Watch (2,0)] @@ -1740,6 +1748,18 @@ namespace HealthKit { [iOS (10,0), Watch (3,0)] [Field ("HKCategoryTypeIdentifierMindfulSession")] MindfulSession, + + [Watch (5,2), iOS (12,2)] + [Field ("HKCategoryTypeIdentifierHighHeartRateEvent")] + HighHeartRateEvent, + + [Watch (5,2), iOS (12,2)] + [Field ("HKCategoryTypeIdentifierLowHeartRateEvent")] + LowHeartRateEvent, + + [Watch (5,2), iOS (12,2)] + [Field ("HKCategoryTypeIdentifierIrregularHeartRhythmEvent")] + IrregularHeartRhythmEvent, } [Watch (2,0)] diff --git a/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs b/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs index bc185d840a..4f849496cf 100644 --- a/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs +++ b/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs @@ -42,6 +42,12 @@ namespace MonoTouchFixtures.HealthKit { if (!TestRuntime.CheckXcodeVersion (8, 0)) continue; break; + case HKCategoryTypeIdentifier.HighHeartRateEvent: + case HKCategoryTypeIdentifier.LowHeartRateEvent: + case HKCategoryTypeIdentifier.IrregularHeartRhythmEvent: + if (!TestRuntime.CheckXcodeVersion (10, 2)) + continue; + break; default: if (!TestRuntime.CheckXcodeVersion (7, 0)) continue; diff --git a/tests/xtro-sharpie/iOS-HealthKit.todo b/tests/xtro-sharpie/iOS-HealthKit.todo deleted file mode 100644 index 9047333bea..0000000000 --- a/tests/xtro-sharpie/iOS-HealthKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!missing-field! HKCategoryTypeIdentifierHighHeartRateEvent not bound -!missing-field! HKCategoryTypeIdentifierIrregularHeartRhythmEvent not bound -!missing-field! HKCategoryTypeIdentifierLowHeartRateEvent not bound -!missing-field! HKMetadataKeyHeartRateEventThreshold not bound diff --git a/tests/xtro-sharpie/watchOS-HealthKit.todo b/tests/xtro-sharpie/watchOS-HealthKit.todo deleted file mode 100644 index 9047333bea..0000000000 --- a/tests/xtro-sharpie/watchOS-HealthKit.todo +++ /dev/null @@ -1,4 +0,0 @@ -!missing-field! HKCategoryTypeIdentifierHighHeartRateEvent not bound -!missing-field! HKCategoryTypeIdentifierIrregularHeartRhythmEvent not bound -!missing-field! HKCategoryTypeIdentifierLowHeartRateEvent not bound -!missing-field! HKMetadataKeyHeartRateEventThreshold not bound