简体   繁体   中英

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

在将Photo指定为Podfile中的目标之前, Photo必须是Xcode项目中的目标。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM