---
title: distance
framework: nearbyinteraction
role: symbol
role_heading: Instance Property
path: nearbyinteraction/ninearbyobject/distance-9atp7
---

# distance

The distance from the user’s device to the peer device in meters.

## Declaration

```occ
@property (nonatomic, readonly) float distance;
```

## Mentioned in

Initiating and maintaining a session

## Discussion

Discussion This property contains the distance in meters between the local device and the peer device described by NINearbyObject. If the framework fails to acquire the peer device’s distance, the value is NINearbyObjectDistanceNotAvailable. The maximum detectable range depends on environmental factors. For example, a clear path between the two devices increases the detectable range, and solid obstructions to the device’s line of sight constrict the range. important: The framework doesn’t implement secure ranging, so don’t rely on Nearby Interaction to provide users with secure access, for example, security clearance, based on the value of this property.

## See Also

### Acquring relative distance

- [NINearbyObjectDistanceNotAvailable](nearbyinteraction/ninearbyobjectdistancenotavailable.md)
