Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/691a5ca1-2b1c-8010-8cbd-8797f95aa8d9
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== If your requirements are: ==== * 100% offline * accurate “4h” notifications * App-Review-safe * no push Then: '' Manual Start/Stop is the only ''reliable* core. * Sensors (Core Motion + GPS speed) are helpers: - To auto-pause/resume the session while you’re alive - To reconcile missed time later - To show the user “we think you were driving Xh YYmin between A and B”. What I would ship: # Primary: the manual Start/Stop session pattern you already have. # Secondary: - Use motion + GPS to auto-pause/resume during a session (e.g. if they’re obviously parked 20+ minutes, you auto-stop and prompt next time). - On app relaunch/BGTask, use Core Motion history to fill gaps and offer corrections (“We detected additional driving between 13:00 and 14:15, add to your log?”). # Notifications: - Real-time: scheduled when session starts, kept accurate while background location keeps you alive. - Fallback: if BGTask or relaunch finds they already passed 4h, send a “late” reminder. That gets you: * Good UX (they don’t have to be perfect with Start/Stop). * Honest technical constraints (you’re not fighting iOS background policy). * A clean story for App Review: navigation/fitness-like background behavior initiated explicitly by the user, plus best-effort post-hoc detection. If you want, next step we can sketch: * A concrete DrivingSession SwiftData model * A DrivingEngine actor with simple state transitions * How to wire that into CLLocationManager + CMMotionActivityManager + BGTaskScheduler in Swift-concurrency style.
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)