cannot build project with xcode 8 beta 6

柔情痞子 提交于 2020-01-26 01:20:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!