Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CNContact.AddPostalAddress

Adds an postal address to a contact.

Component Version macOS Windows Linux Server iOS SDK
Contacts 8.4 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "CNContact.AddPostalAddress"; ContactIdentifier { ; Label; Street; City; State; postalCode; country; ISOCountryCode; subLocality; subAdministrativeArea } )   More

Parameters

Parameter Description Example Flags
ContactIdentifier The contact identifier. "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E"
Label The label to use.
For your convenience we translate Work, Home and Other to the right values, so they get localized in display.
Default label is Other.
"Work" Optional
Street The street name with house number. "Teststreet 123" Optional
City The city name. "Greatcity" Optional
State The name of the state. "TX" Optional
postalCode The postal code. "12345" Optional
country The name of the country. "USA" Optional
ISOCountryCode The ISO country code. "US" Optional
subLocality The sub locality.
Only used on MacOS 10.12.4 or iOS 10.3 and newer.
Optional
subAdministrativeArea The sub administrative area.
Only used on MacOS 10.12.4 or iOS 10.3 and newer.
Optional

Result

Returns OK or error.

Description

Adds an postal address to a contact.
This is a convenience function to add just one postal address account with a given label to the contact.
Please call CNContactStore.UpdateContact later to store the values.

See also

Example Databases

Created 1st August 2018, last changed 3th August 2018


CNContact.AddPhoneNumber - CNContact.AddPostalAddressJSON