O'Reilly logo

Program the Internet of Things with Swift for iOS by Manny de la Torriente, Gheorghe Chesler, Ahmed Bakir

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    4

Using Core Motion to Save Motion Data

Ahmed Bakir

Introduction

In the last chapter, you learned how to set up an application for HealthKit, Apple’s shared repository for health data, and query for specific health data types. In this chapter, you will learn how to use Core Motion to access live motion data from a user’s device, and how to save it back to HealthKit, where it will be accessible to all applications.

In this chapter, you continue to expand the RunTracker app that you started in Chapter 3. In this chapter, we cover the following concepts:

  • How to access hardware using Core Motion
  • How to save information collected over time using Core Motion
  • How to save information to HealthKit
  • How to receive real-time activity updates from ...

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