Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Chameleon brings UIKit to OSX

Chameleon brings UIKit to OSX

This item in japanese


The Chameleon project has been launched by the Iconfactory to allow UIKit-based applications to be compiled for MacOSX.

UIKit is the user interface and application-launching framework for all wiget-oriented applications on iOS devices. This is separate from AppKit, which is used by OSX for its application launching and user-interface mechanisms. Since the two operating systems have different configurations (touch vs mouse/trackpad, window vs full-screen) porting AppKit (or a subset) to iOS was not an option when Apple first launched the mobile platform.

Chameleon provides an OSX version of the UIKit libraries so that source code written for iOS can run on OSX. (Note that the source code must still be recompiled, since OSX runs on Intel processors whilst iDevices run on ARM.) However, this allows not only the Objective-C application logic but also the UI logic to be reused between the two platforms.

The port is not complete – the documentation notes that:

The UIKit implementation mostly targets iOS 3.2's version of UIKit. Not everything is implemented at this time, but a surprisingly large subset is. There are some methods and/or behaviors from later versions of iOS implemented as well.

This isn't the first attempt at a port of UIKit; for example, Todd Ditchendorf, creator of ParseKit, has previously created UMEKit to enable apps to run on the desktop.

However, what sets Chameleon apart is the fact that it was used to port the OSX app Twitterific from iOS to OSX with around 90% of the code being reused. (The re-use without the UI would have been in the order of 25-30% according to the project.) As a result, they are able to create simultaneous releases for iOS and Mac App Stores.

The source for Chameleon is available at GitHub.

Rate this Article