Hello,
I've been trying to use the u3DXT framework for a few days to add a new contact in to address book. I've tried several approches, but none of them worked. Here is the "best" code I have so far:
public void AddContact() {
Debug.Log ("Will add contact");
var book = ABAddressBook.Create ();
var person = ABPerson.Create ();
var firstname = new CFType(null, "Firstname");
var lastname = new CFType(null, "Lastname");
person.SetValue (ABPerson.kABPersonFirstNameProperty, firstname, null);
person.SetValue (ABPerson.kABPersonLastNameProperty, lastname, null);
book.AddRecord (person, null);
bool success = book.Save (null);
Debug.Log ("Success ?" + success);
}
This code adds a contact in the address book, but it has no info, and is registered as "No name". Am I missing something?
↧