I'm trying to set the kABPersonType value for a contact (ABAddressBook iOS).
ABRecordSetValue(person, kABPersonType, [currentContact personType], nil);//person type (individual or company
[currentContact personType] is an NSNumber.
An error gets thrown when we reach ABAddressBookSave.
As follows;
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFNumber length]: unrecognized selector sent to instance 0x6805ff0'
In all other cases; e.g.
ABRecordSetValue(person, kABPersonNoteProperty, [currentContact note], nil);
The setting of properties is fine.
Any ideas why this is happening?
Cheers,
Rich