Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Module compiled with swift 4.0 cannot be imported in swift 3.1" error on build #84

Closed
ghost opened this issue Aug 2, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 2, 2017

Yesterday I tried Xcode9 beta. Now I want to go back using Xcode 8 but I faced this error on project build for DeviceKit and only for DeviceKit:

Module compiled with swift 4.0 cannot be imported in swift 3.1

The framework installation is made by Carthage. Building DeviceKit project on Xcode 8 works fine. But not on my project. I've tried a lot of things from deleting all Carthage and rebuild all, cleaning project, removing Derived Data... But the problem is still here. And only on DeviceKit.

So I wonder if there is some configuration in DeviceKit to be made to solve it.

@dennisweissmann
Copy link
Collaborator

I think that is because DeviceKit uses the new build system and does not use the normal DerivedData folder (at least on my machine, I'm not sure whether this is a local/user or shared setting ... You may wanna try deleting any "Derived Data" folder inside DeviceKit's root dir ... Does that help?

@ghost
Copy link
Author

ghost commented Aug 3, 2017

I found the problem: it was related to Carthage. See the answer on StackOverflow.

@ghost ghost closed this as completed Aug 3, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant