ios 6 - Codea cannot be unsandboxed anymore!

A very bad news… with the new ios 6 release it seems that files contained in the “.app” folder (like Codea.app) are no more editable using external tools (like iExplorer or iFun-box).

That means that Codea cannot be unsandboxed anymore! The only way could be moving the LuaSandbox.lua file from Codea.app folder to an external (like documents) folder…

I really hope something like that for next releases because now a lot of things doesn’t work anymore… Like load of generic files, import (using @ruilov hack) ecc. ecc.

Gosh… The most of my projects rely on unsandboxed functionalities like this :frowning:

.@shrike it’s not too bad. I’ll be removing most of the sandbox (aside from perhaps os.exit() and os.execute()) in the next version.

io.* should be un-sandboxed in the current version. os.getenv isn’t, but that one will be.

Well, not so sure that is not so bad…

In this very moment, without os.getenv I don’t know how to handle this type of functionalities. Moreover if the “import” function is not declared in the luasandbox (and so accessible from all the projects) it is not (and it will not be!) possible to have libs that import other libs (or are you planning to add this functionality to official Codea lib support?)

Btw, the most of my projects rely on libs that include libs and on xml files ecc. so now I really don’t know what to do… It was already difficult to work with the previous release, but now things are getting hard :frowning: I fear I’ll have to spend a lot of time to make things just work again, adjusting code, putting 4 different layered libs together and changing all the datas moving back from xmls to lua descriptors…

Let me know what you would like to see us add to make things easier for you.

Well, I think that the best would be to have back the ability to unsandbox codea somehow… Moreover I think that having filesystem access not limited to imgs, and also having the possibility to include libs that include other libs should really be official features of Codea.

Anyway, about current version:

  1. As we discussed in other threads, having io.* unsandboxed is meaningless without an entry point for the filesystem, and the os.getenv(“HOME”) is the only way I know to get a valid entry point. What I need is a way to call io.open on a generic txt or xml file contained in one of the subdir of Documents (including the synced dropbox dir). For what I remember the lua environment considers the root of ipad filesystem as root, and the codea install folder as the HOME folder, so for now it would be enough to know the correct path. This path includes something like a GUID for the app folder, that I hope to be the same for all the devices… Considering that you’re free to unsandbox codea, could you please try to share the result of os.getenv(“HOME”) call so that I could try to see if it works?

  2. recursive lib inclusion… there were some threads when you released first codea version with lib inclusion finctionalities, and the discussion was mainly about that. But at least in this case there is an easy solution, that is just to put all the files of several libs into one single project… Even if I really, really dislike the idea…

I was thinking about the not recursive project import thing… Maybe I’m wrong but, if it would possible to define the inclusion order of the other projects that should be enough, or am I wrong? It’s like the problem with the tabs in a specific project, using class facility: I can declare B = class(A) only if A is defined in a tab at the left of the one where B is defined (because of the order in which the global namespace is populated).

More over, if I’m right about the way of the global namespace work, having just os.getenv exposed should lead to the possibility to define the import function (and other similar thing) in a specific project, to include it in all the project that need recursive import using the standar codea import (so to have library projects that can also implement some example/testing program), and being this “common project” always the first bunch of file to be load by the current executed project, the import function should then be available to all the later included projects, restoring that way the result achieved having that declared directly into the luaSandbox file.

Do you think that it could work?

Yes, on the beta I had that issue with the.app folder. Known issue. Waiting for Codea to open the sandbox itself…

I think that the inclusion order is the order you choose them in. I did some experiments when this feature first appeared.

ohoh, and I allowed to update to IOS6 ;-).

Meaning: one has to wait for a corresponding update .

@simeon, any confirmation that we will be in sandboxed or at least have getenv() and file write access to the apps’ file system space?