<!--
{
  "availability" : [
    "iOS: 2.0.0 - 9.0.0",
    "iPadOS: 2.0.0 - 9.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "AddressBookUI",
  "identifier" : "/documentation/AddressBookUI/ABCreateStringWithAddressDictionary(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Address Book UI"
    ],
    "preciseIdentifier" : "c:@F@ABCreateStringWithAddressDictionary"
  },
  "title" : "ABCreateStringWithAddressDictionary(_:_:)"
}
-->

# ABCreateStringWithAddressDictionary(_:_:)

Returns a formatted address from an address property.

```
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

The formatted address (may include line endings).

## Discussion

The address is formatted based on the address’s country code (<doc://com.apple.documentation/documentation/AddressBook/kABPersonAddressCountryCodeKey>).  In general, the country code should be set to correspond with the country or region name (<doc://com.apple.documentation/documentation/AddressBook/kABPersonAddressCountryKey>).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)