Blog

Wednesday, March 10, 2010

And I would like 64-bit support with that!

When Apple decided to completely block Input Managers for 64-bit applications in Snow Leopard, they broke compatibility with most Safari extensions out there. In theory, an Input Manager allows users to enter characters from a repertoire vastly larger than the number of keys on a keyboard. However, because Input Managers are loaded into every program, they quickly became one of the simplest and most widely used ways to create extensions for applications that don’t provide proper extension mechanisms such as Safari and Mail. Popular extensions that utilize the Input Manager mechanism include Cooliris, Inquisitor, 1Password (up to version 2.9) and, of course, kikin.

However, Input Managers may also be used for malicious purposes, as demonstrated by the Leap-A proof-of-concept malware in early 2006, and even badly programmed, albeit well-intentioned Input Managers, can compromise the stability of the Mac OSX system. It is then only logical that Apple decided to restrict Input Managers in Mac OSX 10.5 (Leopard) so they required the user’s explicit consent to install, and when they saw the opportunity to completely drop support for Input Managers in 64-bit applications in Snow Leopard, they took it.

But where does this leave Safari extensions such as kikin? The widely accepted solution is to ask users to run Safari in 32-bits, allowing Input Managers to work as in Leopard. Why should users have to choose between having Safari extensions and enjoying the advertised speed gains and other advantages of 64-bit Safari? Fortunately, it didn’t take long before developers figured out an alternative to Input Managers and started to create extensions that worked with 64-bit Cocoa applications in Snow Leopard -- among these extensions is SIMBL.

SIMBL, short for SIMple Bundle loader, is an application enhancement loader for Mac OSX developed by Mike Solomon under the terms of the GPL. As simple the name may be, SIMBL is actually the best friend and savior of application extension developers in Mac OSX, because it takes away the difficult task of loading the extension into the target application. Extension developers only need to provide the name and version of the applications they support, and SIMBL takes care of the rest. Not surprisingly, SIMBL was implemented as an Input Manager until version 0.8.2. The latest SIMBL, however, fully supports Snow Leopard 64-bit Cocoa applications such as Safari using Open Scripting Architecture eXtension (OSAX).

Although at kikin we originally considered developing our Safari extension using SIMBL, we wanted to keep the overhead to a minimum. When SIMBL started supporting Snow Leopard, however, it became a clear choice for us. Furthermore, SIMBL’s GPL license does not conflict with the kikin licensing terms because SIMBL does not link the bundles it loads into applications. Overall, it was a winning solution.

Of course, recompiling kikin for Safari in 64-bits and changing a couple of lines of code to support SIMBL was not really all of it. The OSAX-based SIMBL is not able to load extensions into an application as fast as the Input Manager-based version did, so Safari may be all done loading the user’s homepage before kikin becomes active. There was also need for a kikin plugin installer that bundled SIMBL and removed our old Input Manager.  Albeit these issues, we are now pleased to announce our new kikin plugin for Safari, fully compatible with Safari in Leopard and Snow Leopard in all its bit modalities!

-Delfin Rojas, Senior Software Engineer

By Caitlin  03/10/10 11:04 AM  Permalink
blog comments powered by Disqus
Page 1 of 1 pages
 
kikin on Facebook
 
Bing, Google and all other logos are trademarks of their respective companies. These companies are not affiliated with, nor do they endorse or sponsor, the contents of the kikin.com website or client software. kikin is a registered trademark of kikin, Inc.