‘UXKit’: The Hidden Gem In Apple’s New Photos App

Last week Apple seeded the first OS X 10.10.3 beta to developers, bringing with it the initial build of the much anticipated Photos application for Mac. Some digging around by a couple of particularly inquisitive devs, Jonathan Willing chief among them, stirred up excitement with the discovery of a hidden UXKit framework linked to and presumably used by the new Photos.app. This framework appears to bring much of iOS’s UIKit to the Mac; the API behind most user interfaces on Apple’s most popular platform. 

To understand the interest garnered by this framework one must first understand the differences between UI code for the two operating systems. Today the equivalent of UIKit on OS X is AppKit, a nice but not exactly modern set of APIs, which in many places bares little resemblance to that of its younger brother. As Jason Snell of Six Colours puts it: 

For a while, iOS developers have complained that the UIKit framework they use to develop apps isn’t available on the Mac, making it harder to apply the same tools and techniques and code they build for iOS to Mac apps.

As a developer of apps for both platforms I can attest to this, while making anything remotely custom for Mac is possible its just painful when compared to iOS. The effort required to set a custom resizable background image and a separate foreground image on a NSButton is just ridiculous, a task UIButton makes trivial. Something similar to UIKit for the Mac would be a huge upgrade in my opinion and I hope Apple is indeed looking to make this available to all developers, even if some feel that’s unlikely. Bring on WWDC 2015!

Photos App