On 3.3.1

I'm away for a week and all hell breaks loose. There's a lot of fuss about the modified section in the iPhone development agreement you have to sign before you're able to release iPhone applications to the App Store. Here it is: > 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).

The documented/non-documented API part doesn't really matter. What matters is "Applications must be originally written in Objective-C, C, C++, or JavaScript". There's two parts to this statement.

The most obvious one is: you can only code in Objective-C, C, C++ and Javascript. Which is kind of a dicky thing to require, just a few months after [MonoTouch](http://zef.me/2125/monotouch-built-on-free-for-just-399) was released, and when Adobe just got a new version of Flash out that can compile flash to an iPhone application. Use of neither of these are allowed anymore. I'm sure the development teams working on these products will be thrilled. As will, well, anybody who was using these tools. Why the hell did you do this Apple? I haven't heard a reasonable explanation as of yet. [John Gruber](http://daringfireball.net/2010/04/why_apple_changed_section_331) tried to give a possible explanation, and [Steve seems to agree](http://www.taoeffect.com/blog/2010/04/steve-jobs-response-on-section-3-3-1/), but I can't conclude otherwise than that Apple want to keep complete control over everything, including the tools you use -- and if you don't like it, suck it. Apple is in the dangerous position that it can make these calls now. And we'll just have to wait and see how far they are going to push it.

Then there's this other, subtle word in section 3.3.1: "Applications must be __originally__ written in..." What does "originally" mean? And what does it mean to "write in"? It does not say "handwritten", could a program write the Objective-C code for you? Can it be a code generator? Could Adobe change its flash compiler to generated (Objective-)C code first, and then let it compile by Apple's compilers, would that be OK?

What about [iPhonical](http://code.google.com/p/iphonical/)? iPhonical is an MDA tool that lets you build iPhone applications using a number of DSLs and generate the Objective-C for you. One interpretation would be that the iPhonical code generator "writes" the code for you. But then there's the "originally" part to it. _Originally_ the application was written using the iPhonical DSLs. So I guess iPhonical applications would be disallowed then too? How are they ever going to enforce this, though. You don't have to submit source code to Apple. You submit binaries. Are they going to analyze the binaries to see if it looks sufficiently Objective-C-like? If there's any debug information in there about a suspicious variable called `tmp2322`?

My guess would be that Apple wouldn't be too strict about enforcing this policy, but that if it senses something is wrong, they may kick you out. But then again, they already do that now. So you can probably continue using tools like iPhonical if you just don't tell anybody about it.

I'm not necessarily happy about this, but it seems that I made the right call to let [mobl](http://zef.me/3117/mobl-screencast-1-todo-application) only rely on a browser. The browser is the only thing Apple hasn't put any restrictions on. Of course you're somewhat limited in what you can do within the browser canvas, but it's still a relatively safe place. Plus, if Apple gets even more jerky than they already are, the switch to Android or Palm is easily made.

__Update__: I [like this](http://joeberkovitz.com/blog/2010/04/08/apple-takes-stance-on-consciousness/):

> Apple is implicitly taking a position that apps are not "originally written" in the minds of developers, in the form of cognitive representations of problems and their solutions. They are taking a position that the brain is not a translation tool for mapping from these representations into C, Objective-C, or what have you. They are subscribing to the theory of a "ghost in the machine", implying that at some point an app crosses some magical boundary from being an mental thing into a physical thing that is "written" in some definite programming language. They are maintaining this because, if they weren’t, every single iPhone app would violate their licensing agreement by virtue of the developer’s mind itself being a tool that produces Objective-C as an "intermediary result". Apple may thus be the first company to bet the farm on Cartesian dualism.