views:

252

answers:

3

hi all, i want to create a application which sync my iPhone contacts to my server and vice-versa. i read a article on google Get Google Sync on your phone . i want to this type of feature which directly update the contact without user interaction (however one time setting is desired).

any body have idea how the google sync work . Please advice me that how can i achieve this task. any suggestion and link is greatly appreciated

A: 

The 3.0 SDK will allow your application to read contact data on the phone. Web services will allow you to publish that data to your server, and receive updates. You may also want to use coredata to store a hash of all contact data so you can tell what is new / updated and just send that data to your server.

Andiih
i want to check which contacts are updated, added or deleted after a given time. can you provide me some helpful link ?
Rupesh
Hey - I can't offer much help here, but I worked at a company last summer that did contact sync as part of their mobile email solution and they had to employ a few people full time to build an intelligent sync solution. I think determining what is new/updated is actually quite a challenge!
Ben Gotow
+5  A: 

I think it's important to separate the two overlapping approaches in your question.

Firstly, Google Sync is essentially a way to use Microsoft Exchange protocols and to setup a Mail / Contact / Calendar profile on an iPhone. The iPhone OS supports this feature, not an iPhone App in the App Store. Google Sync leverages this fundamental capability of the phone by exposing the data (mail, contacts, calendars) via these known protocols. If you want to expose data in this way to your users, setup a Microsoft Exchange server and ask questions on serverfault.

Secondly, there are iPhone apps. iPhone apps sold in the app store are not currently allowed to run in the background. This means you can't emulate functionality like iTunes or Mail where your music plays while you are browsing the web, or mail checking is done while you are playing a game of Mini Squadron. If you want this backgrounding capability, file a bug/enhancement with Apple.. However, you can interact with iPhone contacts (Address Book) via the API.. You can also of course "re-invent the wheel" and expose the data however you like via the internet, and consume that data from a custom iPhone App with the one caveat that users would need to actively launch your application to get to this data and it would not be integrated with the built-in iPhone Calendar, Address Book or Mail applications. Some good examples of that are some of the music community apps that have messaging systems built into them. Presumably that is all being done with web services.

EDIT: It is also worth mentioning that should you go the "iPhone App" route, you should at least consider if push notifications are right for you, and if so how you will handle it.

slf
hi sif,in iPhone there are option in Settings-> Mail,Contacts,Calendars--> Add Account--> Other--> Contacts--> Add LDAP Account. I think it is used to sync the Address Book Contact on LDAP server to iPhone and vice-versa. If yes, then i want to this type of functionality. whether you have any idea that how can configure a LDAP server so we can fill the account and server info in iPhone and it sync contact from server(and vice-versa)there are a database of contacts in server. so i want to use this database as contact book.Please advice or provide some helpful link
Rupesh
That is really all dependent on the LDAP server you choose. I would ask around on serverfault.com for more info on LDAP+iPhone admin
slf
+1  A: 

Have you seen the API-Docs?

http://developer.apple.com/iphone/library/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/100-Introduction/Introduction.html

Next there is an application I use called Funambol - it is a sync4j Server/Client. They have an open source application to sync contacts on the iPhone. Source is somewhere in their repository, informations here: http://forge.ow2.org/scm/?group_id=96

As slf told you your application must run in foreground. This may limit you.

Good luck & best regards, Florian http://www.lagg.at

Florian Lagg