title: Can I get a specific value of the proximity sensor in swift?
body: <p>I am currently trying to make an iOS version of an android app, which collects sensor data. And I am having a problem on getting a specific value of the proximity sensor in Swift.</p>
  <p>While <code>TYPE_PROXIMITY</code> in Android returns an int type value of distance from object in cm unit, <code>CLProximity</code> of Swift only returns enum values telling whether the distance is far or near.</p>
  <p>I'm pretty sure that there must be also a way to get the specific value in Swift since it is available in Android... but I can't find a way.</p>
  <p>reference:</p>
  <p><a href="https://developer.android.com/reference/android/hardware/Sensor#TYPE_PROXIMITY" rel="nofollow noreferrer">https://developer.android.com/reference/android/hardware/Sensor#TYPE_PROXIMITY</a>
  <a href="https://developer.apple.com/documentation/corelocation/clproximity" rel="nofollow noreferrer">https://developer.apple.com/documentation/corelocation/clproximity</a></p>