Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Wednesday, March 30, 2016

AppStore / iOS apps and interpreted code - where do they draw the line?

AppStore / iOS apps and interpreted code - where do they draw the line?


Apple's iOS developer guidelines state:

3.3.2 ? An Application may not itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. 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).

Assuming that downloading data - like XML and images, or a game level description, for example - at run-time is allowed (as is my impression?), I am wondering where they draw the line between "data" and "code". Picture the scenario of an app that delivers interactive "presentations" to users (like a survey, for instance). Presentations are added continuously to the server and different presentations are made available to different users, so they cannot be part of the initial app download (which would be the whole point). They are described in XML format, but being interactive, they might contain conditional branching of this sort (shown in pseudo form to exemplify):

                                                                    

When this XML is interpreted and "played" within the app, the above would be presented in two steps. First a selection screen is shown, where the user can click on either of the two choices ("Male" or "Female"). Next, an image will be [downloaded dynamically] and displayed based on the choice made in the previous step.

Now, from this, it's easy to imagine additional tags, describing further logic still. For example, a containing tag could be added:

                    

The result here being that the selection screen / image screen pair would be sequentially presented three times over, of course.

Or imagine some format describing a level in a game. It is perhaps natural to view that as passive "data", but if it includes, say, several doorways that the user can go through and with various triggers, traps and points attached to them etc - isn't that the same as using a script (or, indeed, interpreted code) - to describe execution sequences, options and their conditional responses?

Assuming that the interpretation engine for the data is already present in the app and that such "presentations" can only be consumed (not created or edited) in the app, how would this fare against Apple's iOS guidelines? Doesn't XML basically constitute a scripting language in this sense (couldn't any program in an interpreted language be described in XML)?

Would it be OK if the proprietary scripting language (ref the XML used above) was strictly sandboxed (how can they tell?) and not given access to the operating system in any way (but able to download content - like a survey or a game level - dynamically as well as upload results - answers or scores - to the authoring server)?

Where does the line go?

Answer by JuValencia for AppStore / iOS apps and interpreted code - where do they draw the line?


I think what Apple means is your application should not depend in another module, compiled product or executable in order to work that will be downloaded from a website/server and that compiled add-on was not reviewed by Apple.

Basically when I asked something similar they told me something like: "If your application will download another executable compiled code that such a ftp downloader, key decryption tool or something of this kind that was not approved my Apple. You are available to download data or files (such as XML, HTML, PDF files, images) that does not represents an application.

Answer by HackaZach for AppStore / iOS apps and interpreted code - where do they draw the line?


The concept of the differences between 'code' and 'data' has been discussed on SO before. Please see this answer: http://stackoverflow.com/a/642476/200696

From Apple's perspective, this ban prevents un-reviewed executable content from the app store. It would be trivial to create a program which is approved by Apple, and then downloads executable content that changes the pre-approved behavior.

Answer by Simon Woodside for AppStore / iOS apps and interpreted code - where do they draw the line?


There's a major difference between the Guidelines and actual practice by the App Review team.

The current Guidelines state:

2.7 Apps that download code in any way or form will be rejected

2.8 Apps that install or launch other executable code will be rejected

So, the old ban on interpreted code is gone, and replaced by a ban on apps that could be considered to be IDEs or self-modifying.

However in practice there are a number of apps which do this, hence the difference between theoria and praxis.

Answer by John for AppStore / iOS apps and interpreted code - where do they draw the line?


All I can tell you is I've released products which use XML to script behavior within the app and Apple has always approved them.

Answer by Holly for AppStore / iOS apps and interpreted code - where do they draw the line?


You should take a look at what Apple has enabled in iOS7. It is now allowed to download and run JavaScript within your app.

Answer by Andy Dent for AppStore / iOS apps and interpreted code - where do they draw the line?


Does your interpreted download allow the user to write infinite loops or recursion?

Apple allow Javascript because they provide the interpreter and can kill your code. I have a feeling I've read that it's a 10 second limit but I couldn't find it on the site with a few minutes searching. (Yes, my self-imposed timeout for writing an answer kicked in.)

I think you're pretty safe if what you do is declarative and doesn't allow obvious looping in the interpreter.

I would also avoid the use of the word "interpreter" in any descriptions visible to Apple including public discussion. Maybe "parser" would be safer.

Codea have skated along the edge of these definitions with their Lua environment and cannot download code. They had to remove a feature for downloading new packages as ".codea" files.

Answer by Dan Rodriguez for AppStore / iOS apps and interpreted code - where do they draw the line?


Based on 3.3.2, they could reject an app for this. However, the scarier thing is that you could create the app, get it approved, have it be downloaded and used by many users, and then Apple could pull the app from the store.

Did you ever publish the app you described?


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.