Post not yet marked as solved
Post marked as unsolved with 1 replies, 242 views
After iOS 14, it seems to get Lux by SRAmbientLightSample.
https://developer.apple.com/documentation/sensorkit/srambientlightsample
But when I use this code:
import SensorKit
let lightSample = SRAmbientLightSample()
let lux = lightSample.lux
It always crashes at "let lux = lightSample.lux"
I can find any usages from this document page, and also stack overflow.
Please help to know, how to get Lux by SRAmbientLightSample ?
Thanks.