Updated 20 May 2024
The iPhone packs in a number of sensors. We’ve covered the accelerometer, gyroscope, and magnetometer, and will now take a look at the built in barometer which first appeared in the iPhone 6 and 6 plus smartphones several years ago.
The barometer can be used to detect elevation changes by sensing the changes in air pressure as the phone increases or decreases in altitude.
In todays tutorial we’ll take a look at CMAltimeter which is the class we use to access the barometer.
[Read more…]
In todays tutorial we will look at the long-running query that is available for HKActivitySummaryQuery. This particular version of the query keeps running in the background and monitors for changes. Each time the health store is updated with new data; either stand, exercise, or active calories; the update handler will be called which will allow you to refresh your views, should you need to.