Loading a remote module

Hi there,

Is what the topic’s title says possible? I mean, what if I download a remote json from internet and save it as a .lua in system.DocumentsDirectory, is there a way to load that module? I’ve a “test.lua” in the Documents directory in the project sandbox, and the next piece of code in main…

local remotePath = system.pathForFile("", system.DocumentsDirectory) remotePath = string.gsub(remotePath, "\\", ".") remotePath = remotePath .."test" local remoteModule = require(remotePath)

…but doesn’t work. I already know I’ve tried something impossible, but I’m just testing how powerful is Lua

Quite simply, no.

“Normal” Lua allows you to, but Corona doesn’t (iOS restrictions on downloaded code).

  • C

Oooh what a pity… Well, just wanted to make sure what I already knew

Quite simply, no.

“Normal” Lua allows you to, but Corona doesn’t (iOS restrictions on downloaded code).

  • C

Oooh what a pity… Well, just wanted to make sure what I already knew