call lua scene from documents directory

hi…is it possible call scene by documents directory?

i want update my app from remote and put lua scene in documents directory to modify them after update.

I readed that it isn’t possible for ios but for android? There is a method?

You cannot read lua files from documents directory. The code is compiled when you hit the build button. You could use json and assets to load levels from the internet. But you should just submit a new update to App Store

^ updated post

to work with lua files in documents i’m thinking to update app during first installation by remote. So i insert lua files into documents directory and avoid issue to update app from store.

The issue is composer scene files. If i insert the scene files into documents it does error.

https://forums.coronalabs.com/topic/27060-requiring-lua-file-from-documents-directory/

ok…thanks :slight_smile:

Hey! I’m little late to the party, but I would try something like 
 

[lua]package.path = package.path … ‘;’ … system.pathForFile( nil, system.DocumentsDirectory ) … “/?.lua”[/lua]

Then require your file (remember, no .lua filename). Apple seems to be OK with this for last couple years. You can’t download compiled native binaries, but script languages are fine.

You cannot read lua files from documents directory. The code is compiled when you hit the build button. You could use json and assets to load levels from the internet. But you should just submit a new update to App Store

^ updated post

to work with lua files in documents i’m thinking to update app during first installation by remote. So i insert lua files into documents directory and avoid issue to update app from store.

The issue is composer scene files. If i insert the scene files into documents it does error.

https://forums.coronalabs.com/topic/27060-requiring-lua-file-from-documents-directory/

ok…thanks :slight_smile:

Hey! I’m little late to the party, but I would try something like 
 

[lua]package.path = package.path … ‘;’ … system.pathForFile( nil, system.DocumentsDirectory ) … “/?.lua”[/lua]

Then require your file (remember, no .lua filename). Apple seems to be OK with this for last couple years. You can’t download compiled native binaries, but script languages are fine.