---
title: "ABCreateStringWithAddressDictionary(_:_:)"
framework: addressbookui
role: symbol
role_heading: Function
path: "addressbookui/abcreatestringwithaddressdictionary(_:_:)"
---

# ABCreateStringWithAddressDictionary(_:_:)

Returns a formatted address from an address property.

## Declaration

```swift
func ABCreateStringWithAddressDictionary(_ address: [AnyHashable : Any], _ addCountryName: Bool) -> String
```

## Parameters

- `address`: A dictionary representing the address property to format.
- `addCountryName`: Specifies whether to include the name of the country or region in the returned formatted address. When doc://com.apple.documentation/documentation/Swift/false and address includes a country or region name, that country or region name is still included in the return value. When doc://com.apple.documentation/documentation/Swift/true and address doesn’t include a country or region name, the country or region name is added to the return value. (The country or region name is generated from the country code entry in address; see Address Property.)

## Return Value

Return Value The formatted address (may include line endings).

## Discussion

Discussion The address is formatted based on the address’s country code (kABPersonAddressCountryCodeKey).  In general, the country code should be set to correspond with the country or region name (kABPersonAddressCountryKey).

## See Also

### Detail Display

- [ABNewPersonViewController](addressbookui/abnewpersonviewcontroller.md)
- [ABPersonViewController](addressbookui/abpersonviewcontroller.md)
- [ABUnknownPersonViewController](addressbookui/abunknownpersonviewcontroller.md)
