How to convert CNContact to CNMutableContact?

3.1k Views Asked by At

I need to get contact, change it, and store back.

CNContactStore().unifiedContacts gives me CNContact instance, but CNSaveRequest().update requires CNMutableContact.

How to convert CNContact to CNMutableContact?

1

There are 1 best solutions below

1
On BEST ANSWER

Just found a way:

let mutableContact = contact.mutableCopy() as! CNMutableContact