> For the complete documentation index, see [llms.txt](https://docs.sentiance.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sentiance.com/sdk/api-reference/ios/transport-sessions/sentlocationdataiterator.md).

# SENTLocationDataIterator

An iterator that can be used to retrieve locations.

Iterating over the locations may be expensive, so avoid doing it directly on the main application thread.

```objectivec
SWIFT_CLASS_NAMED("LocationDataIterator")
@interface SENTLocationDataIterator : NSObject
```

## SENTLocationDataIterator API

### `next`

> Returns the location if available otherwise returns `nil`.
>
> ```objectivec
> - (CLLocation * _Nullable)next;
> ```
>
> \
> Example code:
>
> ```objectivec
> SENTLocationDataIterator *locationDataIterator;
> CLLocation *location;
> while ((location = [locationDataIterator next]) != nil) {
>   // location object
> }
> ```
