I can't get device.model data in sleep analysis result

While using HealthKit, I wanted to collect sleep analysis with the measuring device model data. But I couldn't get model string in any way.

sleepSample.device sleepSample.device.self sleepSample.device?.model sleepSample.device?.name

All things were contain 'nil'.

How can I get model data in HKCategoryType?

p.s. I can get model data in HKSampleType like stepCount, activeEnergyBurned, distanceWalkingRunning

p.s. I was build this app in Xcode-beta

Have you confirmed there is sleep data on the device you are querying for sleep samples? If these samples are written by Apple there should be device information on the sleep sample. If they are written by a 3rd party, there is no guarantee since the device information is optional and not a requirement when saving samples.

I can't get device.model data in sleep analysis result
 
 
Q