content top

iPhone Tutorial – Add Gravatar Support for your App

iPhone Tutorial – Add Gravatar Support for your App

Gravatar, globally recognized avatar is an platform (web application?) by Automattic, creators of the blogging platform WordPress. The idea behind gravatar is to associate a picture to a person using his email address. As email addresses are increasingly becoming a way to identify yourself, some commenting platforms use Gravatar APIs to display an icon using the email address you give them. The Gravatar API is ridiculously simple that, all...

Read More

iPhone Tutorial: Display WebPages within your App using this drop dead Simple XIB file

How many lines of code do you have to write for displaying a webpage ‘in-app”. 3 methinks. Wouldn’t be great if there is a built in class for presenting a webpage using “presentModalViewController”? Meet MKWebViewController. Step 1: Drop the attached three files into your project and write the following three lines on your action callback (buttonDidTap) or equivalent methods MKWebViewController *controller =...

Read More

iPhone Tutorial: Better way to check capabilities of iOS devices

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 More

iPhone Tutorial: Scheduling Local Notifications using a Singleton class

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 More

XCode Tip: Objective-C Singleton Class Template

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 More

iOS4 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
content top