Can I use HealthKit in macOS app?

I see no mention about macOS on HealthKit page https://developer.apple.com/documentation/healthkit


Can I use HealthKit in macOS app?

Answered by KMT in 287680022

>see no mention about macOS


That's correct - quoting from https://developer.apple.com/healthkit/:


Apps for iOS and watchOS

Learn more about the HealthKit APIs that work with your user’s shared health and activity data. Your watchOS workout apps can contribute directly to Activity rings on Apple Watch and your app logo can appear in Activity history on iPhone.

For iOS 9.3 and watchOS 2.2 or later


Not sure why the link you included lists older supported SDKs, on the right:

  • iOS 8.0+
  • watchOS 2.0+

If macOS is something you'd like to see added to the mix, feel free to log an enhancement request via the bug reporter link, below right, adding your report number to your thread for reference, thanks and good luck.

No its a mobile/watch framework only. You could access the data via queries and send it to your Mac app from your phone but then you'd have to handle two apps - one on the phone and one on the Mac. And then you'd have to make sure that all of the proper privacy requiremetns are being met. In short -- probably not worth it and would make for an awkward user experience.

Accepted Answer

>see no mention about macOS


That's correct - quoting from https://developer.apple.com/healthkit/:


Apps for iOS and watchOS

Learn more about the HealthKit APIs that work with your user’s shared health and activity data. Your watchOS workout apps can contribute directly to Activity rings on Apple Watch and your app logo can appear in Activity history on iPhone.

For iOS 9.3 and watchOS 2.2 or later


Not sure why the link you included lists older supported SDKs, on the right:

  • iOS 8.0+
  • watchOS 2.0+

If macOS is something you'd like to see added to the mix, feel free to log an enhancement request via the bug reporter link, below right, adding your report number to your thread for reference, thanks and good luck.

Can I use HealthKit in macOS app?
 
 
Q