How to get postal address id from a contact iOS swift 5

90 views Asked by At

i'm fetching contacts from iphone with complete contact detail i have recieved address and address label store with it but i want id of that address.

for postalAddress in contact.postalAddresses {
                    let title: String  =  CNLabeledValue<NSString>.localizedString(forLabel: postalAddress.label ?? "Location")
                    addresses.append(ContactInfo.Address(street: postalAddress.value.street, city: postalAddress.value.city, country: postalAddress.value.country, postalCode: postalAddress.value.postalCode, state: postalAddress.value.state, title: title, latitude: 0.0, longitude: 0.0))
                }
0

There are 0 answers