I wanted to test my app using Xcode 9 beta. Now I am back to Xcode 8 and I have the following error:
Module compiled with swift 4.0 cannot be imported in swift 3.1
To solve this error I refresh all Carthage build and made some cleaning:
- removed all Carthage
build
andcheckout
- removed
Derived Data
directory - cleaned the project
- run carthage update
But the error still here.
Carthage
The command used is: 'carthage update --platform iOS'
As the problem lie on always the same framework, DeviceKit
I then manage to remove it from Cartfile
.
Project build then show errors as DeviceKit
is not found.
I then re-add it to Cartfile
and run carthage update DeviceKit --platform iOS --no-use-binaries
And the error re-appear.
This related question bring answer but for Cocoapods: Module compiled with swift 4.0 cannot be imported in swift 3.1