Lua on iPhone

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Lua on iPhone

jose marin2
Hi,


This was a topic some days ago.

Someone knows if Apple gave the final word about that?

It's legal to use Lua on iPhone/iPad programs now?


Thank you.

Jose




Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Kunal Bharati
I dont think its legal to use Lua on IPhone.

On Tue, Apr 27, 2010 at 5:12 PM, Jose Marin <[hidden email]> wrote:
Hi,


This was a topic some days ago.

Someone knows if Apple gave the final word about that?

It's legal to use Lua on iPhone/iPad programs now?


Thank you.

Jose







--
Thanx,
Kunal

Projects: http://github.com/kunal
Wordpress Blog: http://bharatikunal.wordpress.com/
Blogspot Blog: http://bharatikunal.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Lee Hickey
On 27 April 2010 12:48, Kunal Bharati <[hidden email]> wrote:
> I dont think its legal to use Lua on IPhone.

It's technically against clause 3.3.2 "...No interpreted code may be
downloaded or used in an Application except for code that is
interpreted and run by Apple's Documented APIs and built-in
interpreter(s)." although lots of applications are still getting
approved with Lua integrated.

I suspect they'll continue to approve applications with Lua integrated
as long as it is not used as an abstraction layer on top of their SDK.

Lee.

>
> On Tue, Apr 27, 2010 at 5:12 PM, Jose Marin <[hidden email]>
> wrote:
>>
>> Hi,
>>
>>
>> This was a topic some days ago.
>>
>> Someone knows if Apple gave the final word about that?
>>
>> It's legal to use Lua on iPhone/iPad programs now?
>>
>>
>> Thank you.
>>
>> Jose
>>
>>
>>
>>
>
>
>
> --
> Thanx,
> Kunal
>
> Projects: http://github.com/kunal
> Wordpress Blog: http://bharatikunal.wordpress.com/
> Blogspot Blog: http://bharatikunal.blogspot.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

jose marin2
So, using Lua for configuration, or the logic of the program, without bind any native function or class (like doing a wrapper for UIImage, for example), should be legal?

--- Em ter, 27/4/10, Lee Hickey <[hidden email]> escreveu:

> De: Lee Hickey <[hidden email]>
> Assunto: Re: Lua on iPhone
> Para: "Lua list" <[hidden email]>
> Data: Terça-feira, 27 de Abril de 2010, 8:54
> On 27 April 2010 12:48, Kunal Bharati
> <[hidden email]>
> wrote:
> > I dont think its legal to use Lua on IPhone.
>
> It's technically against clause 3.3.2 "...No interpreted
> code may be
> downloaded or used in an Application except for code that
> is
> interpreted and run by Apple's Documented APIs and
> built-in
> interpreter(s)." although lots of applications are still
> getting
> approved with Lua integrated.
>
> I suspect they'll continue to approve applications with Lua
> integrated
> as long as it is not used as an abstraction layer on top of
> their SDK.
>
> Lee.
> >
> > On Tue, Apr 27, 2010 at 5:12 PM, Jose Marin <[hidden email]>
> > wrote:
> >>
> >> Hi,
> >>
> >>
> >> This was a topic some days ago.
> >>
> >> Someone knows if Apple gave the final word about
> that?
> >>
> >> It's legal to use Lua on iPhone/iPad programs
> now?
> >>
> >>
> >> Thank you.
> >>
> >> Jose
> >>
> >>
> >>
> >>
> >
> >
> >
> > --
> > Thanx,
> > Kunal
> >
> > Projects: http://github.com/kunal
> > Wordpress Blog: http://bharatikunal.wordpress.com/
> > Blogspot Blog: http://bharatikunal.blogspot.com
> >
>




Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Patrick Donnelly
On Tue, Apr 27, 2010 at 8:01 AM, Jose Marin <[hidden email]> wrote:
> So, using Lua for configuration, or the logic of the program, without bind any native function or class (like doing a wrapper for UIImage, for example), should be legal?

The point is you won't get an affirmative on the legality of using Lua
in a iPhone application from anyone, including Apple. You are taking a
risk using Lua in that Apple may arbitrarily decide your application
is violating their terms whenever they want. This obviously means
wasted time and money. It's best to steer clear of Apple if you can.

--
- Patrick Donnelly
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Kunal Bharati
In reply to this post by jose marin2
Using Lua in anyway will be a risk. If Apple think its not legal then it is not :)

I remember some time a ago some app gave access to Basic compiler and Apple banned it one day after its launch.

On Tue, Apr 27, 2010 at 5:31 PM, Jose Marin <[hidden email]> wrote:
So, using Lua for configuration, or the logic of the program, without bind any native function or class (like doing a wrapper for UIImage, for example), should be legal?

