Beispiel #1
0
    private void addNewContact()
    {
        ABAddressBook addressBook = ABAddressBook.Create();

        ABRecord person = ABPerson.Create();

        person.SetValue(ABPerson.kABPersonFirstNameProperty, CFType.FromObject("vitapoly"), null);
        person.SetValue(ABPerson.kABPersonBirthdayProperty, CFType.FromObject(new DateTime(2000, 1, 1)), null);

        addressBook.AddRecord(person, null);

        addressBook.Save(null);

        Log("Added vitapoly to address book.");
    }