Saturday, August 6, 2011

Another iPhone Developer Story


Reposted from my old blog on bigroostersoftware.com from March of 2009.

Another iPhone Developer Story

Yes, this is another iPhone developer story.  There are several out there and each of them offer a unique perspective on the entire development process for the iPhone. This is my version, I hope you find it useful.

About Me

I have been developing software for 6 years now. My focus has been mainly the Microsoft stack (C# and ASP.NET). I had a side project in Python and  I have also done a site in Ruby on Rails. Other languages that interest me are LISP, Erlang, LUA, Perl, Javascript, and now Objective-C.  I am originally from Michigan, but now live in Phoenix, AZ.

Computer Setup

I started out by purchasing the 20 inch iMac on January 18th, 2009. I have never owned a mac. The only Apple product I had at this point was an iPod Nano. I purchased a mini DVI adapter and hooked it up to my 24 inch monitor. It isn’t a bad setup, the only thing missing was RAM. The 20 inch iMac only comes with one gig. Newegg sells 4gb (2gb x 2) for around 40 bucks. If you are familiar with the unix or linux command line, you will feel right at home. I still use my PC for gaming, however all my normal activities are now performed on the Mac.

Learning Curve

Doing most things on the Mac is very intuitive. However the new development environment can be a bit overwhelming. I spent my first week downloading the developer videos from Apple. I spent very little time in Xcode, only looking at a few code samples. This helped familiarize myself with all of the new lingo, frameworks, and techniques. I read a few of the Objective-C primers. I love learning new languages, so this was an exciting challenge for me.

Development

After a week of watching videos and learning the lingo, I was ready to get my hands dirty. After thinking of a few game ideas I decided to go with the most simple for obvious reasons. Overall Apple’s documentation on their API’s is excellent. I would say it compares to MSDN, having fewer code samples. You can alt double click a type in XCode and it will bring up the API docs. I love the quick access. My real struggle came from Interface Builder. Apple’s documentation wasn’t that great for it. Google saved me here. I found a good Interface Builder tutorial (here)  and suddenly the entire thing made sense.
My game has some basic animation requirements. I used the quartz framework for this because OpenGL would be overkill. I used GIMP for the graphics, and Garage Band for the audio. A mistake I made was to play system audio in MP3 format. This works fine in the simulator, but I later learned the device doesn’t support it. A quick switch to AIF did the trick, and only required me changing the extension in the API call. I ran the application in Instruments and found a minor memory leak. I had missed calling CFRelease with the C library I was using. Instruments does a really great job telling you what is leaking.

Submitting

There are several things to consider before submitting your application. Don’t make the mistake I made and decide if you are going to sell your application as a company or as an individual. This will give you time to register the company before you apply to Apple’s Developer Program. From other stories I have read, you cannot switch this easily. I decided to go with a company. I came up with Big Rooster Software. Where does this name come from? My grandpa was a chicken farmer and had a business named Best Caged Eggs. If you live in south east Michigan chances are you probably know where his business is. It is the big rooster on M-24 between Lapeer and Oxford.
In Arizona you are not required to register your business name with the state, however it is common practice. I had my trade name application notarized at my local bank, and mailed it to the Secretary of State. Two weeks later the business name was registered. The next step was registering for the Apple Developer Program with the new company name. They require you to fax in proof of your business. Not a big deal, this process took another week. Once you are accepted you can put the application on your phone, and submit to the App Store. As mentioned earlier,  I had one issue with the sound when I copied it to the device. The digital signing required to submit and develop are not as difficult as I had read about. Apple provides pretty clear instructions on what to do with the digital certificates, and how to setup Xcode for this.
Once you setup Xcode to digitally sign your build, you can create a distribution build for the App Store. They require a few screenshots, a description of your application, and the binary compressed as a zip file. My app was now sitting waiting for approval. Surprisingly this process only took several days. The next status I saw surprised me, and was yet another mistake I made. The application was now pending contract approval. To make things worse, I had just read a new article on Reddit that said Apple’s contract department was back logged. Make sure to head to the contracts section of iTunes Connect and fill out the contracts as soon as you are accepted into the Developer Program! This cost me another week!
I purchased my iMac on January 18th and my first application was approved and ready for sale on March 11th. The process is not as bad as I was expecting, and I will know what to expect for my larger projects.

No comments: