I spent most of the weekend trying toget this iOS KM Tracker app to reliably trigger route tracking when it connected to my car's bluetooth in a backgrounded state. Fuck. I gave up. It's... complicated.
The most reliable and future-proof way is to go via app intents and use iOS's native Shortcuts and Automation app. This is not the super simple "just get in your card and drive" method I was hoping for (but knew wasn't likely).
However I think it's best. Reading all the reviews of competitors, everyone complains of unreliable auto-tracking. I'd rather deal with initial support of setting up the automation than unreliable features.
This way a user can say "When my phone connects to my car's bluetooth or via carplay start tracking my KMs". And you get Siri integration for free.