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).Let's suppose I want to write an iPad app in strict accordance with these terms. I can't use python or ruby or Lua or (god forbid) ActionScript, but I guess I can deal with that; I'm more familiar with C anyway.
Of course, being a well-trained computer scientist, I'm going to design a modular piece of code, with different modules devoted to touchpad tracking, graphics output, physics simulation, score-keeping, and so on. Naturally, to keep the code modular, I'm going to carefully document the calling syntax, function, side-effects, necessary preconditions, and error codes of each routine within each module....
Oh, wait; that's an API. That's the very definition of an API. And since it's not an Apple API, that makes it a private API. Damn. I guess I'm not going to write separate modules after all; no way am I keeping all that stuff straight in my head.
Well, okay, at least I can organize my code into separate functions, so that I'm not just dealing with a big pile of spaghetti.
Oh, wait. What's the difference between calling a subroutine that calls another subroutine that invokes Apple's API, and using an 'intermediary translation or compatibility layer or tool'? There isn't one! Oh no!!
I guess I'm going to have to write a big pile of spaghetti after all; I'd better keep the app simple. Implementing the Hashlife algorithm without function calls (except to Apple's API) is going to be a pain in the ass, but at least when I'm done, I'll have the best Game of Life simulator on the iPhoo, EVAR! Now I just need to sit down and think about my design; let me get some paper...
Oh, wait. I'm not allowed to write down pseudocode; that would violate the '...must be originally written in...' clause! I guess I'd better stick to something I can write directly into the code, without thinking about it. Good thing the basic Life algorithm is so simple...
Oh, wait. The Game of Life is Turing-complete. That means any program can be encoded as a Life pattern, and then executed through an 'intermediary translation layer', namely, my simulator. So the new license might not outlaw my native-spaghetti-C simulator, but it would explicitly forbid actually using it to simulate anything.
Crap. I guess I'll just stick to proving theorems.
Thats funny, but I don't think thats whats really going on.
This seems more directed against Flash: http://daringfireball.net/2010/04/why_apple_changed_section_331
They want people developing native iPhone apps and not cross platform ones like with Flash.
Of course the real intent will come out with how they choose to enforce it.
Posted by: Robert | April 11, 2010 at 05:27 PM
Oh, sure, I know that. But it doesn't matter what Apple means. The license is a legal document; the only thing that matters is what it actually says.
Posted by: JeffE | April 11, 2010 at 07:21 PM
But are you allowed to use the iPhone SDK to program nuclear facilities? That's what I'd like to know.
Posted by: D. Eppstein | April 11, 2010 at 09:21 PM
I am still waiting for the API free app for operating a nuclear facility. --S
Posted by: Sariel | April 12, 2010 at 12:05 AM
You've got it wrong. What's banned are Apple's private API:s. Of course you can use your own as long as they wrap the official and open Apple API:s.
Posted by: PEZ | April 12, 2010 at 03:31 AM
Again, that may be what Apple intended, but that's not what the license actually says.
Posted by: Jeffe | April 12, 2010 at 07:47 AM
"Oh, wait; that's an API. That's the very definition of an API. And since it's not an Apple API, that makes it a private API"
Don't be so naive, private API refers to Apple's undocumented "private API". You can write as many modules as you want.
Posted by: Chris | April 12, 2010 at 11:35 AM
Just keep your apps simple -- "life" is too complex.
How about a nice "Hello World?"
Posted by: Gerald W | April 12, 2010 at 11:37 AM
Also you must get your code right first time, with no syntax errors, or else it infringes "Applications must be originally written .. as executed by the iPhone OS WebKit engine".
Posted by: Pete Austin | April 12, 2010 at 11:44 AM
Chris, sadly the license doesn't actually define either "private API" or "API", which means that the legal meaning of the document is exactly what this blog post claims it is. So even if the understanding is that "private API" refers to Apple's undocumented API's, that is not what the license is saying.
Posted by: Olabini | April 12, 2010 at 11:47 AM
Hey now!
Step 1: Read Crockford's Javascript:The Good Parts (or watch his various lectures online) or read some John Resig... Here is good: http://googlecode.blogspot.com/2009/03/doug-crockford-javascript-good-parts.html .... A Scheme-variant with curly braces indeed.
Step 2: Appreciate that Actionscript 2 IS javascript - really! - with the Flash API rather than the DOM (and Actionscript3 can mostly be used as a superset of AS2 with some distracting but ignorable Java-isms dolloped on top for various corporate strategic reasons).
If you like Python or Ruby or Lua, there is no reason to not like Actionscript. Really. It's pretty nearly my favorite language.
Posted by: TTK | April 12, 2010 at 11:52 AM
A lot has been written about 3.3.1, and there are valid arguments against it. Your article seems to be an example of a reductio ad absurdum fallacy.
Posted by: Eric Betts | April 12, 2010 at 12:34 PM
@Eric Betts: reductio ad absurdum is not, in general, a fallacy
The point of this article is to suggest that Apple's license, interpreted strictly (as legal documents should be), forbids many programs that developers write (and, presumably, that Apple wouldn't object to). As such, it's an interesting addition to the debate.
Posted by: Chris | April 12, 2010 at 01:05 PM
If I sh!t on a shingle > take a digital photo > import into flash > flashify > export some assets (and code) > then pull the results through the approved mechanisms into an App, how will Apple ever know....?
Posted by: moop | April 12, 2010 at 01:24 PM
> But it doesn't matter what Apple means. The license is a legal document; the only thing that matters is what it actually says.
That's simply not true. What matters is what Apple chooses to act on, and what the courts subsequently uphold. In particular, there is zero chance of Apple rejecting Life for this reason. Legal documents do not have meaning independently of how lawyers and judges interpret them. (This is different from the situation with programming languages, say.) By and large, lawyers and judges do not use Turing completeness in their interpretation and reasoning.
Posted by: Dan P | April 12, 2010 at 03:56 PM
> Legal documents do not have meaning independently of how lawyers and judges interpret them.
This is true, but legal documents that clearly don't mean what they appear to mean are bad legal documents.
Posted by: Kim Belcher | April 12, 2010 at 04:59 PM
> This is true, but legal documents that clearly don't mean what they appear to mean are bad legal documents.
The only way to judge a legal document is by whether or not it facilitates the purpose intended by its authors. I suspect this will do precisely that, as well as catching Apple some other low-hanging fruit if it can be asked to enforce it widely.
Posted by: Feyeleanor | April 12, 2010 at 05:31 PM
This post is nonsense and dumb. You have no clue what iPhone dev so stop talking nonsense.
Posted by: Steve Gilmore | April 12, 2010 at 07:14 PM
@Steve Gilmore
I will not draw conclusion that you are an apple fan-boy by your name Steve, that wouldn't be fair, so I am going to draw the conclusion based on your last post.
> This post is nonsense and dumb. You have no clue what iPhone dev so stop talking nonsense.
First I would like to address the obvious grammar and wording issues involved with the above post. First, do you mean to say that the post you are writing in is nonsense and dumb? It very well may be but I have a feeling that you actually meant "This article is nonsense and dumb. Next I would like some clarification on "You have no clue what iPhone dev so stop talking nonsense." do you mean to say "you have no clue about iPhone development" or :you have no clue what iPhone development is" or even "You have no clue what the iPhone dev team is doing"(which would make the least sense because the dev team had nothing to do with this decision.
Now Judging by your complete lack of being able to use correct syntax in the English language I find it hard to believe that you can develop anything more then a blank "hello world app" and therefor feel that your argument to be lacking in the substance which JeffE had in his article, because it is so obvious that you are either inexperienced or unable to develop a basic mastery of language(I am operating under the assumption that your native tongue English, if it is not then please post your next post in your native language along side your translation) I highly suggest you stop talking "nonsense" and attempt to learn something from the real world.
Posted by: Nicholas Petersen | April 12, 2010 at 11:17 PM
I think the change in the license agreement is more about Apple allowing itself to reject pretty much any application and refer back to that paragraph as the reason, not that they've ever needed a reason...
Posted by: seutje | April 13, 2010 at 12:31 AM
moron
Posted by: demon | April 13, 2010 at 04:11 AM
I come from the future. So let me save you all a bunch of grief.
Apple does not relent. In 2015 the company is bought by Proctor and Gamble and absorbed into the feminine product division.
Adobe is bought by AMD in 2016.
Most of you become silverlight and html 5 coders. Except for Steve who joins a circus.
Posted by: Drew | April 13, 2010 at 06:06 AM
If you document your API and make this documentation public, it's a "public API" and not a "private API" ;)
Posted by: Markus | April 13, 2010 at 06:36 AM
Very nice, i like it ;)
& nice answer too, Nicholas, to steve's post ^^
Posted by: Rubi | April 13, 2010 at 07:27 AM
Thank you, I just find the fact that some one unable to form a real English sentence saying that some one can't program (or something to that effect) ironic.
Posted by: Nicholas Petersen | April 13, 2010 at 08:13 AM