1

On iOS, is it possible to get information about the sensors available (like accelerometer, magnetic, light, proximity, gyroscope, etc…)?

Is there any method like getSensorList(), getVendor(), getModel()?

1 Answer 1

1

For the accelerometer, gyroscope and magnetometer, use a CMMotionManager.

For the proximity sensor, you can try to set the proximityMonitoringEnabled property on the current UIDevice to YES. Then check the proximityMonitoringEnabled property. If its YES, then the device has a proximity monitor, if its NO then it doesn't.

For the 'light', you are most likely interested in whether or not the device has a flash or a torch. AVCaptureDevice has the properties you are looking for.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.