8. Mai 2009

Installing iPhone SDK 3.0

Tonight Apple sent out a mail to all developers enrolled in the iPhone Development Program prompting us to test all our applications with the soon to be released SDK 3.0. Though the apps must be compatible with the changes in 3.0, they currently are not allowed to be build with the new SDK. This requires developers to keep both instances of Xcode during the transitional period. So be sure to install the new Xcode to a different location (the neccessary steps are described in the accompanied README).

Happy beta testing and quick app approvals to all of you! :)

5. Mai 2009

Gravatar loading with Objective-C

Working on iOctocat I had to integrate Gravatars. Therefore I wrote an Objective-C GravatarLoader class that I would like to share. You can use it like this:

- (void)viewDidLoad {
   [super viewDidLoad];
   gravatarLoader = [[GravatarLoader alloc] initWithTarget:self andHandle:@selector(setGravatarImage:)];
   [gravatarLoader loadEmail:@"your@email.com" withSize:50];
}

The gravatarLoader needs to be an instance variable of the class that’s using it as it loads the Gravatar asynchronously. You initialize the GravatarLoader with a target object and a selector. The selector works as request handle and gets passed an UIImage when the Gravatar is loaded. After initializing it you can load the image with the email address and the square size.

Download the GravatarLoader source.