---
title: "init(pickupLocation:dropOffLocation:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/inlistrideoptionsintent/init(pickuplocation:dropofflocation:)"
---

# init(pickupLocation:dropOffLocation:)

Initializes the intent object with the specified pickup and drop-off locations.

## Declaration

```swift
init(pickupLocation: CLPlacemark?, dropOffLocation: CLPlacemark?)
```

## Parameters

- `pickupLocation`: The starting location of the user.
- `dropOffLocation`: The user’s destination.

## Return Value

Return Value An initialized intent object or nil if the object could not be created.

## Discussion

Discussion Normally, you do not create instances of this class yourself. Instead, Maps creates instances when it requires a list of rides offered by your service. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.
