An immutable representation of the postal address for a contact.


class CNPostalAddress : NSObject


CNPostalAddress is a thread-safe class.


Accessing Parts of a Postal Address

var street: String

The street name in a postal address.

var city: String

The city name in a postal address.

var state: String

The state name in a postal address.

var postalCode: String

The postal code in a postal address.

var country: String

The country name in a postal address.

var isoCountryCode: String

The ISO country code for the country in a postal address, using the ISO 3166-1 alpha-2 standard.

var subAdministrativeArea: String

The subadministrative area (such as a county or other region) in a postal address.

var subLocality: String

Additional information associated with the location, typically defined at the city or town level, in a postal address.

Getting Localized Information

class func localizedString(forKey: String) -> String

Returns the localized name for the property associated with the specified key.


Postal Address Property Keys

These keys are used to specify the different properties that are always fetched. These keys may can be used with key-value coding. Neither developers nor users can add more keys.