无法迁移到3.0 pods库

时间:2016-09-29 18:00:36

标签: swift cocoapods swift3

我使用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

1 个答案:

答案 0 :(得分:0)

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