Shion in the Age of Mavericks

As some of you have already discovered, (the Mac client) crashes hard when you attempt to use it with the Shion Touch app after you’ve upgraded your desktop system to Mavericks. I haven’t commented on this publicly yet because I hadn’t the time to explore the issue, thus I had nothing useful to say.

I looked into the problem this morning and the crash is caused by the Lua scripting framework that I integrated into Shion 3. Lua is an alternative scripting language that’s popular in the games industry and I made it the base scripting language for Shion because of its ubiquity and small learning curve. Unfortunately, the open-source code that Shion builds upon hasn’t been updated in almost seven years, and Mavericks was the release that finally pulled support for the system functions that Lua was using. Thus, when you launched Shion Touch, it issued a Lua command to the desktop app, causing the crash.

Lua Crash

There is no simple fix for this problem. Given that the Lua code has effectively been abandoned, I can either fix that code myself or find a scripting language that is better supported at this time. I’m opting for the second.

With the release of Mac OS X 10.9, Apple’s updated the JavaScriptCore framework to be able to bridge to Objective-C code, which is exactly what I need in a scripting framework. The downside is that this is not backwards-compatible with previous versions of Mac OS X.

So moving forward on Shion Mac app, I’m now targeting Mac OS X 10.9 as the base SDK and dropping support for older OS X releases in future updates. This latest scripting issue isn’t the sole reason for this decision, but it is the straw that’s broken the camel’s back. Other reasons for me to drop support for pre-10.9 releases:

  • Apple’s really shoddy in supporting a build system that targets prior versions of the operating system. I’ve kept around a dedicated Snow Leopard system for building a version Shion that was compatible back as far as 10.4, and it no longer makes sense for me to do that.
  • The Mavericks upgrade is free for anyone running a 10.7 system or higher , so I expect to see that emerge as the post-Snow Leopard standard.
  • The Objective-C language and runtime has advanced in some significant ways since 2008. There’s a whole host of language and productivity features that I can’t use without dropping support for older systems (Grand Central Dispatch for one).
  • Modernizing the codebase should make it easier for me get the app into the Mac App Store and retire a whole host of infrastructure supporting app update and similar features.

This list probably isn’t conclusive, but it’s sufficient for me to move on. For folks sticking to older releases of Mac OS X, I have no plans to remove the archives from distribution so you should be fine.

In terms of the Mavericks update, I’ve set up a new branch on GitHub to start the modernization project. The immediate task to be completed is to pull out the Lua scripting engine and replace it with a JavaScriptCore equivalent. Since the Lua code lives both in the Mac app and the iOS app, this means that I’ll need to update both applications before the problem is resolved. If you’d like to receive beta releases to track the bug fixes, I’ve set up a HockeyApp beta test that you can sign up for to get notifications when an updated version becomes available.

At the moment, I can’t provide an ETA when new versions of the app(s) will be ready for Mavericks users, so stay tuned.