Linked by Thom Holwerda on Thu 8th Apr 2010 22:38 UTC
Apple John Gruber has found out that cross-compilers are no longer allowed in iPhone OS 4.0. "My reading of this new language is that cross-compilers, such as the Flash-to-iPhone compiler in Adobe's upcoming Flash Professional CS5 release, are prohibited. This also bans apps compiled using MonoTouch - a tool that compiles C# and .NET apps to the iPhone. It's unclear what this means for tools like Titanium and PhoneGap, which let developers write JavaScript code that runs in WebKit inside a native iPhone app wrapper. They might be OK."
Thread beginning with comment 417892
To read all comments associated with this story, please click here.
ObjectiveC, C++ or C
by henderson101 on Thu 8th Apr 2010 23:15 UTC
henderson101
Member since:
2006-05-30

Baring in mind that the ObjectiveC runtime is fully accessible in C, and C is a language that Apple would seem to accept - the compiler simply needs to output plain C.

I suspect they are actually attempting to stop the likes of MonoTouch and Adobe FlashToiPhone. The MonoTouch guys did write a framework that translated .Net API to assembler and then charged over $200 for it... total rip-off when the ObjC tools are free. They are planning to port over some kind of Silverlight API compatibility, so this would be what Apple would mainly object to. FlashToiPhone just smacks of sour grapes though.

Reply Score: 2

RE: ObjectiveC, C++ or C
by Delgarde on Thu 8th Apr 2010 23:26 in reply to "ObjectiveC, C++ or C"
Delgarde Member since:
2008-08-19

Baring in mind that the ObjectiveC runtime is fully accessible in C, and C is a language that Apple would seem to accept - the compiler simply needs to output plain C.


Nope. The wording is that "Applications must be originally written in Objective-C, C, C++", etc. Emphasis on "originally" - it's clearly the same intent as the GPL clause that defines the code as the stuff human developers actually work on, not the output of some processing step.

The purpose clearly is to force people to use Apple's APIs, to make it harder to build a product that can run on competing platforms as well.

Reply Parent Score: 5

RE: ObjectiveC, C++ or C
by whartung on Thu 8th Apr 2010 23:26 in reply to "ObjectiveC, C++ or C"
whartung Member since:
2005-07-06

Baring in mind that the ObjectiveC runtime is fully accessible in C, and C is a language that Apple would seem to accept - the compiler simply needs to output plain C.


No.

Here's the clause from the agreement:
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).


Note the highlighted section. The INTENT of the clause is that code be written in C/Obj-C/C++/JS. Not cross-compiled INTO C and then compiled down in to the runtime.

That's pretty clear from this.

If you're not writing C/Obj-C/C++/JS for your code, technically you're in violation. In fact, arguable Googles Web Toolkit will violate this contract, since that code is originally in Java and compiled down in to JS.

So, there go your dreams of writing iPhone apps in Rabbit Scheme.

Reply Parent Score: 4