I am working on a project which is composed of three other projects in a workspace. I want to use CocoaPods to manage my dependecies in the workspace, but CocoaPods always creates its own workspace with only one addtional project. What I want to do is to add CocoaPods project to the workspace that already exists. Is there any simple way to achive that?
2 Answers
In terminal go to directory with your xcworkspace-file.
$ touch Podfile
then in Podfile :
workspace 'YourWorkspace' target 'YourProjectName' do platform :ios, '8.0' pod 'your pod' project 'Path to your Project in your workspace' end $ pod install
4 Comments
FelixSFD
why do you add an answer to an old question with an accepted answer, which is almost the same as your answer?
Illya Krit
It has more details. The old answer doesn't help me in my search
Crocobag
A mix between this answer and medium.com/@youvalv/… helped me to build this. Beware though, once
pod install has been run, clean the project and relaunch XCode. Sometimes it fails updating dependencies. Thanks mateGeorgios
The path in the
project should not begin with "/". For me this worked: project 'pathTo/MyProject' but this didn't: project '/pathTo/MyProject'.You can specify a workspace in your podfile.
workspace 'MyWorkspace' Please consult this link for more info: http://guides.cocoapods.org/syntax/podfile.html#workspace