Bug 37312 - Incorrect Binding for HealthKit HKObjectType.WorkoutType()
Summary: Incorrect Binding for HealthKit HKObjectType.WorkoutType()
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.4 (iOS 9.2)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
: 38045 ()
Depends on:
Blocks:
 
Reported: 2015-12-29 01:53 UTC by Brian
Modified: 2016-01-26 12:22 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Brian 2015-12-29 01:53:24 UTC
The static method WorkoutType() should return the shared HKWorkoutType object. It instead returns an object of type HKWorkout.

Apple Docs: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKObjectType_Class/#//apple_ref/occ/clm/HKObjectType/workoutType

Xamarin Docs: https://developer.xamarin.com/api/member/HealthKit.HKObjectType.WorkoutType/
Comment 1 Sebastien Pouliot 2016-01-03 02:48:04 UTC
Yes, this is already fixed [1] by adding a correct 

> HKWorkoutType GetWorkoutType ();

and obsoleting the existing 

> WorkoutType()

[1] maccore/master 313d5c65180474f3797b1cd500be01e7560faa0d

You should already have access to this API in the preview releases for tvOS/watchOS that also includes newer API (and fixes) for iOS.
Comment 2 Brian 2016-01-03 03:42:48 UTC
I am not seeing GetWorkoutType(). I have Xamarin.iOS 9.4.0.0 and Xamarin Studio 5.10.1 (build 6) installed.

I already tried the alpha channel.

Do I need to downgrade versions to the ones from this link:
http://forums.xamarin.com/discussion/54751/xamarin-ios-9-3-preview-2-for-tvos-9-0-and-watchos-2-0/p1
Comment 4 Brian 2016-01-04 17:34:44 UTC
Just confirming I see the fix in the preview. Thank you.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2016-01-26 12:22:54 UTC
*** Bug 38045 has been marked as a duplicate of this bug. ***