mutualmobile / MMDrawerController

A lightweight, easy to use, Side Drawer Navigation Controller
MIT License
6.76k stars 1.38k forks source link

Module compiled with Swift 4.0 cannot be imported in Swift 4.0.2: #502

Open ShehanAmarakoonCBA opened 7 years ago

ShehanAmarakoonCBA commented 7 years ago

I'm using xcode 9.1. This error is coming.

Module compiled with Swift 4.0 cannot be imported in Swift 4.0.2:

JohnTheBastard commented 7 years ago

This happens if you try to use a precompiled framework (e.g. any swift modules installed with carthage). They need to be recompiled when you upgrade Xcode. I haven't seen this problem with cocoapods, but maybe it's possible with some custom settings. MMDrawerController is written in ObjectiveC and doesn't support carthage, so it seems unlikely to be the source of your problem.

My recommendation is to run carthage update. If that doesn't fix your problem, try running the following commands:

> rm -rf  ~/Library/Developer/Xcode/DerivedData
> rm -rf "${HOME}/Library/Caches/CocoaPods"
> rm -rf "`pwd`/Pods/"
> pod install

Good luck.