If you maintain an app like ConnectStats that has a lot of local files on the device and does not rely on the cloud constantly for input, each time Xcode upgrade all the iOS Simulator starts empty again and loose all the files from the previous version.
The iOS simulator keep it’s file in some complicated folder structure and the folder change each time you start it, so it can be quite tricky to locate the files. And so quite painful to locate all the folder for the previous and new version and move all the files over.
Garmin sends ConnectStats all the data as Fit Files, so I had built a library to parse it for the app. I used the code from the official Fit SDK. Originally I used the c++ implementation provided in the SDK as it was providing a way to get all the data pretty generically. The SDK while quite generic was actually quite slow in parsing.
About 2 years ago, as I wanted to get ConnectStats to get the extra information from the fit file and parse them systematically for each activity, the speed started to become an issue. So I wrote a new library in swift based on the c implementation of the SDK.
That ended up much faster than the previous version, and ConnectStats has been using it for a while, as well as FitFileExplorer which is a tool I wrote to see the raw fit files.
While I had provided that library on GitHub and it was open source, it wasn’t really easy to integrated into another app. Following a request last week, I investigated how to make it a Swift Package which I wasn’t really aware of. Always a good challenge to learn something new!
One of the requirement for me in finding a new house was to make sure it had ethernet cabling everywhere so I could ensure I have a stable network and enough access point to get good wifi connectivity in every room.
When I moved into a new place in August 2016, it met the requirement, but to my and my family dismay, the network and wifi stability was dreadful. It consistently would stall time and time over again. Streaming movies or music want halt for minutes at a time, and reading news on the web would also randomly hang.
I embarked on a long journey to try to resolve the issue, which would lead me to learn way more about networking that I ever imagined possible…
ConnectStats history with the weather had a few chapter. First, I started to get the data from the Garmin Website so I could display the condition, the temperature and mostly the wind direction and speed in the map, which is always a good visual clue of how the wind helped or hurt in an activity.
When Garmin stopped publishing its weather data in the API, ConnectStats ended up without the weather for a while. Until Garmin opened its new API which required me to implement my own server, and indirectly made it easier to query the weather to display in an activity.
I live and do most of my running in London, where it can be quite hard to find any type of hills and the elevation gain field from my activities is never the most relevant.
This summer I managed to escape London twice. The first week when the UK lifted travel restrictions and quarantine early July, I went to the mountains of the Valais in Switzerland and the last week before the quarantine was restored, I went to south france, 30 kilometres in land from Nice, where the Alps ease into the sea. So I got my share of opportunity for testing how to slice and dice elevation gain in ConnectStats.
To keep motivated, I also took a few Strava Challenges, including the august climbing challenge of running at least 2,000m of elevation. It became clear that ConnectStats required a few enhancement to properly track my progress on elevation gain…
At the moment ConnectStats is not working properly when using the Garmin Data from the ConnectStats Servers. I’ll explain the issue, but there is a temporary work around
UPDATE: I have a new version pending approval from Apple that will work without the work around. With version 6.2.1, if you have “all” as a source, the app will automatically go to the web site if the ConnectStats Server didn’t receive data from the Garmin Health API.
Update as of August 6th the issue with the garmin api is resolved. So no need for the work around and using all as data source should be fine.
I you are having ConnectStats not display an activity or statistics or hanging you need to
Select the last good activity you have in your list (does not have to be the last one but a known good one)
Go to Config, Profile and select “Delete Some Activities”. This will delete all the activities from the app up to the one you have selected. It will not delete anything on any server, only in the app local files.
Go to Config, Services, Garmin and select for Source “Garmin WebSite”
Close the app fully (may not be necessary, but to ensure there are nothing in the memory cache)
Restart the app and try to download activities again.
When thing works again, you should be able to revert source to “all”, but monitor here or on twitter for message that it’s fixed
What is the issue
Since early today, the Garmin API is sending error instead of the activities files to the ConnectStats server. As a result the app is trying to go the Garmin website directly to get the fit file. Currently Garmin Connect is not letting you download fit files (if you go to garmin connect and select “export original” you will get an error), this second error is causing ConnectStats to hang on its processing queue (my bug).
If you select Garmin WebSite as a source it will get the data of your activity without trying to get the fit file and this seems to work at the moment.
I’ll update this as the situation evolve and post on twitter as well.
Following the Garmin outage, someone asked me on twitter about some usage statistics and its evolution over time. I thought it would be a good idea to put together a little write up both on the stats but also to show people what type of usage data one can see when you have an app.
ConnectStats remains a very tiny player compared to the big guys, and its two key statistics is that in the recent month the app got about 5,000 downloads and on average 3,000 users start the app every day with some variation between weekend and weekdays. This is quite a representative month.
Garmin Servers were out from Thursday July 23rd to Monday July 27th. I won’t go over what happened at Garmin as it’s well covered in the press or other sites, but wanted to share how it impacted me and ConnectStats. While the impact on ConnectStats wasn’t massive, the episode resulted in two small fixes and improvements…
First, it happened that on a Thursday when I didn’t go out running. So I didn’t realise until Friday, after the Garmin Connect App didn’t upload my latest morning run. The app was reporting some maintenance, which I didn’t worry about too much. I just opened ConnectStats, to see how the app was handling the maintenance, it reported a Garmin Error and invalid name or password if you tried to use the Garmin Website connection. Not great, but it’s hard sometime to interpret the web page errors. Mental note to check again later see if could interpret the message better, and I went to work.
I was just cleaning my files and stumbled across my old source code repository and looked at the first code commit of ConnectStats in September 2012…
ConnectStats and other apps have come a long way since then. The original reason I wrote ConnectStats are no longer valid, but today I still use it and feel the need to maintain it. I’ll go through how I use it, where I think it still has an edge vs other apps and where the other apps provide features I need but will never implement in ConnectStats.
I personally use extensively the Strava App, the Garmin Connect App and ConnectStats. It is very possible there are other apps out there that do a terrific job that I don’t know, but this article is just about what I use myself.