Apparently I have managed to build my project in Xcode 9 beta and now I only get the error
Module compiled with swift 4.0 cannot be imported in swift 3.1<
Same problem here but using Carthage. And here is the answer:
rm -rf ~/Library/Caches/org.carthage.CarthageKit/DerivedData
Carthage
carthage update --platform iOS
And voilà!