I'm new to Swift, but I have to make an app that can real-time detect any obstacle and measure the distance from the iPhone to the obstacle. Is it feasible to use ARKit to capture clear depth data in this case?
Can I measure distance from rear camera to an object?
A similar question was answered some time ago on the forum, with a proposed tutorial.
https://developer.apple.com/forums/thread/121374
Hope that helps.