Cocoapods for project and subproject

I am trying to figure out how to add dependencies to an Xcode subproject using Cocoapods. My project structure:

  • Master project with some dependencies
  • A subproject with some other dependencies (one dependency is used by the wizard and subproject).

I tried using the solution from here , but he created another instance of the subproject in the workspace, instead saving it as a subproject. Is it possible to work with Cocoapods with a subproject? if you do the right way to do this?

+4
source share
1 answer

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
+1
source

Source: https://habr.com/ru/post/1649156/


All Articles