Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods for project and subproject

I'm trying to understand how to add dependencies to Xcode sub project with Cocoapods. My project structure is:

  • Master project with some dependencies
  • Subproject with some other dependencies (one dependency is used by master and subproject).

I tried to use the solution from here but it created another instance of the subproject in the workspace instead keeping it as subproject. Is it possible to work with Cocoapods with subproject? if do what is the right way to do it?

like image 769
Ido Nave Avatar asked Jul 26 '16 11:07

Ido Nave


1 Answers

Try this (for Cocoapods v.1.0.0 and higher)

source 'https://github.com/CocoaPods/Specs.git'
workspace 'YourWorkspace.xcworkspace'

platform :ios, '8.0'

project 'Project'
project 'Project/Subproject'

target 'ProjectTarget' do
  project 'Project'
  pod 'some-project-pod'
end

target 'SubprojectTarget' do
  project 'Project/Subproject'
  pod 'some-subproject-pod'
end
like image 195
somedev Avatar answered Oct 12 '22 20:10

somedev