Ah damn. Really hoped that’d work.
Ok, I’ve sent the invite and a build! You can see the debug logging by tapping the settings button at top left, then “Debug logs”. A new log file is generated on each fresh app launch.
For testing, you’ll be best to do a new fresh install with the beta build, so that you can get logging of the first run after fresh install, where the app initialises the data types table.
The lines to look out for in the logs will be:
INSERTING hkTypeIdentifier: HKCategoryTypeIdentifierSleepAnalysis, categoryValues: 4
INSERTING hkTypeIdentifier: HKCategoryTypeIdentifierSleepAnalysis, categoryValues: 5
INSERTING hkTypeIdentifier: HKCategoryTypeIdentifierSleepAnalysis, categoryValues: 1,3,4,5
INSERTING hkTypeIdentifier: HKCategoryTypeIdentifierSleepAnalysis, categoryValues: 3
Those will show that the correct data type rows have been inserted. Which eliminates potential bug 1, ie that the data types aren’t even being added to the app. That bug seems incredibly unlikely, but we’ve got to at least eliminate the possibility.
The next thing to look for in the logs will be lines like:
INSERTED/UPDATED DaySamples type: Total Sleep, dayDurations: 1306
INSERTED/UPDATED DaySamples type: Core Sleep, dayDurations: 439
INSERTED/UPDATED DaySamples type: REM Sleep, dayDurations: 439
INSERTED/UPDATED DaySamples type: Deep Sleep, dayDurations: 439
If all is working correctly, you should see those lines by the time the first HealthKit sync has finished. If the dayDurations are 0, or the lines are missing, then… HealthKit hasn’t provided the data. Which is my current best guess for what’s going on.
Although frustratingly, if that’s what’s happening, there’s no way for the app to detect it. HealthKit is designed defensively for privacy, in that it won’t tell an app whether the user has granted permission to a data type, it will only say whether the data type permission has been requested. And we already know that it’s been requested, because your Settings app shows that it’s been granted. But at least that would narrow down the problem, so we know what we’re dealing with.