Javad
Javad

Reputation: 43

Cocoapod: Install pod for internal target (cocoa framework)

Hi I want to modularize a project by creating framework and adding it to a project. but when I want to install pods for specific target (I mean frameworks and main target) I will get error.

I had searched for this specific problem and didn't find anything useful.

Error Image is Here

Podfile Image is Here

Error :

[!] Unable to find a target named Photo, did find testForModule.

Podfile:

# sources
source 'https://github.com/CocoaPods/Specs.git'

# global config
platform :ios, '11.0'
use_frameworks!
workspace 'testForModule'

def networkAndParsingPods
  pod 'Alamofire'
end

def uiPods
  pod 'TextFieldEffects'
end

target 'testForModule' do
  networkAndParsingPods
end

target 'Photo' do
  uiPods
end

I'm doing this because of separation concerns, because some module work with specific pod and some module shouldn't access to that.

thanks for any help

Upvotes: 0

Views: 205

Answers (1)

Paul Beusterien
Paul Beusterien

Reputation: 29547

Photo must be a target in the Xcode project before it can be specified as a target in a Podfile.

Upvotes: 1

Related Questions