Implemented ranging on iOS

review: @schilit