Created
November 28, 2013 16:40
-
-
Save mikebluestein/7694724 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSError err; | |
ab = ABAddressBook.Create (out err); | |
if (err == null) { | |
ab.RequestAccess ((allowed, err1) => { | |
if (allowed) { | |
var people = ab.GetPeople (); | |
foreach (ABPerson person in people) { | |
Console.WriteLine ("{0} {1}", person.FirstName, person.LastName); | |
var phones = person.GetPhones (); | |
if (phones.Count > 0) { | |
foreach (var phone in phones) | |
Console.WriteLine (" {0}, {1}", phone.Label, phone.Value); | |
} | |
} | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment