Skip to content

Commit

Permalink
[HealthKit] Remove the HKAnchoredObjectResultHandler2 delegate in .NE…
Browse files Browse the repository at this point in the history
…T. (#14052)

Remove the HKAnchoredObjectResultHandler2 delegate, and make the
HKAnchoredObjectResultHandler delegate have the correct signature in .NET.
  • Loading branch information
rolfbjarne authored Feb 4, 2022
1 parent bbf2455 commit 730b27e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/healthkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,14 @@ public enum HKCategoryValueProgesteroneTestResult : long {
Indeterminate,
}

#if NET
delegate void HKAnchoredObjectResultHandler (HKAnchoredObjectQuery query, HKSample[] results, nuint newAnchor, NSError error);
#else
delegate void HKAnchoredObjectResultHandler2 (HKAnchoredObjectQuery query, HKSample[] results, nuint newAnchor, NSError error);

[Obsolete ("Use HKAnchoredObjectResultHandler2 instead")]
delegate void HKAnchoredObjectResultHandler (HKAnchoredObjectQuery query, HKSampleType[] results, nuint newAnchor, NSError error);
#endif

delegate void HKAnchoredObjectUpdateHandler (HKAnchoredObjectQuery query, HKSample[] addedObjects, HKDeletedObject[] deletedObjects, HKQueryAnchor newAnchor, NSError error);

Expand All @@ -144,16 +148,20 @@ public enum HKCategoryValueProgesteroneTestResult : long {
interface HKAnchoredObjectQuery {

[NoWatch]
#if !NET
[Obsolete ("Use the overload that takes HKAnchoredObjectResultHandler2 instead")]
#endif
[Deprecated (PlatformName.iOS, 9, 0)]
[Export ("initWithType:predicate:anchor:limit:completionHandler:")]
NativeHandle Constructor (HKSampleType type, [NullAllowed] NSPredicate predicate, nuint anchor, nuint limit, HKAnchoredObjectResultHandler completion);

#if !NET
[NoWatch]
[Sealed]
[Deprecated (PlatformName.iOS, 9, 0)]
[Export ("initWithType:predicate:anchor:limit:completionHandler:")]
NativeHandle Constructor (HKSampleType type, [NullAllowed] NSPredicate predicate, nuint anchor, nuint limit, HKAnchoredObjectResultHandler2 completion);
#endif

[iOS (9,0)]
[Export ("initWithType:predicate:anchor:limit:resultsHandler:")]
Expand Down

5 comments on commit 730b27e

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

❌ [CI Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

API Current PR diff

ℹ️ API Diff (from PR only) (please review changes)

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

Generator diff

ℹ️ Generator Diff (please review changes)

Packages generated

View packages

Test results

5 tests failed, 230 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 2763 Passed: 2569 Inconclusive: 11 Failed: 2 Ignored: 192)
  • introspection/iOS Unified 64-bits - simulator/Debug (iOS 12.4) [dotnet]: TimedOut
  • introspection/iOS Unified 64-bits - simulator/Debug (iOS 12.4): TimedOut
  • introspection/tvOS - simulator/Debug (tvOS 12.4) [dotnet]: Failed
  • introspection/tvOS - simulator/Debug (tvOS 12.4): Failed

Pipeline on Agent XAMMINI-063.BigSur'
[HealthKit] Remove the HKAnchoredObjectResultHandler2 delegate in .NET. (#14052)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 Tests failed catastrophically on VSTS: device tests iOS (no summary found). 🔥

Result file D:\a\1\s\Reports\TestSummary-iOS64\TestSummary.md not found.

Pipeline on Agent
[HealthKit] Remove the HKAnchoredObjectResultHandler2 delegate in .NET. (#14052)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 Tests failed catastrophically on VSTS: device tests tvOS (no summary found). 🔥

Result file D:\a\1\s\Reports\TestSummary-tvos\TestSummary.md not found.

Pipeline on Agent
[HealthKit] Remove the HKAnchoredObjectResultHandler2 delegate in .NET. (#14052)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ Tests passed on macOS M1 - Mac Big Sur (11.5) ✅

Tests passed

All tests on macOS X M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
[HealthKit] Remove the HKAnchoredObjectResultHandler2 delegate in .NET. (#14052)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

❌ Tests failed on macOS Mac Catalina (10.15) ❌

Tests failed on Mac Catalina (10.15).

Failed tests are:

  • introspection

Pipeline on Agent
[HealthKit] Remove the HKAnchoredObjectResultHandler2 delegate in .NET. (#14052)

Please sign in to comment.