I just had the problem, that I created a brand new project in Xcode and wanted to add CocoaPods to it. When I opened my newly created workspace I got the error:

Couldn’t load myproject.xcodeproj because it is already opened from another project or workspace

Only the Pods project was correctly listed in the workspace – myproject not. The solution was to close the project in Xcode and close Xcode before running

pod install

The steps to fix this issue:

  1. Create new project in XCode
  2. Close the project via “File > Close Project”
  3. Close XCode
  4. Go into the project directory
  5. add the Podfile
  6. run pod install
  7. Open the workspace