Apple TnC Changes and Lua

Wed 11 August 2010, tagged: GameDev

With the beta release of iPhone OS 4.0 Apple has changed the terms and conditions for developers who want to target the iPhone platform (note that includes the iPod Touch and iPad).

There has been a of discussion about changes to clause 3.3.1 most notably by Gruber on Daring Fireball here and here. Steve Jobs references the second article in a reply here

3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

my emphasis added

Gruber basically makes the point that Apple is trying to keep substandard abstraction layers out of the iPhone eco system so that they can control the quality more easily. This is a fair point. The strength of the iPhone eco system is that there is a certain degree of uniformity of the interfaces and styles of interfaces. It should be noted that Apple has always reserved the right to reject apps at submission time for being substandard or not following their interface guidelines.

So why am I writing about this? Well a few weeks ago I finished my Lua abstraction layer and there is a lot of chatter about whether Lua breaks the new TnC. Lua itself is written in C which is good and you embed it in YOUR code and it largely only interfaces with your code bar system calls for malloc, fopen, etc. So Lua (the runtime) compiles and links against the documented API and it’s written in C, no problem there. The other side of the equation is the runtime scripts that my engine runs to perform AI. Now they are compiled but do NOT link directly against Apple API’s. The compiled Lua, in it’s bytecode form only interfaces with the Lua runtime and the runtime (which meets the new TnC) makes the system calls.

So my reading of this is that Lua doesn’t break the TnC.

But I might be wrong and that’s fine, I’ll develop my game using Lua and port across to C++ if the app is rejected. I don’t think it will be but if it is I will just bite the bullet. I’m not saying I will like it, but I will do it.

Having worked in the Video Games industry for 15 years I am not surprised by seemingly draconian Terms and Conditions from hardware manufacturers. Anyone who has ever worked with Sony, Nintendo or Microsoft is accustomed to arcane submission protocols, arbitrary enforcement of rules and seemingly arbitrary rejections upon submission.

The deal we all strike with the platform providers is that they keep the eco system alive and well, they keep up standards and we try our best to comply with those standards. In return we get access to their customers. With Apple this is even more real as there are millions of units in the hands of people who are willing to pay money for a wide variety of games and apps. Apple provides an App Store, International Billing and Distribution network all for a fixed cost per sale. It’s an amazing deal for an indie developer. The reason I think a lot of people are complaining is because they think that the App Store is or should be a democracy. Well if that is what the market place wants then I am sure apple will deliver that but at the moment we’ll just get used to playing by Apple’s rules and getting access to 50,000,000+ users worldwide!