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 MoreiPhone Tutorial: Scheduling Local Notifications using a Singleton class
XCode Tip: Objective-C Singleton Class Template
Update: An updated version for XCode 4 is available. Please check it out here. 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),...
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