---
title: CNContactFormatter
framework: contacts
role: symbol
role_heading: Class
path: contacts/cncontactformatter
---

# CNContactFormatter

An object that you use to format contact information before displaying it to the user.

## Declaration

```swift
class CNContactFormatter
```

## Overview

Overview A CNContactFormatter object handles international ordering and delimiting for the contact name components. When formatting many contacts, create an instance of this class and use the instance methods; otherwise use the class methods.

## Topics

### Creating a formatted attributed string

- [attributedString(from:defaultAttributes:)](contacts/cncontactformatter/attributedstring(from:defaultattributes:).md)
- [attributedString(from:style:defaultAttributes:)](contacts/cncontactformatter/attributedstring(from:style:defaultattributes:).md)

### Creating a formatted string

- [string(from:)](contacts/cncontactformatter/string(from:).md)
- [string(from:style:)](contacts/cncontactformatter/string(from:style:).md)

### Specifying the formatting style

- [style](contacts/cncontactformatter/style.md)
- [CNContactFormatterStyle](contacts/cncontactformatterstyle.md)

### Getting a descriptor

- [descriptorForRequiredKeys(for:)](contacts/cncontactformatter/descriptorforrequiredkeys(for:).md)
- [descriptorForRequiredKeysForDelimiter](contacts/cncontactformatter/descriptorforrequiredkeysfordelimiter.md)
- [descriptorForRequiredKeysForNameOrder](contacts/cncontactformatter/descriptorforrequiredkeysfornameorder.md)

### Getting format information

- [delimiter(for:)](contacts/cncontactformatter/delimiter(for:).md)
- [nameOrder(for:)](contacts/cncontactformatter/nameorder(for:).md)
- [CNContactDisplayNameOrder](contacts/cncontactdisplaynameorder.md)

## Relationships

### Inherits From

- [Formatter](foundation/formatter.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Formatters

- [CNPostalAddressFormatter](contacts/cnpostaladdressformatter.md)
- [CNContactVCardSerialization](contacts/cncontactvcardserialization.md)
- [CNContactsUserDefaults](contacts/cncontactsuserdefaults.md)
