Capturing contact street, city, stqte, zipcode from contact details in iOS Xcode 8

I am writing some code in Xcode 8 that allows the user to select a contact, then have that contacts name, street, city, state, country, and zipcode populate into a label on the view controller then pass that information to another view controller. I have been successful in capturing the full name, e-mail, and telephone numbers and populating that information into the label. However, I can’t figure out just how to capture the details of street, city, state, country and zipcode. There are properties for name, email, and telephone, but there is only PostalAddress as a contact property, none of those I am after. I have been trying many many iterations, and searching for information on Stack Overflow and you tube without any success. If anyone has some insight to share I would be most grateful for your assistance.
Best Regards !
Tom

Hi @twglodek

I assume you are talking about CNContact class, am i correct? You could take all the information you need from the CNPostalAddress, take a look at it’s properties - Apple Developer Documentation.
Hoper this is helpful.

Nikita

This topic was automatically closed after 166 days. New replies are no longer allowed.