From e2dc23e65182f83bb5e1b6d3843f383140a600e5 Mon Sep 17 00:00:00 2001 From: Haritha Mohan Date: Mon, 18 Sep 2023 08:34:32 -0700 Subject: [PATCH] [HealthKitUI] Add support for Xcode 15 (#19017) Co-authored-by: GitHub Actions Autoformatter --- src/healthkit.cs | 11 +++++++++++ .../api-annotations-dotnet/iOS-HealthKitUI.todo | 2 -- tests/xtro-sharpie/iOS-HealthKitUI.todo | 2 -- 3 files changed, 11 insertions(+), 4 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-HealthKitUI.todo delete mode 100644 tests/xtro-sharpie/iOS-HealthKitUI.todo diff --git a/src/healthkit.cs b/src/healthkit.cs index 97f527dcf5..2a977ca78a 100644 --- a/src/healthkit.cs +++ b/src/healthkit.cs @@ -17,6 +17,13 @@ using System; using System.ComponentModel; using CoreLocation; using UniformTypeIdentifiers; +#if MONOMAC +using AppKit; +using UIViewController = AppKit.NSViewController; +#else +using UIKit; +using NSViewController = Foundation.NSObject; +#endif #if !NET using NativeHandle = System.IntPtr; @@ -796,6 +803,10 @@ namespace HealthKit { [iOS (17, 0), Mac (14, 0), Watch (10, 0), NoTV, MacCatalyst (17, 0)] [Export ("workoutSessionMirroringStartHandler", ArgumentSemantic.Copy)] Action WorkoutSessionMirroringStartHandler { get; set; } + + [NoTV, NoWatch, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NullAllowed, Export ("authorizationViewControllerPresenter")] + UIViewController AuthorizationViewControllerPresenter { get; set; } } delegate void HKStoreSampleAddedCallback (bool success, NSError error); diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-HealthKitUI.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-HealthKitUI.todo deleted file mode 100644 index ce52a0d89f..0000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-HealthKitUI.todo +++ /dev/null @@ -1,2 +0,0 @@ -!missing-selector! HKHealthStore::authorizationViewControllerPresenter not bound -!missing-selector! HKHealthStore::setAuthorizationViewControllerPresenter: not bound diff --git a/tests/xtro-sharpie/iOS-HealthKitUI.todo b/tests/xtro-sharpie/iOS-HealthKitUI.todo deleted file mode 100644 index ce52a0d89f..0000000000 --- a/tests/xtro-sharpie/iOS-HealthKitUI.todo +++ /dev/null @@ -1,2 +0,0 @@ -!missing-selector! HKHealthStore::authorizationViewControllerPresenter not bound -!missing-selector! HKHealthStore::setAuthorizationViewControllerPresenter: not bound