Active Energy in iOS Health Data

I’d love the Zwift Companion app to write “Active Energy” into Health data so it affects the activity ring in my Apple Watch. I notice that the “category” is enabled as Data Source in the Health App but the companion app only writes the workouts (which only affects the exercise ring).

Interesting request, thanks for the heads up Lars!

I’ve been looking deeper in the HealthKit integration and there might be a bug in it preventing the “Activity data” being updated correctly. When you look in the Workout data generated by the Companion App in the Health App you’ll notice that there is an “Total Active Energy” sample. Tapping again in it reveals an empty “No Data” list.

Maybe there is a bug in the startDate and endDate property for that sample. (By the way, the “Cycling distance” is behaving the same way).

2 Likes

I ended up developing an iOS App that imports the exported .fit files generated from the Zwift portal and inserts the data correctly into HeatlhKit. If anyone is interested in the app give me a heads up, not sure if I’d be infringing any copyright by releasing a software that uses Garmin Fit data.

I made the source code available if someone is interested:

https://github.com/larcho/Fit-to-HK

I used HealthFit to import the missing data to Healthkit. Worked great. Very well done app.