Page 1 of 1

Java for iPhone

PostPosted: Wed Sep 01, 2010 11:42 pm
by LOGIsoft
Has anyone tried this for Servoy apps?

http://www.flexycore.com/

Re: Java for iPhone

PostPosted: Thu Sep 02, 2010 12:12 am
by LOGIsoft
This also looks interesting:

http://xmlvm.org/iphone/

Re: Java for iPhone

PostPosted: Thu Sep 02, 2010 6:51 am
by ptalbot
Hi Benoit,

Be aware that there are a few controversies around such tools that convert from java (or .Net or any non 'Apple native' language) to Cocoa/Objective-C.
There is a thread right now on the apple java-dev list where people are arguing about the legal implications of these 'auto' converters.

The license says:
3.3.1 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).


In short: TTYLB (Talk To Your Lawyer Before) ;)

Re: Java for iPhone

PostPosted: Thu Sep 02, 2010 1:22 pm
by LOGIsoft
Thanks Patrick, I saw this appended limitation to the licence (http://whydoeseverythingsuck.com/2010/04/steve-jobs-has-just-gone-mad.html) AFTER I posted on this topic - seems to me that if the end result is the same (I read some excellent things about FlexyCore), we should be able to use the tools that do the job...

Re: Java for iPhone

PostPosted: Thu Sep 02, 2010 2:42 pm
by ptalbot
The problem is that the end result will mostly not look the same, and even if it was, you would still be breaking the license agreement, thus exposing yourself to Apple's lawyers ;)

Re: Java for iPhone

PostPosted: Thu Sep 02, 2010 3:40 pm
by LOGIsoft
Someone suggested converting the Java bytecode using something like XMLVM, pasting the resulting code in Apple's proprietary XCode environment, then compiling the iPhone/iP?d App using XCode. Anyway, I'm not a lawyer, so I will abstain from making any recommendations, yada-yada-yada... :wink:

Re: Java for iPhone

PostPosted: Thu Sep 02, 2010 4:07 pm
by ptalbot
Legal issues put aside, have you looked at the code generated by XMLVM for example?

Code: Select all
...
_op1.o = [java_lang_System _GET_STATIC_java_lang_System_out];
...
[((java_io_PrintStream*) _stack[_sp].o) println___java_lang_String:_stack[_sp + 1].o];
...

Apart from being utterly ugly ;) this clearly spells where the code is coming from doesn't it?

Actually as a rule, I'm very suspicious of any 'automatic' conversion tool that is supposed to do all the coding work for you - 99.99% of the time you end up with such a mess that it takes you twice as long as doing it from scratch.
In that particular case, I would agree with Steve'O that this kind of code shouldn't be used - whatever the platform.

Re: Java for iPhone

PostPosted: Fri Sep 10, 2010 8:41 pm
by LOGIsoft
Some great news today from Apple - they say now that they will allow cross-compilers for the iOS platform, due to developer community pressure:

http://www.apple.com/pr/library/2010/09/09statement.html

Woo-hoo! Sevoy Mobile Client, anybody? :D