我使用Kanna和Reachability个库。似乎他们已经迁移到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