22

I have done some changes in functionality throughout the day. After that I closed workspace and try to open it again it is showing Couldn't load project.

Screenshot

I've tried all solution available on stackoverflow but none worked. I'm using cocoa-pods in project.

Any other fix?

Community
  • 1
  • 1
Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177

7 Answers7

27

It's an error when project.pbxproj failed to load the project for some reason.

Solution 1 -) Be sure that project.pbxproj file in project folder had not merge conflicts.

To do that, you can open it in a text editor. Then you need to look for interrupts like;

<<<<<<< HEAD

=======

>>>>>>> feature/...

After being sure conflicts are resolved, then you can go to source control and mark the conflicts resolved of the file (if you'd like to commit your resolved merge)

Solution 2 -) It can also be caused by missing fancy brackets in the same file that you may be familiar with JSON syntax. It generally happens due to wrong conflict resolutions.

Solution 3 -) If neither of the solutions above worked for you, you can ensure that you didn't delete something and corrupt the structure of project file by looking at the difference between your last correct project file in a branch and the current one. For my case, I generally solve the problem by checking if I deleted those lines by mistake.

    name = NameOfGroup;
    sourceTree = "<group>";
};

Solution 4 -) As a final solution, you may want to restore project.pbxproj file from a branch that it was not broken. Then, manually add references of recently added files to project.

Yusuf Kamil AK
  • 771
  • 8
  • 17
18

i got same problem . i closed the project and reopened it .it worked for me.

16

I had the same problem.

  1. I first ran pod repo update. It takes a while to finish.
  2. Then i ran pod install.
  3. Open up your workspace and the problem should be fixed.
Nick
  • 213
  • 3
  • 6
12

It could be an issue with project.pbxproj file

enter image description here

I have solved this issue with this tools :

https://github.com/Karumi/Kin

After installation, i have performed a check :

enter image description here

See error was a bad merging on this error in project.pbxproj:

ERROR: line 451:2 missing ';' at 'D062826E1DE2F43300818438'

Because XCode does not give a lot of information about this error, i advice to you to check your .pbxproj to be sure to exclude this possibility

Kevin ABRIOUX
  • 16,507
  • 12
  • 93
  • 99
3

I had to upgrade Xcode before I could open the project (or any workspace containing it).

To know if you need to upgrade Xcode, try opening the project directly (rather than opening the workspace) and you should get the following error message:

The project at '/path/to/your.xcodeproj' cannot be opened because it is in a future Xcode project file format. Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode.

aleclarson
  • 18,087
  • 14
  • 64
  • 91
  • Although your inputs are related to Xcode version but this problem was raised while using Xcode 7. The only solution was to resolve conflicts in project file. – Jayprakash Dubey Dec 13 '19 at 06:30
2

There were conflict in my .pbxproj, once i remove the conflict and it worked !

1

None of solutions above helped, after restart mac everything was fine

Evgeniy Kleban
  • 6,794
  • 13
  • 54
  • 107