Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HealthKitUI] Add support for Xcode 15 #19017

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/healthkitui.cs
Expand Up @@ -29,4 +29,17 @@ interface HKActivityRingView {
[Export ("setActivitySummary:animated:")]
void SetActivitySummary ([NullAllowed] HKActivitySummary activitySummary, bool animated);
}

[iOS (17, 0), MacCatalyst (17, 0)]
[Category]
[BaseType (typeof (HKHealthStore))]
interface HKHealthStore_UIViewController {

[Export ("authorizationViewControllerPresenter")]
[return: NullAllowed]
UIViewController GetAuthorizationViewControllerPresenter ();

[Export ("setAuthorizationViewControllerPresenter:")]
void SetAuthorizationViewControllerPresenter ([NullAllowed] UIViewController authorizationViewControllerPresenter);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vote for doing this inline in the 'HKHealthStore' class rather than a category in this file. I'll let @rolfbjarne or @dalexsoto decide.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah I think I agree, inline this as a property inside interface HKHealthStore

[NullAllowed, Export ("authorizationViewControllerPresenter")]
UIViewController AuthorizationViewControllerPresenter { get; set; }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would actually allow us to make it a property instead of a Set/Get method pair.

}

This file was deleted.

2 changes: 0 additions & 2 deletions tests/xtro-sharpie/iOS-HealthKitUI.todo

This file was deleted.