--- Em ter, 27/4/10, Lee Hickey <[hidden email]> escreveu:

> De: Lee Hickey <[hidden email]>
> Assunto: Re: Lua on iPhone
> Para: "Lua list" <[hidden email]>
> Data: Terça-feira, 27 de Abril de 2010, 8:54
> On 27 April 2010 12:48, Kunal Bharati
> <[hidden email]>
> wrote:
> > I dont think its legal to use Lua on IPhone.
>
> It's technically against clause 3.3.2 "...No interpreted
> code may be
> downloaded or used in an Application except for code that
> is
> interpreted and run by Apple's Documented APIs and
> built-in
> interpreter(s)." although lots of applications are still
> getting
> approved with Lua integrated.
>
> I suspect they'll continue to approve applications with Lua
> integrated
> as long as it is not used as an abstraction layer on top of
> their SDK.
>
> Lee.
> >
> > On Tue, Apr 27, 2010 at 5:12 PM, Jose Marin <[hidden email]>
> > wrote:
> >>
> >> Hi,
> >>
> >>
> >> This was a topic some days ago.
> >>
> >> Someone knows if Apple gave the final word about
> that?
> >>
> >> It's legal to use Lua on iPhone/iPad programs
> now?
> >>
> >>
> >> Thank you.
> >>
> >> Jose
> >>
> >>
> >>
> >>
> >
> >
> >
> > --
> > Thanx,
> > Kunal
> >
> > Projects: http://github.com/kunal
> > Wordpress Blog: http://bharatikunal.wordpress.com/
> > Blogspot Blog: http://bharatikunal.blogspot.com
> >
>







--
Thanx,
Kunal

Projects: http://github.com/kunal
Wordpress Blog: http://bharatikunal.wordpress.com/
Blogspot Blog: http://bharatikunal.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Roberto Ierusalimschy
> Using Lua in anyway will be a risk. If Apple think its not legal then it is
> not :)

Using anything for the iPhone is a risk. The motto "If Apple think its
not legal then it is not" does not depend on Lua.

(For instance, see http://www.independent.co.uk/life-style/gadgets-and-tech/features/rhodri-marsden-why-does-apple-block-some-iphone-apps-and-not-others-1767244.html)

-- Roberto
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Enrico Colombini
Roberto Ierusalimschy wrote:
> Using anything for the iPhone is a risk. The motto "If Apple think its
> not legal then it is not" does not depend on Lua.

Some time ago I bought a Mac to evaluate iPhone development. The tools
seem to be good, but having to play this sort of Russian roulette makes
the idea of investing months of work a lot less interesting.

   Enrico
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Joshua Jensen
In reply to this post by Roberto Ierusalimschy
----- Original Message -----
From: Roberto Ierusalimschy
Date: 4/27/2010 6:46 AM
>> Using Lua in anyway will be a risk. If Apple think its not legal then it is
>> not :)
>>      
> Using anything for the iPhone is a risk. The motto "If Apple think its
> not legal then it is not" does not depend on Lua.
>
> (For instance, see http://www.independent.co.uk/life-style/gadgets-and-tech/features/rhodri-marsden-why-does-apple-block-some-iphone-apps-and-not-others-1767244.html)
>    
Most games I am involved with use all Lua file formats.  Ignoring the
scripting language risk (according to Apple) itself, I would like to
know how Apple would handle me potentially releasing an iPhone game that
used the Lua APIs for data access.  :)

I can see it now: "You may only use .plist files for loading your data,
but you may not interpret that data in a way that would cause it to call
a callback in your application..."

-Josh
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Roberto Ierusalimschy
> I can see it now: "You may only use .plist files for loading your
> data, but you may not interpret that data in a way that would cause
> it to call a callback in your application..."

Do you know what that means?

-- Roberto
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Joshua Jensen
----- Original Message -----
From: Roberto Ierusalimschy
Date: 4/27/2010 10:07 AM
>> I can see it now: "You may only use .plist files for loading your
>> data, but you may not interpret that data in a way that would cause
>> it to call a callback in your application..."
>>      
> Do you know what that means?
>    
Other than being a joke, because the whole situation is ludicrous, I'm
not sure what this all means.  If I use XML (or Apple's on .plist
format) for my data formats and the parser reaches the Width and Height
data, my code is written like so:

<Width>5</Width>

if (key == "Width")
     SetWidth(value);

I just wrote a scripting language!  I interpreted the XML data and had
it call a function in my iPhone application!

As near as I can figure, the only way I can ship levels for a game is to
embed them as raw C code in my application's executable, because the
mere act of interpreting the data is bad.

Just to drive the point further home:

<HappyHappy>You'll love this...</HappyHappy>

