Chapter    3

Accessing Health Information Using HealthKit

Ahmed Bakir


For the last few years, Apple has provided two core frameworks that have sped up the time to develop iOS health apps considerably: HealthKit and Core Motion. HealthKit provides a central repository for all apps to sync health data and Core Motion provides access to the iPhone’s accelerometer and pedometer, allowing you to retrieve limited health information about a user without external accessories.

HealthKit was a baffling surprise to everyone when it was announced; no one could figure out why Apple would “compete” with its partners by building a framework to do the same thing they had all been doing for years, tracking information. As time progressed, HealthKit’s ...

Get Program the Internet of Things with Swift for iOS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.