BT

Chameleon brings UIKit to OSX

by Alex Blewitt on Mar 31, 2011 |

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.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT