Working Out with HealthKit
The sensors we looked at accessing in the previous part of this chapter, such as the accelerometer, are great at providing data about the device, but the Apple Watch has another sensor available to us thatâs only available on the watch: the heart rate sensor on the back of the device. This sensor, combined with the impressive water resistance of the watch, makes it an amazing companion for working out, whether youâre a weekend warrior or professional athlete. Letâs add support for this sensor to TapALap. Youâll use the watch to save a workout session to HealthKit, which will allow you not only to access heart rate and calorie burn data but also to save the data back to the userâs phone and contribute to his ...
Get Developing for Apple Watch, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.