Public API for real-time ambient light chromaticity on iPhone Air

I am developing a noncommercial graduation project for display color measurement with an iPhone Air. Is there a supported public API or entitlement for real-time chromaticity and illuminance readings from the built-in ambient light sensor? SensorKit's 24-hour data holding period does not fit this use. If this is unavailable, where should I submit an API enhancement request?

Answered by DTS Engineer in 909292022

Thanks for checking SensorKit first and explaining why its timing doesn't fit your project.

I don't see a public API for real-time chromaticity or illuminance readings from the ambient light sensor. In SensorKit, SRAmbientLightSample provides both, as chromaticity and lux. The SRFetchRequest documentation says, "SensorKit places a 24-hour holding period on newly recorded data before an app can access it."

The entitlement for SensorKit data is com.apple.developer.sensorkit.reader.allow, which its documentation describes as "required by your app's preapproved research study." I don't see another entitlement that provides real-time access to the sensor.

To request real-time access, please file an enhancement request using Feedback Assistant that describes your use case. If you file the request, please post the Feedback number here so I can make sure it gets routed to the right team.

Please note that filing an enhancement request does not guarantee Apple will add any requested functionality to Apple products in the future. However, with that said, filing an enhancement request is a good way to get your ideas in front of the folks who make decisions about that sort of thing.

If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

Thanks for checking SensorKit first and explaining why its timing doesn't fit your project.

I don't see a public API for real-time chromaticity or illuminance readings from the ambient light sensor. In SensorKit, SRAmbientLightSample provides both, as chromaticity and lux. The SRFetchRequest documentation says, "SensorKit places a 24-hour holding period on newly recorded data before an app can access it."

The entitlement for SensorKit data is com.apple.developer.sensorkit.reader.allow, which its documentation describes as "required by your app's preapproved research study." I don't see another entitlement that provides real-time access to the sensor.

To request real-time access, please file an enhancement request using Feedback Assistant that describes your use case. If you file the request, please post the Feedback number here so I can make sure it gets routed to the right team.

Please note that filing an enhancement request does not guarantee Apple will add any requested functionality to Apple products in the future. However, with that said, filing an enhancement request is a good way to get your ideas in front of the folks who make decisions about that sort of thing.

If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

Thank you for clarifying the available APIs and the SensorKit limitation.

I have submitted the enhancement request as FB25181710: "Public API for real-time ambient light chromaticity and illuminance on iPhone for display measurement."

The request describes the sequential display-patch measurement use case, why the 24-hour holding period does not fit, and the limitations of the camera-based workaround.

I would appreciate your help routing it to the appropriate team. Thank you.

Public API for real-time ambient light chromaticity on iPhone Air
 
 
Q