B4i Library [class] Contacts Library

Discussion in 'iOS Libraries' started by narek adonts, Mar 27, 2015.

  1. narek adonts

    narek adonts Well-Known Member Licensed User

    Hi,

    Please see attached a wrapper for ABAddressBook to access iOS contacts.
    I will create a tutorial a bit later but it is very easy. Please see the attached project.
    You can access contacts and also create a new contact.
    There is a little bug when authorizing first time, the app is not continuing after first authorization.

    Please let me know your thoughts

    Narek
     

    Attached Files:

    Mark Turney, Albi and Ramezanpour like this.
  2. narek adonts

    narek adonts Well-Known Member Licensed User

    In debug mode it works a bit slowly, but in release mode is perfect.
     
  3. Albi

    Albi Active Member Licensed User

    This is very cool!

    Do you know why the authorisation doesn't work the first time?
     
  4. narek adonts

    narek adonts Well-Known Member Licensed User

    I will check)
     
  5. Albi

    Albi Active Member Licensed User

    thank you kindly.

    Do you also know if there is a way to get the sorting type that the user has in their phonebook (ie sort_by_firstname, or sort_by_lastname)?
    do I just run GetAllContacts instead of GetAllContacts2 or GetAllContacts3? (I tried that and it returned an apparently random order!)
     
  6. narek adonts

    narek adonts Well-Known Member Licensed User

    GetAllContacts (SortOrdering As Int)
     
  7. Albi

    Albi Active Member Licensed User

    sorry, i meant how to get the users preference for sorting, based on their iPhone settings and use that instead of setting it when initialising.
    I should have googled it first!
    I just changed the mContacts file, in a GetAllContacts function, to have
    Code:
    ABPersonGetSortOrdering()
    instead of
    Code:
    kABPersonSortByFirstName
    and it works.
     
  8. palmzac

    palmzac Active Member Licensed User

    Hi,

    How to handle the categories in this library ? ( e.g. Add/Delete/Change Categories ) Would you help me ? Thanks !
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice