What is Core Motion?
Core Motion is Apple's framework for reading the iPhone's motion sensors. Its accelerometer measures how the phone moves in any direction, and its gyroscope how fast it turns, so together they tell an app when the phone is tilted, shaken or rotated. It also reports steps, the distance walked, floors climbed and changes in altitude.
More about Core Motion
Most apps don't read the sensors one by one. Core Motion's device motion combines them into ready answers: the phone's attitude, which way is down, and how much of the movement came from the person rather than from gravity. Apple asks an app to create only one motion manager, because several can slow the rate at which the sensors report. Steps and altitude count as motion and fitness data, so the app must explain why it wants them, and iOS asks the person before it shares them. Not every device has every sensor, so an app checks before it starts one.
An example
A spirit level shows Core Motion at work. The app reads which way gravity pulls many times a second, turns that into an angle, and moves a bubble across the screen as you tilt the phone against a shelf. When the angle reaches zero, a short tap from the phone's haptics says it is level. Nothing leaves the phone, and no sign-in is needed.
A common misunderstanding
Motion sensors don't know where the phone is. Core Motion can tell how the phone moves and turns, but finding a position on a map is Core Location's job, which asks a permission of its own. A step count isn't a route either: it says how far you walked, never where.
In a Borel app
Motion is one of the features the iPhone in your browser can't show: the preview runs on a Mac, which has no motion sensors, so a Borel app says so on screen there instead of showing a zero. You build and adjust everything around it in the preview, then feel the tilt on a real iPhone: yours while you work on the app, and every phone that downloads it once it is on the App Store. Steps and altitude bring their permission prompt with them, already written into the app.
Core Motion with Borel
Pick Motion sensors under Device in the + menu, or describe what the app should do when the phone tilts or shakes, and Borel writes it in Swift with Core Motion: tilt, shake, rotation and steps. On Pro, Borel Companion puts the app on your iPhone, where the sensors are.
Sources: Apple Developer: Core Motion; Apple Developer: CMMotionManager; Apple Developer: CMPedometer. Checked .
Related terms
Make your iPhone app in Borel
Describe it in your own words. Borel writes it in Swift, builds it on its own Mac and puts it on your iPhone.