Several months back I toyed with the idea of porting my audio cassette music player to iPhone using Flash Professional CS5’s iPhone Packager, and as you can see from the video below I’ve done just that. Although Apple are blocking content written in Flash from the App Store I still thought it would be a worth while exercise and would probably be fairly straight forward to do.
Well it turned out to be anything but straight forward. The wisest Jedi of them all once said “You must unlearn what you have learned” and I swear the more that quote floats around my head the more convinced I am that Master Yoda had actually tried porting projects to Apple’s shiny little wonder.
I naively thought that my Flash Lite experience would ensure I was up and running in no time at all. However writing for iPhone brings about a whole new set of interesting problems for the developer to solve. I’ve spent the last two days taking apart my original audio cassette demo and reconstructing it so as best to take advantage of the iPhone’s hardware.
Its GPU loves texture maps, so converting as much of your content as possible to bitmaps and caching them on the GPU seems to get some pretty good results. As is the case with all mobile development, finding the best approach may require you to make compromises and small sacrifices in order to get the best performance.
I think the end result was worth the effort and I now understand considerably more about development for iPhone.