O'Reilly logo

Build watchOS Apps: Develop and Design by Mark Goody, Maurice Kelly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Using Hardware APIs

Since iPhone SDK was first made available to developers, in 2008, one of the most exciting aspects of developing for Apple platforms has been access to the varied capabilities of the hardware itself. Apple Watch and watchOS are no different, allowing developers access to the potential of the heart rate sensor, the accelerometer, and the much-vaunted haptic feedback system dubbed the Taptic Engine.

Using Sensor Data

WatchKit apps can access data from two of the watch’s sensors: the heart rate sensor on the underside of the watch and the internal accelerometer. The data from these sensors is available via the HealthKit and CoreMotion frameworks.

Accessing Heart Rate Data via HealthKit

In iOS 8, Apple introduced ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required