[[Objective-C prog] with: iPhone and: iTunes release]

September 16, 2009

Doesn’t that subject line look crazy? Well, in Objective-C, methods, properties, and members are accessed with maniacal brackets. This is fine, aside from the fact that you need to know how deep you’re going to chain a method call BEFORE you actually do it, as otherwise you have to go back and add the correct number of left brackets. Objective-C 2.0, as supported on the iPhone, supports dot notation, but when in Rome, I hear you use crazy bracket syntax. So, then, how does this all play out? Well, iPhone development can really be sectioned off into its constituting parts: Objective-C programming, Interface Builder, and release to the app store on iTunes.

Objective-C

Objective-C 2.0 has properties, strong typing, and memory management. Objective-C for the iPhone only has the first two. For this reason, we’re forced to deal with memory management or deal with the terrible results. In making a simple business calculator, I was able to leak 6 UI elements each time the program was run and take my 3GS iPhone down to a few MB of remaining ram in only 7 or so test runs. The solution, of course, was simply releasing the UI objects when the application was closing, but this is a significant annoyance when trying rapidly design software.

True properties, of course, with synthesized property methods, save a decent amount of time and just look nicer than having your IDE generate getters and setters.

Consider the following:

//Tester.h
@interface Tester
{
   MyClass * myClass;
}
@property MyClass * myClass;
@end

//Tester.m
@implementation Tester
@synthesize myClass;
@end

Now, [testObj myClass] calls the implicitly created getter of Tester, and [testObj setMyClass: myClass] calls the implicitly generated setter. Isn’t that cool?

iPhone Development

Aside from the Objective-C nonsense, the iPhone SDKs and Interface Builder make life pretty easy for app development. Interface Builder provides a full visual interface for designing iPhone applications, and XCode even provides an iPhone emulator with which to test applications. Sure, the emulator won’t tell you if you have a memory leak, or anything of that nature, but there are other tools to monitor such.
/* TODO: add screenshots */

iTunes and iTunes Connect

The release process to iTunes, while relatively painless, requires a wealth of information and takes about two weeks to process (at least it did for FoodWatcher, my “Hello World” iTunes application to measure weightwatchers points).

The following is required to submit an application to the app store:

  • application name
  • application version
  • 512×512 image to represent the application. This is used if the application gets “featured.”
  • 57×57 iPhone icon for the application. You can either add your own gloss or let the iPhone render it for you.
  • At least 1 screenshot of the application in progress
  • A support website for the application
  • A support email for the application
  • A list of user names/passwords if your application requires it

and for non-free applications, you need to provide full tax/bank information. The process is a bit of a hassle, but the requirements make sense given the context of iTunes and the App Store.

tags: ,
posted in prog by Stefan Kendall

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org