Module 03 Β· iOS: reading LiDAR depth β Lesson 1 of 1 Β· ~11 min
An ARKit view that streams depth
The native view is where the real work is
On iOS, the depth comes from ARKit. You run an AR session with scene depth turned on, and each frame carries a depthMap β a buffer of distances. Your ExpoView subclass hosts an ARSCNView, acts as the session's delegate, and on every frame reads the depth at the center pixel and fires it up to JS.
Key fact you'll quote later: ARKit's depthMap is a CVPixelBuffer of Float32 values already in meters. No unit conversion on iOS. (Android will be different β hold that thought.)