I want to know if it is possible to import contacts from outlook to iPhone through code. I want to implement a sync functionality in which a user can import contacts from their Outlook into their iPhones. If so then what approach has to be followed.
There are two modes of sync.
Through iTunes and the desktop. To my knowledge, I dont think its possible programmatically to invoke iTunes and make it sync, as it rightly should be. So, there is not much left to do there.
If you are looking to sync with an existing MS Exchange server account, then there are not many choices out there but to implement the way this answer seems to point out.
However, if you are bit lucky, you might be able to get it to work with a bit of poking
-around with IMAP. There are are a few libraries out there that you could possibly repurpose. Unfortunately, there are no straight forward solutions, that atleast i kno of, for achieving this as yet and this could possibly be the easiest route. One such lib is : Remail. Another point to remember is that some c libs may also support iphone/cocoa and its not a bad idea to watch out for some of them.
Good luck.
Things are going to be different depending on which version of outlook you are using and the email server that it is connecting to. I am assuming that you are not connecting to an exchange server and that you dont want to use iTunes so your best bet to get the contacts to an iPhone is going to be a desktop app that connects to a webservice that will then sync with an iPhone app that can dump the contacts into an address book. You will have to write an exporter for your version of outlook (2003, 2007, 2010, 2011 are all still widely used) so it may just be easier to have your user open a gmail account and then use it to push the contacts to the phone.
It may seem convoluted and but the only official ways to sync your contacts are going to be through iTunes, icloud, active sync or google sync. I may just be having trouble understanding why you are trying to reinvent the wheel here so perhaps you could explain more of what you are trying to do here.
Related
I am writing an iPhone app, and I have a remote server that will deliver content. I would like to have my app poll the server once per day to see if there is new content, even if it's not running or in the background. I would also like to do this without setting up an APNS. Any advice?
You can't do that, either when your 'not' running or if you are running in the background. The best you could do is to download once per day when your app is first run / pushed to the foreground.
You could use remote notifications to "prompt" the user to bring the app to the foreground so that it could download something?
With the current apple IOS guidelines, that is about the best you can do.
I read that you are trying to avoid using APNS, but I am wondering if you are trying to avoid it for the right reasons, especially when it is designed to efficiently solve the scenario you are describing. I've seen many developers seek alternative solutions to APNS simply because the technology appeared to be complex to use after looking at Apple's documentation. The online documentation does go into a lot of details, right down to the binary protocol level.
But just to be sure you know, there are open-source libraries whose only purpose is to shield you from all these technical details. Some libraries are more complex than others, but some are remarkably user-friendly. If you have not done so already, you might like to take a look at JavaPNS and other similar projects.
Unfortunately, the iPhone cannot flag email messages for followups as it does in Outlook or Gmail. Everywhere I search, people are griping about this with no solution except for moving emails in a 'follow up folder', which is lame because I use flags on my PC with great ease. I am using Exchange to access my email and know flagging works on Windows, Treo, and some other phones. Still no email flagging in the upcoming iOS 4.3 either.
My question is if it is possible to modify the built in mail app in iPhone to give capability for flagging email messages? I'm sure this would require jailbreaking which I'm ok with. If it is not possible, what about creating a stand alone app that simply views emails with an option to flag them? Any help would be greatly appreciated.
The only options you have to get this feature are
build your own mail client for the iPhone. There is a really nice (but not up-to-date) mail framework in Objective-c called MailCore and a pretty good C framework called libEtPan
hope that Apple will support it in a new iOS version release
Have a look at the sql database for the MobileMail.app account in this folder:
/User/Library/Mail/IMAP-emailaddress#imapserver/
Edit it directly with SQLite.
The iPhone's mail application doesn't come with an extensions framework, so there's no straightforward way to modify its functionality. If you really have your heart set on this feature, the only option you really have is to jailbreak and write your own mail client. That wouldn't be a simple exercise, especially if you need Microsoft Exchange integration.
The way I would deal with this is to use the Gmail web interface, which lets you star messages. You can set up your exchange account to forward messages to Gmail, and then you'd use Gmail as your primary mail provider.
Both these solutions sound really clumsy, so I think you might have to give up on flagging messages.
Hey everyone. I have a fair amount of experience developing iOS apps, but nothing much with web/server interacting apps. For a project at work, I am making an app that will let you login, and get pictures off from a server that will then be downloaded for display and review on the local device.
I need to get some pointers on the correct approach to take. Are there built-in classes that make doing something like this easy? Once the cogent is downloaded from the server, it will be viewed locally, so all I need is to get a point in the right direction for logging in and communicating with a server…from an iPhone.
Can anybody point me in the right direction?
Me, I'm using ASIHTTPRequest Librayry to communicate / download with Internet.
For example, for an news app I download latest news in JSON (with a PHP script on a web server) and store datas with SQLite. If you need a little explanation of JSON with iPhone, check here (in french, but source codes are in english ^^)
When I need to download an image, I use ASIHTTPRequest and a queue to avoid downloading to much files at the same time.
If you want more information about a step, just say it.
Good Luck !
NURLConnection is your friend, along with its delegate methods.
Don't be lured by the temptation to use the -sendSynchronous method (which, now that I think about it, if you require authentication, you probably can't use anyway).
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
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.
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
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.
I want to write a perlscript on my iPhone that is able to give me a heads up at certain points so I'm wondering how I would go about doing that.
Is there a way to get a message through the gui from a script running in the background? I've been looking without much luck. I had a thought about inserting a fake sms into the sqlite db as a last resort but it seems somewhat unlikely that it would work.
It would be nice to be able to make a push notification style popup appear but that might too much to ask.
Any ideas?
For reasons of security and stability, Apple does not allow scripting languages on the iPhone. You can run them on a jailbroken phone but I'm given to understand it's a hassle.
From the Apple Push Notification Programming Guide:
Note: On a desktop system, a
background process is often the means
whereby users are informed of
downloadable data for an application
that currently isn’t running. But on a
device such as the iPhone, background
applications are, for performance and
security reasons, prohibited. Only one
application may be executing at a
time.
The iPhone is a secure and reliable phone first and a computer second. Computing is sacrificed to ensure a reliable phone.
I found a solution I liked so I decided to share it. I found an app for jailbroken iPhones called GriP - Growl for iPhone. Which changes the way push notifications and other messages are handled. It also makes it possible to send messages from the command line via something along the lines of:
/usr/bin/GriP -t "Title" -d "Description"
It has worked great so far.
Thank you for your help TechZen and molecules.
Do you want information from your phone itself or from an outside source? If you want information from an outside source, you could set up a Perl script on a computer to e-mail yourself notifications (see Sending Email with Perl Best Practice).