TodayViewController 上没有这样的模块错误
No such a module error on TodayViewController
我有一个额外的目标,它是一个今天的小部件。我正在尝试向该目标添加一些 pods,但是当我尝试导入模块时,我没有得到这样的模块 'xxx',顺便说一句,它正在我的主要目标上工作。这是我已经完成的,
播客文件
target 'My-Project' do
use_frameworks!
pod 'SwiftyUserDefaults'
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git'
end
target 'My-Widget' do
use_frameworks!
pod 'SwiftyUserDefaults'
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
- pod 安装没有错误。
- .xcworkspace 打开的项目
pod --version
是 1.0.1
- 我已经清除派生数据、清理项目、重新打开项目和重建项目几次。
我怎样才能让它发挥作用?
结果是
cocoapods 版本似乎有点过时了。在某些情况下(尤其是考虑到不断变化的 swift、xcode 和 cocoapods),它可能会导致令人沮丧的后果。幸运的是,这个问题很容易通过更新 cocoapods 来修复。
我有一个额外的目标,它是一个今天的小部件。我正在尝试向该目标添加一些 pods,但是当我尝试导入模块时,我没有得到这样的模块 'xxx',顺便说一句,它正在我的主要目标上工作。这是我已经完成的,
播客文件
target 'My-Project' do
use_frameworks!
pod 'SwiftyUserDefaults'
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git'
end
target 'My-Widget' do
use_frameworks!
pod 'SwiftyUserDefaults'
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
- pod 安装没有错误。
- .xcworkspace 打开的项目
pod --version
是 1.0.1- 我已经清除派生数据、清理项目、重新打开项目和重建项目几次。
我怎样才能让它发挥作用?
结果是
cocoapods 版本似乎有点过时了。在某些情况下(尤其是考虑到不断变化的 swift、xcode 和 cocoapods),它可能会导致令人沮丧的后果。幸运的是,这个问题很容易通过更新 cocoapods 来修复。