Temperature/Humidity/Pressure API

Hi!
Is it possible to get iPhone's Temperature/Humidity/Pressure/Battery_Voltage/Acceleration_Values using API calls?
I want to make an app that displays these values from iPhone internal sensors. Is it possible?
Thank you

Replies

For accelerometer, yes:

https://developer.apple.com/documentation/coremotion/getting_raw_accelerometer_events?language=objc


For battery, you can get the battery level and battery state (on charge…)

https://developer.apple.com/documentation/uikit/uidevice/1620042-batterylevel

Other battery info are private API

Go and search on Google with "get iphone battery voltage programmatically"


For ambient temperature and humidity, I guess the best would be to access some web site to get those info in real time. Don't think they are accessible with API.

Use SensorKit