download and execute lua scripts

Hi,


I know it have been asked millon of times but I was wondering if it would be possible to download lua scripts and run it inside an iOS app.

In essence, it is just a data structure and the functions are already present in the iOS app, so I don't think it would be a problem.

I understand that downloading arm assembly is a problem but I don't see why lua would.

For example, if that is so, then a json wouldn't be allowed, because you could change the behavior of your app by for example, switching the flow or calling x functions.


Does anybody knows if it would be allowed or Ok for an app to run downloaded lua code?

>I know it have been asked millon of times


And yet you're willing to humiliate yourself in public with a slap to the forehead... so here goes.


>Does anybody knows if it would be allowed or Ok for an app to run downloaded lua code?


No. Not allowed.


See 2.7 in the https://developer.apple.com/app-store/review/guidelines/#functionality


Please stop asking, thanks.

This is not 100% correct, the answer given by KMT is right when it comes to the Apple policy, you can not download Code and execute it, but this is quite subjective.

For example, if you are running a phone gap application, then most of your code is packaged, but you still go to the server to get data, most of the data might be json format, images etc, but you can also get rendered content such as browes to a web site, and this is downloaded and the javascript is executed.

In the LUA side of things, you can do the same, but it must be more subtle, for example, you can download, store and use data, such as images, text f iles etc, and lua has the capability to save a filename.lua file to the working folder and the require it to execute its code. But your base app still needs to be a packaged deployment. if you include the luac then you can do this, as the luac is needed to compile the script on loading, but without it, you need to have pre-compiled lua scripts downloaded.

Moving forward. more double standards, if you look in the app store you can find various scripting programs, one of them is lua, and in the app you can edit script and execute it. So basically, if you package the app, and the API to offer the app functionality, and not download scripts or have the capability of the app to do something that was not in the breif, then Apple will look favourbly at your app. on th eother handm do somthing that makes you stand out, break the app so people send many bug reports to apple, then they will black list you.

Yes you can.
There is 2d game engina named love2d, you can download source code for it from github, compile that code but before build put your simple game inside.
simple game can call any http by builtin socket library, your web page can return lua source code, put that code in string s, after that call comand loadstring(s)() and your application have lua support
I mean, Snap, Instagram and FB all appear to be doing this with their face filters and AR filters in their apps - so surely it's allowed so long as you don't significantly change the core functionality of your app?
download and execute lua scripts
 
 
Q