1

I have an Xcode project in Swift 3.0.1, and am getting this error upon trying to build:

Module compiled with Swift 3.0 cannot be imported in Swift 3.0.1: <path_to_project>/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule

I've referenced this question: Module compiled with swift 3.0 cannot be imported in Swift 3.0.1, but the selected answer did not work.

The contents of my Cartfile is simply: github "Alamofire/Alamofire"

Thanks in advance for your help.

Community
  • 1
  • 1
rogerogden
  • 15
  • 4

2 Answers2

0

Add this to your root folder like what you did with '.gitignore'

.swift-version

'.swift-version' should contain '3.0-GM-CANDIDATE' then do 'pod install'

eNeF
  • 3,241
  • 2
  • 18
  • 41
  • I'm not using CocoaPods, just Carthage. However, adding the file and doing `carthage update --platform iOS --no-use-binaries` did not work. – rogerogden Nov 26 '16 at 16:37
0

You may have multiple Xcode.

check your xcode path

xcode-select --print-path

check your swift version

xcrun swift --version

carthage will build based on the swift version that printed in terminal by above command.

Solution

sudo xcode-select --switch <your new Xcode path>

carthage update --no-use-binaries --platform iOS
Shebin Koshy
  • 1,182
  • 8
  • 22