Search This Blog

Wednesday, April 6, 2011

Tutorial: RouteWeather Using Google weather and Driving Directions APIsin your iOS apps

First off, let me say this: Google's terms of service do not allow you to use their APIs for any commercial apps. So it is likely that if you use these APIs, they may never see the light of day in the app store, unless you negotiate a commercial deal with Google.

Here is what we will be developing: Let's assume you are planning a trip from Bethesda, MD to 90210, CA and you plan to drive (Yeah a road warrior!).  You can get the driving directions from many places, including Google. What you also want is, what "what is the weather along the route". Not only that, you want it for the day you plan to drive (so maybe tomorrow, the day after, or the day after the day after...)

I often need this information. I don't drive cross country, but I do drive and knowing the weather along the route and for the day I want to drive is very useful to me. I wish we had an app for that. Well, let's not wish, let's write one.

In the process, you will learn how to:

a) Use TBXML for XML parsing

b) Use Google Weather and Driving directions XML data

c) Use segmented controls

d) Use TableViews and custom cells

e) Write an app that brings all of this together

*** Credits: The fine folks at icodeblog started me off with this article. ***

First the customary screen shots:

First Screen: You enter your from and to and select which day you want the forecast for:



Monday, April 4, 2011

iPhone Programming: Who Just Called Me?

The best way to learn programming is to solve tasks that irk you. Well, here is something that irked the heck out of me. I often receive calls from outside of the US (India, Korea, Japan etc.). Very often, the incoming caller id leaves out the prefix. Example, instead of "+91 981234 5678"  I get just "9812345678", or, instead of "+82 111 11111" I just get "82 111 11111". The irritating part is that the iPhone cannot map it to my address book. Fine. But there is the additional irritant - If I search the iPhone address book, I can't search by phone number :-(

Damn. So now I am left guessing who just called me. It happened so often, I finally decided to do something about it. Or, I decided to solve the damn problem.

Friday, April 1, 2011

Total Finder: Total Satisfaction

Every once in a while, I come across a tool that makes a big difference to you doing just small things. When I say 'small', I don't necessary mean 'simple'. I mean, it is so integrated into another tool that you may already use, that its differences are never in your face, but you feel it all the time.

Before I confuse you any more, I am talking about TotalFinder by Antonin Hildebrand an extension to Snow Leopard's Finder.The Finder is to Snow Leopard what the File Explorer is to Windows. You use it for everything - copying, deleting, finding, mapping drives and what-not. While the OSX finder is in many ways better than File Explorer, I also think it had limitations. Instead of telling you what they are, let me just describe TotalFinder and why I loved it.