Wake up! Wake up! It's time to exercise! Otherwise, you are going to have a heart attack in a few days. This is the kind of phrase we are going to hear from our iPhones very soon, replacing a personal trainer with an app that knows everything about your health status at all times.
HealthKit is a new framework created to record your health status, which allows developers to create apps for fitness tracking or medical proposes. In this chapter, we are going to create an app that will use the HealthKit framework.
We will cover the following topics here:
Requesting permission to use HealthKit
Querying your health data
Using an external framework to plot charts
Reading and storing data with
NSUserDefaults