Load lua code at runtime

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()?

It’s possible, I thought about at one point making a host for this but I have been super busy :slight_smile:

I made a plugin for this

Thanks a lot for sharing this! I see you use loadstring, I did not know that this function is available. It is not documented in the API.

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.