Project ... xcodeproj could not be opened because project.pbxproj file is missing

I tried to merge the branches, and this led to the error " Unable to open project ... cannot open because the project file cannot be parsed ." Then I tried to take the advice of the other stackoverflow answers (namely, edit the file to remove the damage), but could not edit the file. It looks like this is actually a directory, so perhaps the structure of this has changed with version 4.4 xcode and after responding to Unable to open project ... cannot be opened because the project file cannot be parsed .

Then I tried to restore myProject.xcodeproj from my backup time. This does not work because it says that I do not have permission to access myProject.xcodeproj. I tried to change the resolution of this directory, but that did not help.

I closed and reopened xcode. Now the error:

Project ... xcodeproj could not be opened because the file project.pbxproj is missing .

How can I fix this problem in xcode version 4.4? Whether it can be restored from a previous snapshot or archive or version in xcode. Can it be restored using a time machine. I would like to avoid overhauling the entire project.

+7
source share
4 answers

In the end I needed

'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 a project and switch branches back to my main branch.

Not a pleasant experience

+5
source

The simplest thing perhaps for

  • Place an order myProject.xcodeproj from the control source. This will contain the changes that last cause a conflict.
  • Repeat the project changes that you have made since you last connected to the source control.
  • commit / push for source control.

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

+6
source

I managed to get this working without command line files as follows:

  • Go to the Time Machine drive in the Finder.
  • Browse to the desired backup.
  • Drag it to where I want. This will complain about the lack of permission to access .pbxproj
  • Right-click the xcodeproj that you just pulled out, select Show Content.
  • Right-click xcodeproj in the Time Machine backup folder, select Show Content.
  • Drag the .pbxproj file that you see inside to the destruction just created using drag and drop to # 3.

Now it should work.

+2
source

For others looking at this issue, the reason in my case turned out to be that the "conflicting text" from the git merge crept into the actual file:

 <<<<<<< HEAD F0FDA2D61B99EB80007DB99D /* Aptron-mCollegix.xcassets */, ======= F08CFAAA1BC1E9EE00A5B6F5 /* Aptron-mCollegix.xcassets */, >>>>>>> hotfix/Column_Text_Cut-off 

opening project.pbxproj in a text editor simplified the fix.

+1
source

All Articles