IPad – Recover Folder from xcode project

data-recoverydeletingfoldersipadxcode

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!

Best Answer

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.