littlelogs

Keep a social journal of your work progress as you make and learn things.

belle
belle

Today I figured out a way to filter out duplicate #applehealth #sleep samples from the same app. I’m using Sleep++ (among others) for testing, and it’s duplicated all my sleep records for the past few days. Although the Apple Health app handles merging and de-duping data for the user, when a developer queries HealthKit, it just returns whatever it has, so you have to de-dupe it and all that good stuff yourself.

ledestin
ledestin

That’s pretty bad. And an opportunity for an open-source library.

02 March

josh
josh

That’s a good point. A wrapper library that gives you a single cleaned up set of non-overlapping, non-duplicated records could be useful to others.

02 March

belle
belle

Yeah, a really good point. I haven’t actually looked to see if anything like that has been built, but someone’s probably had a run at it. I’ll see what I can find.

02 March

josh
josh

I meant that you could make it :)

02 March

belle
belle

I know :) But I thought maybe someone else already had. I felt silly for not checking. Of course there’s one cocoapod library related to #healthkit that doesn’t do this, so maybe I should.

03 March