我在将可可豆荚(CocoaLumberjack
在本例中)集成到 iOS 应用程序和我自己的框架时遇到问题。
Podfile
看起来像这样:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "8.0"
target "CommonModule" do
use_frameworks!
# CocoaLumberjack wasn't officially released with Swift support yet
# pod 'CocoaLumberjack'
pod 'CocoaLumberjack', :git => 'git@github.com:CocoaLumberjack/CocoaLumberjack.git', :commit => '6882fb5f03696247e394e8e75551c0fa8a035328'
xcodeproj 'CommonModule/CommonModule.xcodeproj'
end
我有这样的模块层次结构(动态框架):
CommonModule
ModelsModule
(有依赖CommonModule
)
最后,主应用程序:
MySwiftApp
(依赖两者ModelsModule
和CommonModule
)
现在,CocoaLumberjack
在几个文件中使用CommonModule
并按预期工作。但是,每次我import CommonModule
在 中的任何文件中执行操作时ModelsModule
,都会出现以下编译错误:
~/Developer/ModelsModule/ModelsModule/SomeFile.swift:2:8: error: missing required module 'CocoaLumberjack'
import CommonModule
^
知道如何解决这个问题吗?