if (key == "HappyHappy")
     FormatAllDataOnMyIpod();

Regardless, this is now off topic.

When I make my iPhone game, I will have a Lua binary data format,
because using Lua for data is awesome (barring the number of constants
limitation).  If they freak out over that, I'll write a custom reader
for the Lua binary format that does the same thing as the existing Lua code.

Josh
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Patrick Donnelly
On Tue, Apr 27, 2010 at 12:39 PM, Joshua Jensen
<[hidden email]> wrote:
> When I make my iPhone game, I will have a Lua binary data format, because
> using Lua for data is awesome (barring the number of constants limitation).
>  If they freak out over that, I'll write a custom reader for the Lua binary
> format that does the same thing as the existing Lua code.

Eww, don't do that. Just obfuscate the lua (binary) code and embed the
binary data.

--
- Patrick Donnelly
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Enrico Colombini
Patrick Donnelly wrote:
> Eww, don't do that. Just obfuscate the lua (binary) code and embed the
> binary data.

I think they don't actually care about these technical matters at all.
They just need a pretext to discard applications they don't like for
whatever reason (e.g. it's written by Adobe, or Mr. Jobs has a
toothache, or snow is predicted in Auckland).

   Enrico
Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Bulat Ziganshin
In reply to this post by jose marin2
Hello Jose,

Tuesday, April 27, 2010, 3:42:37 PM, you wrote:

> It's legal to use Lua on iPhone/iPad programs now?

as i understand this situation, Apple want to remain the only source
of programs, only one market should exist and everything that ordinary
iPhone users may run, should be bought via AppStore and Apple should
receive their percents

once they approve any interpreter, be it Flash or Lua, this means that
it's possible to build alternative market. so Apple will never allow
to deploy any interpreter. but as far are you use interpreter inside
your program in the way that doesn't allow to sell software through
it, there are no risks for AppStore



--
Best regards,
 Bulat                            mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Mark Feldman
In reply to this post by Joshua Jensen
Joshua Jensen wrote:

 > As near as I can figure, the only way I can ship levels for a game is
to embed them as raw
 > C code in my application's executable, because the mere act of
interpreting the data is bad.

Nonononono, that's exactly what Adobe's Flash-to-iPhone compiler was
doing and it's explicitly forbidden in the new guidelines. Quote:

  - "Applications that link to documented APIs through an 'intermediary
translation or compatibility layer' are strictly banned"
  - "Applications must be originally written in Objective-C, C, C++, or
JavaScript"
 
Running your "<Width>5</Width>" XML script through a custom
pre-processor to convert it directly into a "SetWidth" call and
statically binding that to your application would clearly violate this,
God help you if you get caught!

(rolls eyes...)

Mark Feldman


This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.

Reply | Threaded
Open this post in threaded view
|

Re: Lua on iPhone

Joshua Jensen
----- Original Message -----
From: Mark Feldman
Date: 4/27/2010 6:00 PM

> Joshua Jensen wrote:
>
> > As near as I can figure, the only way I can ship levels for a game
> is to embed them as raw
> > C code in my application's executable, because the mere act of
> interpreting the data is bad.
>
> Nonononono, that's exactly what Adobe's Flash-to-iPhone compiler was
> doing and it's explicitly forbidden in the new guidelines. Quote:
>
>  - "Applications that link to documented APIs through an 'intermediary
> translation or compatibility layer' are strictly banned"
>  - "Applications must be originally written in Objective-C, C, C++, or
> JavaScript"
>
> Running your "<Width>5</Width>" XML script through a custom
> pre-processor to convert it directly into a "SetWidth" call and
> statically binding that to your application would clearly violate
> this, God help you if you get caught!
>
> (rolls eyes...)
Funny story: Many years ago, I wrote a text adventure on a Commodore
64.  I didn't know about data structures, and I coded every location in
the text adventure directly in BASIC.  I would test for a direction, and
when the user decided to go North, I would GOTO the appropriate line
number for the room located to the North.  It was spaghetti code galore!

Reading Apple's rules literally, they can be understood to mean I have
to code my levels directly in C, just as I did my text adventure all
those years ago.

But translation into the SetWidth() call directly wasn't what I was
thinking of.  What I was actually thinking was memory overlays.  If a
block of data is read directly into memory and no further processing is
performed, that should be okay.  If I parse through the binary data and
make it do various setup functionality, including pointer fix ups, I
think I fail Apple's legal requirements.

What truly makes me sad from a Lua perspective is I have become used to
using coroutines within the game to do things like tutorials.  Now, I
have to write massive state machines to accomplish the same effect.  Oh,
well.

In any case, I'm still going to use Lua for my data formats.

Josh