Monthly Archives: August 2009

Microsoft How-To: “Porting” From iPhone to WinMo.

Microsoft has released an article detailing how to port a particular Cocoa Touch to Windows mobile. The catch: the app in question relies particularly little on the Cocoa framework, it handles its own widgetry and visual display. This is rarely the case in an iPhone app… most of them make heavy usage of UIKit and Foundation objects to get the job done. The best advice for porting these apps? Don’t.

There is no analog to most of the Cocoa Touch frameworks on Windows Mobile, and most WinMo devices simply can’t DO at the hardware level what a lot of iPhone apps take for granted as basic device functionality. Porting an app of any complexity will usually be nigh impossible… it will require a complete rewrite. The rewrite process is basically what Microsoft’s article details. The same goes for Pre, Android, or Blackberry.

For any given app, when you’re beginning development, Microsoft would probably advise that you not use any of the frameworks Apple has provided, outside of basic executable functionality, opting instead for custom drawing routines handwritten by the developer, or using only the most basic shared libraries. This would definitely benefit their platform, as your app would be easier to port, but it would entirely negate the rapid app development advantage offered by the iPhone (and Mac OS X, for that matter) frameworks over every other API out there. And to top it off, you’d be going through all this extra effort for what is becoming an ever smaller marginal increase in revenue.

While I do recommend creating code with an eye toward portability (especially stuff like custom drawing or OpenGL code), my advice to developers seeking to do a multiple-platform release is the same advice I’d give to a desktop developer: create a common C library for handling proprietary data formats, specialized encryption, custom communication protocols, etc. Then, build your UI using the native frameworks available on each device, taking advantage of each platform’s special functionality, and maximizing the fit and finish for each.