0

我有一个额外的目标,即今天的小部件。我正在尝试向此目标添加一些 pod,但是当我尝试导入模块时,我没有得到这样的模块“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
  • 我已经多次清除派生数据、清理项目、重新打开项目和重建项目。

我怎样才能让它工作?

结果是 在此处输入图像描述

4

1 回答 1

1

好像 cocoapods 版本有点过时了。在某些情况下(尤其是考虑到不断变化的 swift、xcode 和 cocoapods)可能会导致令人沮丧的后果。幸运的是,通过更新 cocoapods 很容易解决这个问题。

于 2017-01-08T16:38:11.820 回答