Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8 beta 4: Build fails with "The following binaries use incompatible versions of Swift:" error

With new Xcode 8 beta 4 we started experiencing the following error during CopySwiftLibs build phase:

Effective srcDirs: {(      <DVTFilePath:0x7f865961e970:'/Volumes/Data/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator'>,      <DVTFilePath:0x7f8657d02b20:'/Volumes/Data/Xcode-beta.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/lib/swift/iphonesimulator'>  )} 

error: The following binaries use incompatible versions of Swift:

/Users/user/Projects/git/iphone-swift-1/DerivedData/myApp/Build/Products/Debug-iphonesimulator/myApp.app/myApp

/Users/user/Projects/git/iphone-swift-1/myApp/myAppApi.framework/myAppApi

myAppApi is a subproject in the workspace that contains some shared code (it uses Alamofire).

One thing to note: originally we converted project from Swift 2.2 to Swift 2.3, and then manually upgraded to 3.0.

Does anyone have any idea what might be causing this error?

Thanks!

like image 799
iGA Avatar asked Aug 05 '16 15:08

iGA


1 Answers

I had the same problem, but managed to fix it by:

  1. Clean the project.
  2. Close project and quit Xcode.
  3. Clean derived data.
  4. Open the project again and it's there, all nice and working.

I did this on Xcode 8 using Swift 3.

like image 121
ossmalpha Avatar answered Oct 05 '22 06:10

ossmalpha