objective-ciphoneios9.1

How do you add a contact to a group programmatically in ios 9 using the Contact framework


I have an app which needs to create a group and add contacts to them dynamically based on certain criteria. Prior to ios9 I was using the addressbook framework to do this. As it is deprecated, i want to now migrate it to Contact framework. I am not able to find how I can add a contact to a group using CNContact or CNGroup API reference documents. Please advice.


Solution

  • I found the class which helps me put this together : CNSaveRequest Class