---
title: "geocodeAddressDictionary(_:completionHandler:)"
framework: corelocation
role: symbol
role_heading: Instance Method
path: "corelocation/clgeocoder/geocodeaddressdictionary(_:completionhandler:)"
---

# geocodeAddressDictionary(_:completionHandler:)

Submits a forward-geocoding request using the specified address dictionary.

## Declaration

```swift
func geocodeAddressDictionary(_ addressDictionary: [AnyHashable : Any], completionHandler: @escaping @Sendable ([CLPlacemark]?, (any Error)?) -> Void)
```

```swift
func geocodeAddressDictionary(_ addressDictionary: [AnyHashable : Any]) async throws -> [CLPlacemark]
```

## Parameters

- `addressDictionary`: An Address Book dictionary containing information about the address to look up.
- `completionHandler`: A block object containing the code to execute at the end of the request. This code is called whether the request is successful or unsuccessful.

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func geocodeAddressDictionary(_ addressDictionary: [AnyHashable : Any]) async throws -> [CLPlacemark] For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously. This method submits the specified location data to the geocoding server asynchronously and returns. Your completion handler block will be executed on the main thread. After initiating a forward-geocoding request, do not attempt to initiate another forward- or reverse-geocoding request. Geocoding requests are rate-limited for each app, so making too many requests in a short period of time may cause some of the requests to fail. When the maximum rate is exceeded, the geocoder passes an error object with the value CLError.Code.network to your completion handler.

## See Also

### Geocoding an address

- [geocodeAddressString(_:in:preferredLocale:completionHandler:)](corelocation/clgeocoder/geocodeaddressstring(_:in:preferredlocale:completionhandler:).md)
- [geocodeAddressString(_:completionHandler:)](corelocation/clgeocoder/geocodeaddressstring(_:completionhandler:).md)
- [geocodeAddressString(_:in:completionHandler:)](corelocation/clgeocoder/geocodeaddressstring(_:in:completionhandler:).md)
- [geocodePostalAddress(_:completionHandler:)](corelocation/clgeocoder/geocodepostaladdress(_:completionhandler:).md)
- [geocodePostalAddress(_:preferredLocale:completionHandler:)](corelocation/clgeocoder/geocodepostaladdress(_:preferredlocale:completionhandler:).md)
