Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/HealthKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,18 @@ public enum HKCategoryValueCervicalMucusQuality : long {
EggWhite,
}

/// <summary>Enumerates menopausal states recorded in a HealthKit category sample.</summary>
[MacCatalyst (27, 0), Mac (27, 0), iOS (27, 0)]
[Native]
public enum HKCategoryValueMenopausalState : long {
/// <summary>The user is in menopause.</summary>
Menopause = 1,
/// <summary>The user is in perimenopause.</summary>
Perimenopause = 2,
/// <summary>The user is not in menopause or perimenopause.</summary>
None = 3,
}

/// <summary>Enumerates the amount of menstrual flow.</summary>
[MacCatalyst (13, 1)]
[Native]
Expand Down
41 changes: 41 additions & 0 deletions src/healthkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,12 @@ interface HKCorrelationType {

}

/// <summary>Handles the result of querying the earliest authorized sample dates for HealthKit object types.</summary>
/// <param name="earliestDates">A dictionary that maps each qualifying type to its earliest readable date, or <see langword="null" /> if the query fails.</param>
/// <param name="error">The error if the query fails; otherwise, <see langword="null" />.</param>
[MacCatalyst (27, 0), Mac (27, 0), iOS (27, 0)]
delegate void HKHealthStoreGetEarliestAuthorizedSampleDateForTypesHandler ([NullAllowed] NSDictionary<HKObjectType, NSDate> earliestDates, [NullAllowed] NSError error);

/// <param name="requestStatus">The resulting request status.</param>
/// <param name="error">The error, if one occurred..</param>
/// <summary>Handler to pass to <see cref="HealthKit.HKHealthStore.GetRequestStatusForAuthorizationToShare(Foundation.NSSet{HealthKit.HKSampleType},Foundation.NSSet{HealthKit.HKObjectType},HealthKit.HKHealthStoreGetRequestStatusForAuthorizationToShareHandler)" />.</summary>
Expand Down Expand Up @@ -920,6 +926,20 @@ interface HKHealthStore {
[Export ("earliestPermittedSampleDate")]
NSDate EarliestPermittedSampleDate { get; }

/// <summary>Gets the earliest readable sample date for each HealthKit object type with limited read authorization.</summary>
/// <param name="types">The object types to query.</param>
/// <param name="completion">A handler that receives the earliest readable dates or an error.</param>
/// <remarks>Types without a limited-access earliest date are omitted from the result. The handler runs on an arbitrary background queue.</remarks>
[MacCatalyst (27, 0), Mac (27, 0), iOS (27, 0)]
[Async (XmlDocs = """
<param name="types">The object types to query.</param>
<summary>Asynchronously gets the earliest readable sample date for each HealthKit object type with limited read authorization.</summary>
<returns>A task whose result maps each qualifying type to its earliest readable date.</returns>
<remarks>Types without a limited-access earliest date are omitted from the result.</remarks>
""")]
[Export ("getEarliestAuthorizedSampleDateForTypes:completion:")]
void GetEarliestAuthorizedSampleDateForTypes (NSSet<HKObjectType> types, HKHealthStoreGetEarliestAuthorizedSampleDateForTypesHandler completion);

// FIXME NS_EXTENSION_UNAVAILABLE("Not available to extensions") ;
[Export ("executeQuery:")]
void ExecuteQuery (HKQuery query);
Expand Down Expand Up @@ -3699,6 +3719,16 @@ enum HKCategoryTypeIdentifier {
[MacCatalyst (26, 2), Mac (26, 2), iOS (26, 2)]
[Field ("HKCategoryTypeIdentifierHypertensionEvent")]
HypertensionEvent,

/// <summary>Identifies samples that record bleeding after menopause.</summary>
[MacCatalyst (27, 0), Mac (27, 0), iOS (27, 0)]
[Field ("HKCategoryTypeIdentifierBleedingAfterMenopause")]
BleedingAfterMenopause,

/// <summary>Identifies samples that record a menopausal state.</summary>
[MacCatalyst (27, 0), Mac (27, 0), iOS (27, 0)]
[Field ("HKCategoryTypeIdentifierMenopausalState")]
MenopausalState,
}

/// <summary>Enumerates the forms of <see cref="HealthKit.HKCharacteristicType" />.</summary>
Expand Down Expand Up @@ -5275,6 +5305,17 @@ interface HKLiveWorkoutDataSource {
void DisableCollection (HKQuantityType quantityType);
}

// HKLiveWorkoutZoneUpdate is exported by macOS 27, despite the header omitting macOS availability.
/// <summary>Describes a workout-zone update from a live workout.</summary>
[MacCatalyst (27, 0), Mac (27, 0), iOS (27, 0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface HKLiveWorkoutZoneUpdate {
/// <summary>Gets the timestamp of the most recent sample processed when the workout zone was updated.</summary>
[NullAllowed, Export ("lastSampleProcessedDate", ArgumentSemantic.Copy)]
NSDate LastSampleProcessedDate { get; }
}

/// <summary>Represents a Fast Healthcare Interoperability Resources (FHIR) resource.</summary>
[MacCatalyst (13, 1)]
[BaseType (typeof (NSObject), Name = "HKFHIRResource")]
Expand Down
5 changes: 5 additions & 0 deletions tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ public void EnumValues_22351 ()
if (!TestRuntime.CheckXcodeVersion (26, 2))
continue;
break;
case HKCategoryTypeIdentifier.BleedingAfterMenopause:
case HKCategoryTypeIdentifier.MenopausalState:
if (!TestRuntime.CheckXcodeVersion (27, 0))
continue;
break;
default:
if (!TestRuntime.CheckXcodeVersion (7, 0))
continue;
Expand Down

This file was deleted.

6 changes: 0 additions & 6 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-HealthKit.todo

This file was deleted.

This file was deleted.

Loading