On the sensor (Sensor), Apple official does not seem to have been specifically listed in the introduction, I can only look for articles from predecessors, many articles have been given to the iOS sensors are very detailed classification of the introduction, but some sensors have just had an introduction, there is no introduction to the use of methods or API, of course, there is a possibility that I didn't search for, such as the humidity sensor many articles have been mentioned, but the detailed use of methods have not been seen. For example, the humidity sensor has been mentioned in many articles, but I haven't seen the detailed usage. Or does it refer to the environment outside of the iPhone?
The iPhone's sensors have changed and improved over time, and because the sensors have a name, it's clear that the changes and improvements have to do with the hardware. There's a great article on the evolution of the iPhone's sensor over the last decade - the Knowledge column - that goes into a lot of detail.
I'm going to do an imprecise categorization of iOS sensors based on what I've seen.
Hi-iD's answer introduces the relationship between these two sensors, which I briefly summarize as follows:
The use of the distance sensor is relatively simple:
Now a hole in the center of the top of the iPhone can be obscured, and you can feel the distance sensor.
Core Motion is a framework for using five sensors: accelerometers, gyroscopes, pedometers, magnetometers, and barometers. Sensors using the framework, for the time being, in accordance with the literal translation of the core motion framework. The official documentation describes this:
The next post is about learning to use Core Motion.