开发者

How to get the contacts programmatically using MonoTouch c#?

开发者 https://www.devze.com 2023-02-19 00:09 出处:网络
How to get the contacts in iPhone? I need to get all attributes from iPhone 开发者_如何学Gocontacts. How to achieve programmatically using MonoTouch?ABAddressBook iPhoneAddressBook = new ABAddressBook

How to get the contacts in iPhone? I need to get all attributes from iPhone 开发者_如何学Gocontacts. How to achieve programmatically using MonoTouch?


ABAddressBook iPhoneAddressBook = new ABAddressBook();

ABPerson[] Contacts = iPhoneAddressBook.GetPeople();

foreach (ABPerson item in Contacts) {

    ABMultiValue<NSDictionary> Contact  = item.GetPhones();

    foreach (ABMultiValueEntry<NSDictionary> cont in Contact) {
                // cont.Label  indicates the type ( home,work,etc)
        // get the contact via cont.Value

    } 
}


Use ABAddressBook

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号