Chameleon brings UIKit to OSX
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.
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.
Stephanie Davis (nee Stewart) Dec 21, 2014