iPhone and Mac OS X Developer Conference Roundup

Here’s a quick review of the most important iPhone and Mac OS X developer conferences I’ve found on the web (in no particular order). Definitely, there’s no shortage of conferences when you need information about the latest Cocoa, Mac OS X and iPhone technologies; check this out!

  • Apple’s Worldwide Developer Conference or WWDC, held every year in San Francisco, CA (USA), usually around June, and featuring presentations from Apple employees; if you’ve never been to one, believe me, you should;
  • Voices That Matter iPhone Developer Conference to be held in Boston, MA (USA) next October 17th and 18th, with (among others) Erica Sadun, Aaron Hillegass, Stephen Kochan and Marcus Zarra;
  • NSConference, to be held from January 31st to February 3rd next year near Reading (UK), and from February 21st to February 24th in the Georgia Tech Institute, GA (USA), featuring (among others) Matt Gemmell, Marcus Zarra and Aaron Hillegass;
  • The 360|iDev conference that just finished in Denver, CO (USA), which featured (among many others) Bill Dudney, Brent Simmons, and Marcus Zarra (definitely, Marcus Zarra is everywhere!);
  • The iPhone Developer Summit in Santa Clara, CA (USA) next November 3rd;
  • The iGames Summit, a conference targeted to iPhone game developers, held last March in San Francisco, CA (USA), featuring (among many others) Neil Young (from ngmoco), Andrew Lacy (from Tapulous) and Mike Mettler (from AdMob);
  • The Macoun Entwicklerkonferenz which happened last September 26th in Frankfurt (Germany);
  • The iPhone developer conference in Köln (Germany), in December 1st and 2nd;
  • And finally, the JAOO iPhone Dev Day in Zürich (Switzerland) next October 8th, featuring Raven Zachary, Alex Cone and… many others ;)

Also noteworthy, but not so much about software development I think, is the Mobile Enterprise Conference in Amsterdam (Netherlands) on November 3rd, which has a couple of tracks about the iPhone in enterprise.

Feel free to add links to other similar events elsewhere in the world!

Update, 2009-10-02: Here’s the link to Jonathan ‘Wolf’ Rentzsch’s C4 Independent Developers Conference.

Update, 2009-10-03: The Øredev 2009 Developer Conference in Malmö (Sweden) next November has iPhone / Mobile tracks too. And so will the Scandinavian Developer Conference 2010 in Göteborg (also in Sweden).

Best WWDC Ever

… and WWDC 2009 is finally over.

This year’s event has been nothing short of amazing; maybe because not only the technologies presented blew my mind, but also because I met and spent some time with incredible guys, and getting in touch with the right people changes everything. So, to all of you, many thanks: @cigumo, @dlpasco, @sophiestication, @davemark, @jeff_lamarche, @markuspalmanto, @serpah, @raminf, @geraudch, @ayasin, @octopus_prime, @pjay_, @2009wwdc and all the others, in and out of Twitter, like Julio from Guatemala, the guy from Adobe (met in the queue to the hotdogs in the beer bash of Yerba Buena gardens), Sandro (aka “The Crazy Swiss Guy” of the Stump the Experts session), etc, etc, etc… with whom we’ve shared laughs, ideas, emotion, friendship and beers.

WWDC is an inspiring event: listening to the above guys, or the conferences from Smule or ngmoco:) talking about their companies, and how they grew up the past year, all of that makes me think about this new path I’m taking right now:

akosma software is born. Expect a lot.

NIBs or code? Why not both? Here’s nib2objc.

(Somehow this project seems to me so simple, that I’m sure someone has done this before. Anyway). This is my feeble attempt to bring an answer to the eternal dichotomy between those arguing about the relative benefits of creating user interfaces via Interface Builder or via pure Objective-C code: let me introduce nib2objc.

Unbeknown to most of us, the ibtool utility bundled with Interface Builder and Xcode allows us to inspect the contents of NIB files (or XIBs, for that matter) and get from them nice property lists XML streams, which I transform in NSDictionary instances, which I loop over and over util I get something that looks like this:

[source:c] UIView *view6 = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 460.0)]; view6.frame = CGRectMake(0.0, 0.0, 320.0, 460.0); view6.alpha = 1.000; view6.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; view6.backgroundColor = [UIColor colorWithWhite:0.750 alpha:1.000]; view6.clearsContextBeforeDrawing = NO; // …

UIButton *view9 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; view9.frame = CGRectMake(167.0, 65.0, 72.0, 37.0); view9.adjustsImageWhenDisabled = YES; view9.adjustsImageWhenHighlighted = YES; view9.alpha = 1.000; view9.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin; view9.clearsContextBeforeDrawing = NO; view9.clipsToBounds = NO; view9.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter; // … [view9 setTitleShadowColor:[UIColor colorWithWhite:0.000 alpha:1.000] forState:UIControlStateSelected];

// … [view6 addSubview:view9]; // … [/source]

Using this tool, I can now use IB for design, and then generate the code for those designs, in case I prefer to use a code-only approach (usually for UITableViewCells, as I explained before). For the moment it only works with UIKit classes, but I don’t think it might be a problem to extend it to AppKit classes as well.

I hope this project is useful to all of you! As usual, open source, public domain and on Github.

Update, 2009-04-09: This project has been featured in an article in Ars Technica by Erica Sadun!

That Twitterriffic editor

They say imitation is the best form of flattery. Well, here’s another attempt at doing that, after my “attack” on the Facebook iPhone app (decidedly I’m on a somewhat copying mood lately).

I use Twitterriffic a lot, both on the iPhone and on my Mac, and particularly in the iPhone version, I’ve always liked the little editor for tweets. It grows and shrinks as you type, it appears and disappears following the keyboard, and it provides a standard toolbar with many useful buttons (Actually, I wish the Mac version would have a similar text entry box, which would grow bigger as I type; it’s probably the only complaint I have about it!)

Well, here’s my own attempt at doing something similar, and after 1 hour of work, the result is published, ready for you to enjoy at Github. As usual, no strings attached, pure public domain stuff, so use it and play with it as you wish.

10 iPhone Memory Management Tips

Memory management in the iPhone is a hot topic. And since tonight I’m talking about it on tonight’s monthly meetup of the French-speaking Swiss iPhone Developers group, I might as well share some tips here from my own experience.

I won’t go dive through the basics; I think that Scott Stevenson did a great job in his “Learn Objective-C” tutorial at CocoaDevCentral, from where the image below comes. I’m just going to highlight some iPhone-specific issues here and there, and provide some hints on how to solve them.

Continue reading

Objective-C REST Client Update

I’ve uploaded (yet another) update to the Objective-C REST client I’ve blogged about previously. This time I’ve scanned the code with the excellent LLVM/Clang Static Analyzer and fixed a couple of memory leaks here and there. I strongly recommend to scan your own projects with this tool, it’s extremely simple to use:

  1. Install it somewhere in your PATH;
  2. Set your projects to use the Debug configuration when building from the command line (you can do that in the inspector for the project, in the “Configurations” tab); (see Sebastien’s comment below ;)
  3. Open Terminal.app and fire
    scan-build -k -V xcodebuild
    on the root of the Xcode project folder;
  4. If there are any problems with your code, you’ll have your web browser pop up with the list of problems, their description in annotated code format, and even a link to open the file right away.

Continue reading

REST and Objective-C, again

I’ve just uploaded some code derived from the Objective-C wrapper I’ve shown in this post. You can find it in the “Projects” section, as usual and it’s simply a wrapper around the URL loading system of Cocoa, both for Macs and iPhones, providing a custom delegate protocol, so that you can handle the events raised by the wrapper:

[source:C::firstline(13)] @protocol WrapperDelegate

@required - (void)wrapper:(Wrapper *)wrapper didRetrieveData:(NSData *)data;

@optional - (void)wrapperHasBadCredentials:(Wrapper *)wrapper; - (void)wrapper:(Wrapper *)wrapper didCreateResourceAtURL:(NSString *)url; - (void)wrapper:(Wrapper *)wrapper didFailWithError:(NSError *)error; - (void)wrapper:(Wrapper *)wrapper didReceiveStatusCode:(int)statusCode;

@end [/source]

The sample project, available in the zip file, shows how a simple Cocoa controller can interact with the Wrapper class as required. Enjoy!

Update, 2008-10-26: After a bug report from StuFF mc I’ve updated the code for a better support of POST and PUT requests, and also added a sample PHP file for a quick test of the functionalities.

The beauty of Cocoa

(Highly geeky post ahead. You’ve been warned!)

I have found the very message that summarizes the beauty of Cocoa in a single word; see by yourselves, hereunder in line 47:

[source:c]

import

// The interface of a person @interface Person : NSObject { NSString* firstName; NSString* lastName; int age; } @end

// The implementation of the Person @implementation Person -(id)init { if (self = [super init]) { firstName = @”"; lastName = @”"; age = 0; } return self; }

-(void)dealloc { [firstName release]; [lastName release]; [super dealloc]; }

-(NSString*)description { return [[NSString alloc] initWithFormat:@”Name: %@ %@, %d years old”, firstName, lastName, age]; } @end

// Some code using the Person class int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

NSMutableDictionary* dict = [[[NSMutableDictionary alloc] init] autorelease];
[dict setObject:@"Teto" forKey:@"firstName"];
[dict setObject:@"Rodriguez" forKey:@"lastName"];
[dict setObject:[[NSNumber alloc] initWithInt:34] forKey:@"age"];
Person* person = [[[Person alloc] init] autorelease];
// The beauty of Cocoa can be resumed to this very line:
[person setValuesForKeysWithDictionary:dict];
// Now sit back and relax:
NSLog([person description]);
[pool drain];
return 0;

} [/source]

Screen Savers for the Mac using Flash

This is an evening project that turned out to be really cool. Let’s say that you’re a Macromedia Flash designer, and your clients ask you to bundle your nice Flash movie as a screen saver. What to do? For Windows there are free utilities to convert a SWF into a screen saver, but not for the Mac – and the first commercial one costs around USD 200!

I propose here a simple solution for this problem:

  1. Using Xcode, you can create screen savers (basically, Cocoa apps).
  2. Cocoa applications can host a WebKit component (basically, Safari).
  3. Safari can show local HTML pages (basically, “file:///” stuff).
  4. And HTML pages can show Flash movies (basically, <OBJECT> and <EMBED>)

The idea, then, is to bundle your own page, with your own movie, inside the screen saver bundle, and show the Flash movie this way. Easy said, easy done.

It all goes nice until… you try this solution :) The problem is, Flash movies loaded from “file:///” URLs are blocked by the built-in security mechanisms of Adobe… and you have to find a workaround for that. Mine was to follow the instructions on how to bypass the Flash security mechanism, and then create an installer package that will do what’s needed for you to enjoy the screen saver.

You can get both the project and the installer package in my projects section. I’ve tested the installer in three different machines, and it worked, so I hope it’ll work for you too :) Enjoy! As always, try this at your own risk. Murphy says that things can go wrong, so watch out.