Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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!

share|improve this question
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.