Module compiled with Swift 3.0.2 can not be imported in Swift 3.1

1

When creating a project and installing cocoapods and alamofire, when running it is only this error and not build in the project, even empty only by importing alamofire

  

Module compiled with Swift 3.0.2 can not be imported in Swift 3.1

I have tried several topics but have not been successful. if someone has already gone through this, help me I'm on time in this error

    
asked by anonymous 28.03.2017 / 23:30

1 answer

1
The problem is because the Alamofire module is compiled in version 3.0.2 and you are now trying to compile your project in version 3.1, which prevents the module from being imported into the project. For more details, click here !

I was having the same problem, even with the same Alamofire module installed via POD. Just cleaning the project did not solve it for me. But I was able to fix the problem as follows:

  • I removed the project's Alamofire

  • I cleaned the project (CMD + SHIFT + K)

  • I updated POD (pod update), and

  • I added the Alamofire back to the podfile and had it installed.

  • I hope this helps you.

        
    30.03.2017 / 23:24