tags:

views:

2559

answers:

4

Hi everyone.

I have been working for a while to create an iPhone app. Today when my battery was low, I was working and constantly saving my source files then the power went out...

Now when I plugged my computer back in and it is getting good power I try to open my project file and I get an error:

"Unable to Open Project

Project ... cannot be opened because the project file cannot be parsed."

Is there a way that people know of that I can recover from this? I tried using an older project file and re inserting it and then compiling. It gives me a funky error which is probably because it isn't finding all the files it wants...

I really don't want to rebuild my project from scratch if possible.

Thanks in advance.

EDIT

Ok, I did a diff between this and a slightly older project file that worked and saw that there was some corruption in the file. After merging them (the good and newest parts) it is now working.

Great points about the SVN. I have one, but there has been some funkiness trying to sync XCode with it. I'll definitely spend more time with it now... ;-)

Thanks for everyone's comments and suggestions.

+1  A: 

It sounds like you're going to have to create a new project in Xcode, go into the old directory, and drag all your source files, nibs, and resources into the Xcode files sidebar in the new project. It shouldn't take more than a few minutes, unless you really did a lot of work with custom build settings or targets. Either that, or revert to the last check-in in your source control and manually add any code files which changed between now and then.

Marc Charbonneau
A: 

And once you get things working again you should look into using something like subversion or mercurial for backup and revision control. Remember that he electrons don't always go where they are supposed to, backup early and often!

Brian C. Lane
My favorite VCS lately has been git.
Kevin Ballard
A: 

subversion will corrupt my project file after a svn up on an almost weekly basis. I'm trying to figure out why it does this right now and came across this problem.

My guess is that you have the project opened in Xcode at the same time you do an update or commit..."IF" Xcode happen to autosave at the same time I'd guess some corruption can happen
epatel
A: 

change your current project folder nam and checkout module the same project.then add the current file changes.

suresh