B4i Library Contacts Library (iOS 9+)

Hi All,

Just had a bit of fun with the Contacts framework in iOS 9 (what better way to spend a Saturday night right?)

I know there's a class out there(it might be better so please check). This was more of me playing around with the contacts framework than anything and testing it out. It seems I have beat Erel to creating an iOS 9 contacts lib :)

So the usage is quite simple:
B4X:
Dim hc As HHContacts
Dim l As List = hc.GetContactsListWithPhonesAndEmails
'continue processing contacts. All items in the returned list are of type HHContact

HHContact type provides FirstName, MiddleName, LastName properties of type String and also provides two list properties: phones and emails which contain items of type String.

There's another method in the library which only gets the phone numbers without the email lists. This is for efficiency reasons(the less you fetch the better it is).

There's currently no support for contact addition or updates. As I said earlier, Erel has planned a contacts library for future so it may not be required to update this library. But if it takes a back seat (or if you're particularly convincing in your request:) ) I might add update methods to this library.

For setup, copy the .a and .h to your local mac server's Libs directory and the xml to your B4i's additional libs directory.

Have fun!
 

Attachments

  • HHContacts.zip
    18.2 KB · Views: 21
  • ContactsTest.zip
    4.3 KB · Views: 15
Top