Ride for watchOS and iOS – Now in Beta

Not too long ago I got my grubby hands on a Dual+ Boosted Board. I absolutely love it, so much so that even after having a medium-nasty accident I was back out on it two days later.

That said, there’s on glaring issue with it. The official Boosted Board companion app is lacking a bit in features. So I started thinking about what I would really want from a companion app (and asked some people on Reddit too).

The first thing I thought of that I thought would be fairly achievable quickly was a speedometer. To be able to see my current speed on my Apple Watch would be great, and after a quick investigation I realised that I could use the Workout APIs to keep the app on screen for as long as I want.

To get the speed from the watch, I can just use location tracking and do some averaging and filtering of the locations from the Core Location APIs. While working on it I thought: “hey, I’ve got these locations, why not keep hold of them and display them on a map?”. So then I started working on transferring the ride information to display on a map in the iOS app. This gave the iOS app some purpose, as well, which is great.

I started off with a shitty design on the phone, really just to get to grips with the MapKit framework on iOS. I still haven’t got everything worked out but I’ve got it pretty good now. If there’s a massive gap between locations, I show a dotted line. That was more challenging to implement than I imagined!

So at this point I’ve got a pretty decent app that anyone with an Apple Watch can use to track their rides. But I really wanted more. I wanted to be able to connect to the board with my app and display the battery level on the watch.

Luckily (or not so luckily), I have some experience with Core Bluetooth on iOS. I was quickly able to get a sample project set up to look at the characteristics that the board has, and then just figured out which one was the one for determining if the board was charging etc. After a little while I got the app reading the battery level, charge status and board mode from the board which is now displayed on iOS and watchOS, as well as in an iOS widget and a watchOS complication.

Better still, Ride doesn’t even need to be re-launched when the system kills it for memory, because it implements full background Bluetooth and restoration. So long as the app is in the App Switcher (a limitation put in place by Apple), the board can reconnect. This meant that I could then start adding things like notifications for when the board connects and disconnects, as well as custom triggers for “sufficient charge” and critical battery. This is super useful because while you’re in a coffee shop recharging, you might only want to get back up to say 80% charge so that you can carry on riding.

Since then I’ve been tweaking the location filtering and adding nice little features, like automatically ending a ride if the board disconnects. I found myself forgetting to end a ride when I got to work and wasted my watch battery, as well as skewing some of the ride data.

It’s been a fun project, and even if it never makes it on to the App Store for whatever reason I’ve gained knowledge and I’ve made an app I will use a lot. You can keep up to date with the project at @RideHelp on Twitter. (Seriously how was that Twitter handle available?)

Also, if you’re reading this, Boosted, and you want to work together let me know 😉



Kane Cheshire

Author: Kane Cheshire

I'm a software developer (and sort of designer) from Hertfordshire. I spend a lot of time learning, travelling and flying my drone. I made MacID. You can check out some of my favourite photographs from travelling at http://kane.codes. I'm also the creator and lover of Twicnic, an annual Twitter picnic event.

Leave a Reply

Your email address will not be published. Required fields are marked *