iExplorer Stunts Roundup

Here are some stunts I figured out how to do in iExplorer:

  1. Sprite packs - You can create a sprite pack by starting off and copying a built in sprite pack from Codea to your desktop found at ~/Apps/Codea/ Then alter the Info.plist file contents to whatever you want. In my example below, you will see the info I changed. Change the file Icon to a 108x92 pixel image. You can change the rest of the images to whatever you want. You can then copy it back into that folder and then restart Codea. Here is my example of my UI sprite pack: spritepackexample
  2. Share .codea files - In iExplorer, navigate to ~/Apps/Codea/Documents/ to find your .codea files. Copy it and paste it into another iPad’s same folder. It should then appear on that iPad.
  3. Project description - Go under ~/Apps/Codea/Documents/your .codea file and open the Info.plist file. Inside, you will find some settings. Alter the “Desctiption” category and alter it to whatever you want. The author section shows up nowhere as far as I can tell. Here is my result: describeresult.
  4. Change the Codea icon - First of all, to make the job easier, get the app Icon Express for free from the Mac App store. Drag the 512x512 image you want to where it tells you to. Then, at the top of the window, select “iPhone 4 / iPad/ iPhone” and then uncheck iPhone 4 and iPhone for export. Then, on the side bar, check “Generate iOS Icons”. Then press export and choose the location. Then drag “iTunes Artwork.png” and “Icon-72.png” into ~/Apps/Codea/ Restart you iPad and the icon should appear. I had to try restarting multiple times to get it working. I think Codea has to be closed for it to be effective. To add a gloss to the icon, navigate to ~/Apps/Codea/ Change the “Icon already includes gloss effects” to “NO”. A gloss should then appear. I can’t get it to work right now, so if you manage to get it to work, let me know your steps please. I want to be able to do it without reinstalling Codea.
  5. Get rid of the “Made with Codea” when recording a video of the screen - READ THIS FIRST: PLEASE DO NOT DO THIS UNLESS ABSOLUTELY NEED TO. GIVE TLL THEIR CREDITS FOR THEIR AMAZING APP. Here are the steps: Simply go to ~/Apps/Codea/ and delete it. Tada! Gone.
  6. Get the HTML of the Codea reference - Navigate to ~/Apps/Codea/ and there you have it!
  7. How to change the default code for a new project or class - To change the default project, navigate to `~/Apps/Codea/ and change it to whatever you want. If y want to change the default class, go to ~/Apps/Codea/ and change that to whatever.

I am soon to figure out how to get your project as an example and add an icon to it. I am not responsible for any damage done to your iPad with this. If Codea does get messed up, you can reinstall Codea for free. If you guys find something else that you like to do with iExplorer with Codea, please LMK :slight_smile:
Hope you liked this!
P.S. You most likely will notice socket related .lua files. Those are what are hopefully to come.

Whilst I’d sometimes like to move the “Made with Codea” on videos, I’d encourage people not to remove it. The more associations Codea gets with great demos, the better.

I know. I almost didn’t put it on there, and I was going to write a note about it. I’ll see what I can do. It’ll be pretty hard. Thanks for reminding me to write that note @Andrew_Stacey.

The note is done.

I’ve suggtested before - I’ll suggest it again. I can see people making movies and such who really don’t want the “Made with Codea” watermark. I say make removing is be a $1 in-app purchase. Those who want/need it gone can do so legitimately, cheaply, and in good conscience, and those who don’t care are unaffected.

Hmm… Curious idea @Bortels. But lets not get into a rant about it on a post I want to be about the iExplorer stunts. Any other ideas that are feasible to accomplish?

I think I might have figured out how to enable these functions:


I just don’t want to make TLL a little bothered by the ability of us being able to use it. May I please share it? Anyways, I think this might be a false alarm. I’m not exactly sure how to use these functions, so that’s why I’m not sure they work :frowning:
LMK if you know how to use this and would like to try it out.

@Zoyt you are talking about the LuaSandbox.lua file. Anyone with iExplorer can modify this file to make those names accessible in Codea.

The debug library might not work because I’m not sure if that library is even loaded.

Feel free to modify the LuaSandbox.lua file if you are using iExplorer. Just keep in mind that it’s unsupported, your code will generally not be shareable, and might break with future updates.

He is the next one:
7. How to change the default code for a new project or class - To change the default project, navigate to `~/Apps/Codea/ and change it to whatever you want. If y want to change the default class, go to ~/Apps/Codea/ and change that to whatever.
P.S. You most likely will notice socket .lua files. Those are what are hopefully to come.

Alright. Thanks @Simeon. I just didn’t want to take risks (although I’ve noticed that your fine with hack ever synce you approved of @Bortel’s sprite pack hack)

That’s awesome Zoyt. Does that io.write give access to the whole filesystem, or just to the directory under the project?

If we do have file io to the whole directory tree, I’m thinking it’s fairly easy to write a utility that

  • encodes a project in a relatively compact string

  • decodes a project from that string, including which tabs exist, project storage files, etc

  • anyone that is up to it can use this utility (plus your hack) to share projects in a pretty simple but completely unsupported way, and without jailbreaking the ipad.

  • based on this we could also roll out library management before TLL gets around to it because there’s lots of us and only a few of them, power to the people :slight_smile:

The only lua I know is through codea so I’m looking up what some of those disallowed functions do, but it’s not immediately clear to me why some of them are disallowed.

For example, rawget and rawset. Is that because if I had rawset I could for example re-allow all the unallowed functions? (I haven’t figured out how, but imagine it’s a reason like that)

Anyway, I’m not really asking TLL to teach us how to hack around the sandbox here in the forum - just an interesting thing to think about.

@ruilov - I don’t know how to use any of the function I listed, but I think all you have to do is delete the file, or atleast get rid of the text that are related to file IO. Let me know how it goes, and I’ll post instructions if it works.

@ruilov Yes, that’s the reason to disable rawget and rawset for a lua sandbox.

I tried removing the sandbox. Restarting Codea was not enough. The old file must be held in a cache or stored in some way. I had to reboot my iPad for the new file to take effect.

@Bortels I think a little extra money to remove the “Made in Codea” is very reasonable, as you are asking TwoLivesLeft to do their own marketing, rather than providing that value for them. I personally would be happy to pay more than $1.

@Martin - (cough cough I discovered it cough cough). You can see my division on how to enable file io and other things. I’m glad you did the file io thing. LMK if you write some cool code