Igor
Igor

Reputation: 12303

How to convert CNContact to CNMutableContact?

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?

Upvotes: 9

Views: 3167

Answers (1)

Igor
Igor

Reputation: 12303

Just found a way:

let mutableContact = contact.mutableCopy() as! CNMutableContact

Upvotes: 25

Related Questions