Project ...xcodeproj cannot be opened because it is missing its project.pbxproj file Project ...xcodeproj cannot be opened because it is missing its project.pbxproj file xcode xcode

Project ...xcodeproj cannot be opened because it is missing its project.pbxproj file


The simplest thing to do is probably to

  1. Checkout myProject.xcodeproj from source control. This will contain the changes that were causing you to be in conflict last time.
  2. Redo the project changes that you made since the last time you committed to source control
  3. commit/push to source control.

In the future, when you get a conflict in the project file, take a look at myProject.xcodeproj/project.pbxproj. Often it's just new files in the project that have been added at the same place. In this case you just need to delete the conflict metadata and resolve the conflicted state.


In the end, what I had to do was

'cp -R ...TimeMachineBackup/myProject.xcodeproj ...myProjectArea/myProject.xcodeproj'

Then I had to do the following in myProjectArea:

git reset --merge

This allowed me to open the project and switch branches back to my main branch.

not a pleasant experience


I was able to get this working without commandline stuff like this:

  1. Go to Time Machine drive in Finder.
  2. Navigate to desired backup.
  3. Drag it to where I want it. This will complain about not having permission to access the .pbxproj
  4. Right-click the xcodeproj you just dragged out, select "Show Contents".
  5. Right-click the xcodeproj in the Time Machine backup folder, select "Show Contents".
  6. Drag the .pbxproj you see inside to the destnation you just created with the drag in #3.

Now it should work.