I am new to this contacts applications in iPhone applications. my requirement is to add groups and sub groups to the groups Programmatically. I have achieved how to add groups to the iPhone default contact database. now I want add sub-groups to the existing groups.
I have tried to add sub-group to the groups by using ABgroup method ABGroupCreateInSource() my code is like this
ABRecordRef subGroup = ABGroupCreateInSource(group);
ABRecordSetValue(subGroup, kABGroupNameProperty, groupName, &error);
ABAddressBookAddRecord(contacts, subGroup, &error);
ABAddressBookSave(contacts, &error);
but application is crashing by giving exception like "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType length]: unrecognized selector sent to instance 0x158190'"
some body please help me. some help will be really helpful to my application.
Thanks in Advance.