问题
I am getting following error after I add a library via carthage -
library name compiled with older version of Swift language (2.0) than previous files (3.0) for architecture x86_64
I have tried it with Argo library. (https://github.com/thoughtbot/Argo)
I have selected the correct xcode version using xcode-select utility.
What could be the problem? Any help is greatly appreciated
Thanks!
回答1:
From what I learned, looks like you can't have libraries written in different versions of Swift.
In my Obj-C project I had 2 libs installed with CocoaPods I updated the first one using the swift3 branch on github, and I converted the second one with Xcode.
Everything is building properly now!
回答2:
This is happening as you've included another library (via cocoa pods or by linking the library directly etc...) which is compiled (or being compiled) in swift 2.
I've seen this a lot with Cocoapods (and Carthage)
来源:https://stackoverflow.com/questions/39291862/cannot-build-project-with-xcode-8-beta-6