---
title: CLError.Code.rangingUnavailable
framework: corelocation
role: symbol
role_heading: Case
path: corelocation/clerror-swift.struct/code/rangingunavailable
---

# CLError.Code.rangingUnavailable

A constant that indicates ranging is disabled.

## Declaration

```swift
case rangingUnavailable
```

## Discussion

Discussion This might happen if the device is in Airplane mode or if Bluetooth or location services are disabled.

## See Also

### Getting general errors

- [CLError.Code.locationUnknown](corelocation/clerror-swift.struct/code/locationunknown.md)
- [CLError.Code.denied](corelocation/clerror-swift.struct/code/denied.md)
- [CLError.Code.promptDeclined](corelocation/clerror-swift.struct/code/promptdeclined.md)
- [CLError.Code.network](corelocation/clerror-swift.struct/code/network.md)
- [CLError.Code.headingFailure](corelocation/clerror-swift.struct/code/headingfailure.md)
- [CLError.Code.rangingFailure](corelocation/clerror-swift.struct/code/rangingfailure.md)
