Join Steven Lipton for an in-depth discussion in this video Reading Core Motion data, part of Advanced iOS App Development: Core Motion.
- [Instructor] A sensor works on its own timescale,…not on the same timescale that your iPhone, iPad,…or Apple Watch does.…There's two strategies that Core Motion uses…to handle input from the sensors.…The first option is the push option.…The push option pushes the data back to the app…after every reading of the sensor.…It uses a closure in the sensor start method to do this.…We'll cover the details of this method later.…Pushing data is the most accurate…and robust set of data you can get.…It gives you all the data.…
That may be too much data,…and it can clog up the app's efficiency.…You will run push updates on a separate thread…than the main thread to keep it from clogging up,…but it still may be more data than you need.…The other option is the pull method.…Pulling reads the sensor in a timing loop.…At given intervals, the application checks…with the sensors for data.…At the given time interval, you'll have some code to handle…the updates coming from the sensors reading their data.…If you haven't used a timer before,…
- Reading Core Motion data
- Understanding Core Motion methods
- Creating a pedometer app
- Using pace and distance data from Core Motion
- Pushing and pulling device motion data
- Accessing the altitude sensors
- Working with the motion activity manager (CMMotionActivityManager)
Skill Level Advanced
iOS App Development: Accessibilitywith Kevin Favro2h 34m Intermediate
Advanced iOS Development: Working with APIswith Saul Mora1h 59m Intermediate
1. Core Motion Introduction
3. Device Motion
5. Recorded Data
Next steps1m 43s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.