2

I feel sick...

I just accidently deleted the www folder of my phonegap app in xcode 4.2. It's not in finder or trash. From what I read, its actually deleted. I have tested on my ipad.

How can I recover this folder and everything in it? Can I somehow get the file from the app installed on the ipad?

Please help!

2 Answers 2

1

First, and most importantly: Use version control and push to a remote server at regular intervals. There are multiple free options available, such as BitBucket. You should never have put yourself in this situation.

As the www content in PhoneGap applications is interpreted at run time, you should be able to recover it from a device by syncing it to iTunes, then dragging the application out of iTunes as an ipa file. The ipa file is just a zip file following some particular conventions, so rename it to .zip and decompress it to get the files in the application bundle.

And finally, because it's so important: Use version control and push to a remote server at regular intervals. A programmer without version control is like a painter without overalls or a bicyclist without a helmet.

0

It's possible that the file exists somewhere in temp build directory, or possibly in your simulator, but it could be tough to find, and it might be gone already.

Also, unless your iPad is jailbroken, I wouldn't even consider trying to get the assets from it.

To prevent this into the future, please investigate using a source control product like Git. Everyone gets burned like this at one point or another, and that is forces us all to actually use tools like Git.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .