2

Original issue: xcodeproj components didn't display in workspace I've installed Cocoapods on my machine. When I install a pod in a project, a workspace is created, but when I open the workspace the files associated with the original project don't display. I had Xcode closed when I created the pod. I've attached a screen cap of my project after installing the Pods.

I think I've got an installation problem, but I don't know where I need to look to fix it. What/where should I be checking?!

Update: Compiler error The following compiler error comes up when I open the workspace file:

podsexample.xcodeproj Couldn't load podsexample.xcodeproj because it is already opened from another project or workspace

I closed Xcode when I created the pod, so I'm stumped on this one.

Update 2: It works, but is this the way it's supposed to work? I got partway to the answer to my problem by following the steps outlined in this helpful post:

Can't get to work CocoaPods and Yosemite

In order to open the workspace file correctly, I have to run 'pod setup' each time. Are CocoaPods supposed to work like this, or is setup supposed to be a one time thing? If I've got an installation/configuration problem, where/what should I be looking at to fix?

Screen Cap of Original Issue

Community
  • 1
  • 1
iOSPadawan
  • 146
  • 2
  • 10

1 Answers1

1

podsexample.xcodeproj Couldn't load podsexample.xcodeproj because it is already opened from another project or workspace

Looks like you had two copies of Xcode open with the same project. One was inside the Xcodeworkspace that CocoaPods created, and the other was the original Xcodeproject itself. Xcode doesn't allow this, so it won't compile as long as both are open. You only need to open the XCWorkspace.

orta
  • 4,225
  • 1
  • 26
  • 34
  • Thank you. I'm certain I had Xcode closed when I installed the pod. I am ~fairly~ certain I only clicked on the xcworkspace file, but I'll keep an eye on that the next time I install a Cocoapod on a project. – iOSPadawan Dec 30 '14 at 20:11