Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add cocoapods to existing workspace not project

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?

like image 596
pawel.kalisz Avatar asked Mar 10 '14 09:03

pawel.kalisz


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

like image 99
Illya Krit Avatar answered Oct 20 '22 19:10

Illya Krit


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

like image 44
Thomas Keuleers Avatar answered Oct 20 '22 21:10

Thomas Keuleers