-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HealthKit] Implement Xcode 16.0 beta 1-6 changes. (#21146)
There were no changes in beta 2, beta 3, beta 4 or beta 6.
- Loading branch information
1 parent
22d6e44
commit afb561b
Showing
16 changed files
with
608 additions
and
427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#nullable enable | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
using Foundation; | ||
using ObjCRuntime; | ||
|
||
namespace HealthKit { | ||
/// <summary>This class contains helper functions for the <see cref="HKStateOfMindValenceClassification" /> enum.</summary> | ||
#if NET | ||
[SupportedOSPlatform ("ios18.0")] | ||
[SupportedOSPlatform ("maccatalyst18.0")] | ||
[SupportedOSPlatform ("macos15.0")] | ||
[UnsupportedOSPlatform ("tvos")] | ||
#else | ||
[Watch (11, 0), NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] | ||
#endif | ||
public static class HKStateOfMindValence { | ||
[DllImport (Constants.HealthKitLibrary)] | ||
static extern IntPtr HKStateOfMindValenceClassificationForValence (double valence); | ||
|
||
/// <summary>Gets the valence classification appropriate for a given valence value.</summary> | ||
/// <param name="valence">The valence value whose classification to get.</param> | ||
/// <returns>The valence classification, or null if the specified valence is outside of the supported range of valence values.</returns> | ||
public static HKStateOfMindValenceClassification? GetClassification (double valence) | ||
{ | ||
var nsnumber = Runtime.GetNSObject<NSNumber> (HKStateOfMindValenceClassificationForValence (valence), owns: false); | ||
if (nsnumber is null) | ||
return null; | ||
return (HKStateOfMindValenceClassification) (long) nsnumber.LongValue; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 0 additions & 70 deletions
70
tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-HealthKit.todo
This file was deleted.
Oops, something went wrong.
68 changes: 0 additions & 68 deletions
68
tests/xtro-sharpie/api-annotations-dotnet/iOS-HealthKit.todo
This file was deleted.
Oops, something went wrong.
4 changes: 3 additions & 1 deletion
4
tests/xtro-sharpie/api-annotations-dotnet/macOS-HealthKit.ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# intro reports them as not present | ||
# xtro says 'workoutSessionMirroringStartHandler' exists on macOS, introspection disagrees. | ||
# Headers doesn't say neither that it's available nor that it's not on macOS, which is probably why xtro picks it up (defaults to available). | ||
# Assuming that the lack of unavailability in the headers is a mistake, so remove from macOS. | ||
!missing-selector! HKHealthStore::setWorkoutSessionMirroringStartHandler: not bound | ||
!missing-selector! HKHealthStore::workoutSessionMirroringStartHandler not bound |
68 changes: 0 additions & 68 deletions
68
tests/xtro-sharpie/api-annotations-dotnet/macOS-HealthKit.todo
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.