【问题标题】:Can't migrate to 3.0 pods libraries无法迁移到 3.0 pod 库
【发布时间】:2017-02-08 04:17:35
【问题描述】:

我使用KannaReachability 库。似乎他们已经迁移到 swift 3。我使用 Cocoapods

# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!

target 'MyProj' do
pod 'Kanna', '~> 2.0.0'
pod 'ReachabilitySwift', '~> 3'
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

结束

导入时出错:

import Kanna
import ReachabilitySwift

使用 Swift 2.3 编译的模块无法导入 Swift 3.0

标志:Use legacy swift versions 处处设置为No

【问题讨论】:

  • 从命令行运行 pod install 或 pod update 时的输出是什么?
  • 一切正常:Pod 安装完成! Podfile 中有 7 个依赖项,总共安装了 17 个 pod。
  • 很高兴听到这个消息。上周我遇到了很多类似的问题。
  • @Sparky 什么解决方案?:) 请提出我的问题)因为我已经尝试了所有链接,没有任何帮助。
  • 抱歉,我认为您的信息意味着您已经解决了问题!我对你的问题表示赞同,因为我不确定你的问题是什么。

标签: swift cocoapods swift3


【解决方案1】:

找到解决方案here。需要删除rm -rf ~/Library/Developer/Xcode/DerivedData/这个文件夹被缓存了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-25
    • 2014-04-17
    • 2019-06-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多