Transfer Codea projects?

A random fright just popped into my head… If you get a new iPad, or your old iPad dies, is there a way to transfer all your projects and code to a new iPad, or is all of your work gone forever?

If you have all of your projects backed up on Dropbox or somewhere else, you can just load them on the new iPad. The other apps you purchased or free apps should load from the app store.

You could also use iFunBox to copy the Documents Folder in Codea. Its the folder which contains all the codes, sprites and shaders. If you lose any data then you can simply paste that folder back into Codea and it will be as it was when you copied the folder.

If we had a way to create projects via code it would be simple to write one app to backup and load all of your projects. Currently I believe @dave1707 suggestion is best.

I already have code to backup my projects. I’m just waiting for the listProject() function so I can do it automatically instead of having to key in each project name. I don’t have all of my code backed up because I have over 250 projects and I’m not going to key in that many project names.

@dave1707 is it possible to back up shaders to drop box without pasting them into a project. What I mean is directly from the shder lab? I backup my projects to drop box using @Ignatz 's code. but only for shaders and sprites I use IFunBox.

@dave1707 wouldn’t listProject() just list all project names? I think we would need createProject() to allow backup project to create a new project then save the tabs.

Okay… For one, I’m kind of confused using @Ignatz’ backup project. And I don’t see any app called iFunBox on the App Store. Is it a Jailbroken app? Because I can’t Jailbreak.

@SkyTheCoder What OS do you have on your computer?

@Saurabh I haven’t messed around with shaders, so I can’t say how they could be backed up. @Briarfox listProject() would list all of the projects, just like listProjectTabs() lists all of the tabs in a project. But that would make it easy to backup all of the projects at once. createProject() would come in handy if all of your projects were backed up and you wanted to create them on another iPad or you lost them on your current iPad. But off hand I don’t know if there’s a way to read all of the files from a sync’d Dropbox automatically. There needs to be a listDirectory() function also.

IFunBox is for Mac and PC and no you don’t need a jailbreak to backup using it.

@SkyTheCoder If you can’t get around the problems, you could try the code I have at the link below.

@Andrew_Stacey I used to use my family’s Windows 7 laptop, but now I have my own MacBook Pro. So Mac OS X.

@dave1707 There’s no way to access the shader code in the shader lab except for shader(shader name), but you can use [[ and ]] to make a multiple-line string that can be used as a shader by calling shader(vertex program string, fragment program string). That would require copying back and forth both tabs of all your shaders, though. Also, that project looks like one I was looking for.

@dave1707 Yes! That project worked, I synced my Dropbox and I have them as files on my computer. Is there any other way to sync them from my computer to my iPad other than maybe making a gist on GitHub?

Edit: Never mind, didn’t finish reading the post ll the way. I didn’t even think of accessing the files on my iPad. :stuck_out_tongue:

Edit 2: I feel a lot safer now, knowing my stuff can be saved.

@SkyTheCoder Install libimobiledevice (can be done via HomeBrew). Then you can mount the Codea Documents directory directly on your machine and simply copy everything across (shaders as well as projects).

@Andrew_Stacey Is that an iPad app, Mac app, or just one that can be found on the Internet? Also, what is HomeBrew?

Edit: Haha, thanks Google.

Edit 2: Dang it, how do you install these kinds of apps? I extract them and it’s a bunch of folders and files with no extensions named “AUTHORS,” “README,” “COPYING,” etc.

Am I missing something? If you are backing up your device regularly (which you should be), then won’t restoring that backup to a new device restore all of the apps’ data (e.g. your Codea projects) too? I know it’s still possible to lose recent work of course, but you’ll pretty much have this problem with any other backup solution too. Since you can set your device to automatically back itself up (either to the cloud or directly to iTunes), to me this seems ideal.

My dad never really backs up the iPad, as far as I know.

Like I said, it’s not hard to set it up to do it through iCloud. The iPad should detect whenever your device is plugged in, locked, and connected to wifi, and should automatically back itself up :slight_smile:

@SkyTheCoder Learn Unix, it’ll open up a whole new world for you. You’ll look on with pity, and a little smugness, as everyone complains about how their computer does weird things when your computer does exactly what you want it to.