Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pmostoff

macrumors member
Original poster
So I'm new to programming and I'm currently working on a pet project and I've gotten stuck pretty hard.

The essentials of it are that I want to read the distanceWalkingRunning data from HealthKit on a user's phone, store that information, and be able to print it to a UILabel in either Miles or Kilometers.

The main issue that I'm running into is that I haven't been able to find many good examples for HealthKit code. All of the tutorials I've been able to find either seem to not be up to date for Swift 2 or only be targeted at WatchOS related things.

To be clear, all I want to be able to do is read the distance data. I don't currently plan on having the app write anything back to HealthKit at all.

Any help would be greatly appreciated. Here's a link to the same question that I posted on Stack Overflow that might be of more help since I included some more details there: http://stackoverflow.com/questions/...g-from-healthkit-and-display-it-to-a-label-in

(To my knowledge there's nothing wrong with posting that but if there are any forum rules against posting links like that, I apologize, and any Mods, please feel free to remove it.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.