How to add cocoapods to existing workspace not project How to add cocoapods to existing workspace not project ios ios

How to add cocoapods to existing workspace not project


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


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


matomo