最近我接手了一个iOS项目,它使用了框架并且使用了CocoaPods。我正在努力复制这个设置以便更好地理解它。
它有两个框架(作为Xcode项目)名为RaterCommon
和RaterAPIKit
。
这是它的Podfile
的简化版本(我删除了不必要的部分)。
platform :ios, '10.0'
inhibit_all_warnings!
use_frameworks!
workspace 'Rater'
target :Rater do
# various pods
end
target :RaterCommon do
project 'Libraries/RaterCommon/RaterCommon.xcodeproj'
end
target :RaterAPIKit do
project 'Libraries/RaterAPIKit/RaterAPIKit.xcodeproj'
end
在运行
pod install
时,我收到了以下警告:
Podfile包含框架或静态库目标(RaterCommon, RaterAPIKit),但该Podfile未包含宿主目标(嵌入框架的目标)。
即使在Xcode中将它们添加到“链接的框架和库”和“嵌入式二进制文件”中,我仍然无法在我的主项目源中导入这些框架。它显示 "没有此模块"。