Index / Snippets / Recording an 8-hour bike ride on one iPh

Recording an 8-hour bike ride on one iPhone battery charge

Follow Apple's background rules and the battery lasts.

Answers
Can an iPhone app track an 8-hour ride with GPS and sensors on one battery charge?
Topics
AI · apple · bike · creating · data · design · gran fondo · health · heart · minimal · programming · running · sensors · sport · watch
Full article on willem.com
https://willem.com/en/2024-05-11_developing-a-native-ios-app/

Summary

Yes, if the app follows Apple's background rules. During an 8-hour ride in 2024 my app collected over 127 thousand data points, GPS plus Bluetooth sensors, on a single iPhone charge with the screen on the whole time.

Full text

iOS strictly limits background work to protect battery life and privacy, but if you follow Apple's guidelines and ask the user for the right permissions, an app can work perfectly from the background. The operating system decides when your app runs, so it can synchronise, combine and batch tasks on the energy efficient cores of Apple Silicon chips. I also built one synchronisation mechanism that aligns sensor measurements arriving at different intervals to common timestamps and updates all graphs and data fields in a single refresh, which saves CPU and graphics power. With that in place, a prototype of my Gran Fondo app recorded over 127 thousand data points during an 8-hour ride on one battery charge, with the display showing live data the whole time.

Machine formats of this page