1

I use Kanna and Reachability libraries. And seems they already migrated to swift 3. I use 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

end

Got error when do import:

import Kanna
import ReachabilitySwift

Module compiled with Swift 2.3 cannot be imported in Swift 3.0

Flag: Use legacy swift versions everywhere set to No

Arti
  • 7,356
  • 12
  • 57
  • 122
  • What is the output when you run pod install or pod update from the command line? – Marcus Sep 29 '16 at 18:48
  • all is ok: Pod installation complete! There are 7 dependencies from the Podfile and 17 total pods installed. – Arti Sep 29 '16 at 19:14
  • Glad to hear it. I had a lot of trouble with a similar problem last week. – Marcus Sep 29 '16 at 21:44
  • @Sparky what solution ?:) up my question please) Because i tried all links already, nothing help. – Arti Sep 30 '16 at 04:40
  • apologies, I thought your message meant you had solved the issue! I have upvoted your question as I'm not sure what the problem is in your case. – Marcus Sep 30 '16 at 06:13
  • @Sparky but what the solution in yours ? – Arti Sep 30 '16 at 09:53
  • The reason I asked for the output from pod install was because my Pods weren't even updating when I changed the podfile for the new version. I actually ended up using Carthage as an alternative. Are your pods available on Carthage instead? – Marcus Sep 30 '16 at 10:05

1 Answers1

0

Found solution here. Need to delete rm -rf ~/Library/Developer/Xcode/DerivedData/ This folder was cached.

Community
  • 1
  • 1
Arti
  • 7,356
  • 12
  • 57
  • 122