I am trying to find out how can I enable loading Lua scripts in a sandbox environment that I would create in my App.
I have seen some previous discussions saying that this would not be allowed by Android and iOS. I don’t know how some of the apps like: Lua-IDE and Luadroid
make that possible?
Can we make a plugin for solar2d to add that functionality since solar2d api does not have load()?
This is great, thanks Scott. When you say ‘making a host’ what do you mean? It would be amazing to have the equivalent of Live Builds for production with the lua code and images etc stored on a server and synced to each client when it changes. Reading the latest guidelines, it looks to me like Apple allow this now, provided you don’t use it to make your app do something that goes against the published description.
Thanks for mentioning it. Yes that will work. I did not know if loadstring works. Seems like it does. If it works then I think that will solve my purpose.
I haven’t used any of them but I believe @Scott_Harrison 's solution is mostly for running code in runtime and Patcher is aimed at updating the application, skipping the review process. I don’t want to mess it up for you so I suggest you review both libraries.
I’m late replying, but I believe patcher still works. I tested it on Windows and it works fine. You’ll want to test it on OS X, Android, and iOS yourself.
Here is a link to an example app using it. Read main.lua to puzzle out what is happening in the example: