Tuesday, February 17, 2009

When An App Rejection Improves An iPhone App

[Update: Lullabies is now in the app store. Check it out.]

I recently submitted Lullabies an iPhone App to Apple. They reviewed it for a few days and rejected it. The basic design had been that a user would choose a soothing animation/song and that animation would play to completion, and only at that point the user could choose to replay the song, or go back to pick another. Apple didn't like that. The reviewer wanted a mechanism to go directly back to the root view without waiting. Otherwise I was in violation of interface guidelines.



I did not argue. I gave them what they wanted. Touching the screen brings up a small button which will return to the animation picker.


I had been thinking that if the parent handed a child the iPhone, the child would navigate around like my own children do and not settle into being relaxed. However, it's true that they will probably hit the main button to kill the app if they are inclined, and I don't want the app to be thought of as children only. I find the app relaxing too; my brother has a great voice, and it's calming watching bubbles bounce around. And adults don't need or like boundaries in their iPhone apps. So Apple was right. It improved the app.


The second improvement came from the added time for testing the rejection gave me. Now that it was easier to go back to the root view, I actually tried it and found severe resource management problems. First, I found my animation views were not releasing. Then I was leaking animation objects every time a bubble disappeared. Then I found that animations in the root view were taking a huge amount of time while hidden, to the point where touches became non-responsive. A whole long series of problems when I just wanted to get the app out the door. But, you never get a second chance at a first impression. iPhone apps which are branded as junk rarely get their reputations back. If I put my name on a piece of software, it means I think it is a quality piece of software.


I spent most of my debugging time in the Object Allocations and CPU Sampler Instruments figuring out why my little app was misbehaving. Developers, remember that the Leaks Instrument will not find a Leak if an object is attached to the run loop, as an animation is likely to be, instead look for classes of allocations that keep having net growth over time.


That one little button Apple requested blossomed into a series of improvements, cleanups, and learning experiences. And in the end, I have a much more responsive app, and code which I'll be able to reuse in future projects.


So, thank you anonymous Apple reviewer. You did me a huge favor.