Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Problems to register a new contact in address book

$
0
0
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?

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>