Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 876
Igor Avatar asked Mar 20 '17 01:03

Igor


1 Answers

Just found a way:

let mutableContact = contact.mutableCopy() as! CNMutableContact
like image 195
Igor Avatar answered Oct 27 '22 17:10

Igor