ABAddressBookCopyArrayOfAllPeopleInSource - iphone

I built an iphone app that syncs with the iphone address book.
with some users, the contact list has "linked contacts" or unified or merged contacts, they appear at the bottom. so some users have one person as the main contact and more linked contacts for the same/or other contact in the exchange server or mobileMe or whatever.
I tried running ABAddressBookCopyArrayOfAllPeopleInSource with kABSourceTypeLocal but it still returned duplicate contacts when encountering contacts with linked contacts
how can I make sure I sync only the main identify without duplicates ?

You can use a class with the singleton pattern.

Related

Is there a way to get the Suggested Contacts through Outlook API?

I'm currently developing an app that fetches my contacts in my Microsoft account.
The problem is, unlike Google, when I send or receive an email to/from a new contact, it isn't copied into My Contacts, so I can't get it through https://outlook.office.com/api/v2.0/me/contacts.
However, when I wrote a new email, it appears as a suggestion, so I guess it is stored somewhere else.
The question is: is there a way to access to my suggested contacts through the API to get their emails? And how?
Thank you 😊
This feature is only available in beta version for now, please see the following api:
https://outlook.office.com/api/beta/me/contacts?$select=EmailAddresses,GivenName,Surname,DisplayName
This api will return all the contacts that you have received an email from or sent an email to :)
The closest thing to what you're looking for is the People API. As that page says:
The People API returns relevent person entities with each request. A person aggregates information from across mail, contacts and social networks. The results are ordered by their relevance, which is determined by the criteria specified in the request and ranked based on multiple communication, collaboration and business relationships.

Is there a sample of displaying a BBM contact list using Cascades on BB10?

I have been struggling for a little while to get the contact list from a BBM connected app so that I can choose a contact to work with.
I am using the bb::platform::bbm::ContactService class, but whenever I call contacts() it comes back as null, even when the registration process is completed.
That method returns a list of contacts that have your application installed. There isn't a way for an application to read all of the user's BBM Contacts.
If you are looking to initiate a chat, you can use the invocation framework to do so and not specify a PIN. This will bring up the BBM contact picker - listing all BBM Contacts - for the user to select from.
Did you check to make sure your app has the right permissions? It should have access_pimdomain_contacts.

How to register callbacks for Googles Contacts API?

Instead of querying my server every x minutes for changes in my Google Contacts I rather like a certain URL to be called when a contact has been added, updated or removed either through GMail or my iPhone.
Is there a way I can register callbacks to do so?
For instance, at this point I added my GMail account to my iPhone and iMac. When I open the Contacts.APP I can see all my Gmail contacts. When I add a contact it will automatically be updated on my iPhone, on my iMac and in the GMail webinterface. However, I like to know when such an event occurs to run additional tasks through the Google Contacts API.

How to take a diff of app contacts against phoneBook or diff of 2 ABAdressBookRef's?

I have a contact book on my application and need to sync those contacts with server cum phonebook regularly.
Rather taking total phoneBook to update app's contacts, I am thinking of diff of changed contacts for which I didn't find a functionality in ABAddessBook API. Problem is that the contact objects in the app are of different type to contact objects that I get from phoneBook
via function ABAddressBookCopyArrayOfAllPeople().
If I get difference of changed contacts efficiently, then I can just sync those contacts only.
Will that be possible?
Hey! I found that we can register to ABAdressBook change by ABAddressBookRegisterExternalChangeCallback, but is there a way to get diff of changed contacts?
Thanks.

Can i build an app that edits the conatct list on the iphone?

Hey everybody,
I want to create an app that handles some sort of recognition of another person in my area, and creates a new contact based on his info. regardless to how it is done, my question is more basic - can i, or maybe i should ask will Apple approve an application that edits the contact list in the IPhone?
The AddressBook framework allows access to a centralized contacts database, called the Address Book database, that stores a user’s contacts.
Yes of course you can edit the contact List from your application by using the address book API.
Cheers