The iPhone OS started off with a single device, the original iPhone, ala, iPhone 1,1. In the last three years, Apple has been innovating hard and introduced multiple devices running the same operating system with different capabilities. For example, the original iPod touch, iPod 1,1 wasn’t able to record audio input, and till date iPod Touch cannot vibrate as a result of an alert. There are many such subtle differences between...
Read MoreiPhone Tutorial: Better way to check capabilities of iOS devices
iPhone Tutorial: Scheduling Local Notifications using a Singleton class
In iOS 4, Apple introduced a new way to send “push notifications” to your app without having a dedicated server and associated server side coding. The technique is called as scheduling local notifications. While this tutorial is about how to schedule local notifications, I would also explain how a powerful abstraction concept, Singleton design pattern could make this easier when adding local notification support to your app. If...
Read MoreXCode Tip: Objective-C Singleton Class Template
I have a habit of creating Singleton pattern classes for nearly every application I write. I manage the Settings Bundle (or any app settings, thru a Singleton class), my MKStoreManager for doing in-app purchases is a Singleton class. Even in Apple’s own code you can see some Singletons like UIApplication, Reachability (from the Reachability example), UIDevice and such. You normally access them through an exposed instance of the class....
Read MoreDisplay Comparison : iPad vs iPhone 4 vs Nexus One
The following photo was taken using my hi-res super macro camera, Canon S5 IS. A quick comparison in the displays of iPad, iPhone 4 and Nexus One. The iPhone 4 display is clearly superior. You can download a higher resolution version of this image by right clicking the above image and clicking “Save link as…” Be forewarned, most low end computers can’t even open that image (as on the date of writing this). The...
Read MoreTutorial: Setting up Git on your Mac
Every programmer will one day realize that Git is easily the best available source code control on the planet. I was a fervent follower of SVN so far and even wrote SVN is the best source code control. The only reason that daunted me to use Git is to use the command line interface. But, if you master the command line, Git is all yours to command. Moreover, with tighter integration of XCode 4 and Git, I think it’s a great idea to...
Read MoreiPhone Dev Tip: Breaking the AdHoc Provisioning Nightmare on Windows
Anti-DRM fans might quip, but iPhone Developers love this digital signatures and provisioning as it reduces piracy dramatically. But all these aren’t free. Provisioning comes with a cost, especially when you write a iPhone app and want to share it with your friends/clients for beta testing. Apple has an excellent documentation on how to do an AdHoc build. Yet still, most users stumble upon especially when they have to make a build and...
Read MoreiOS4 Issue: NSURLConnection and NSOperation
Everyone knows NSOperation is easily the best way to automatically gain powerful multi-threading on iOS/Mac platforms. However, recently for one of my apps, I faced a issue where, the NSURLConnection’s initWithRequest method doesn’t automatically start even if you forcefully send the “start” message. For example the below code works perfectly on iPhone OS 3.1 and below but fails on iOS 4. - (void)start { [self...
Read More