Alamofire: Bug: Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3 compiler.

Created on 17 Aug 2020  路  4Comments  路  Source: Alamofire/Alamofire

What did you do?

I have installed the Xcode 12 beta 4 version.

What did you expect to happen?

My app compiled without problems.

What happened instead?

I got the compilation error:
Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3 compiler.

Alamofire Environment

*Alamofire version: 5.2.2
*
Xcode version: 12 beta 4
*Swift version:5.3
*
Platform(s) running Alamofire: iOS
**macOS version running Xcode: 10.15.5

Demo Project

N/A

support

Most helpful comment

I deleted the Carthage folder and started from scratch (fetch, build, etc.), still getting this error...?

Silly me, I forgot to update the command line tools that Carthage uses to build Alamofire, from:

Screen Shot 2020-09-15 at 16 48 23

...to:

Screen Shot 2020-09-15 at 16 48 41

_(it always gets me, because it's once a year and I forget...)_

All 4 comments

Yes, you need to recompile all of your dependencies when you move to a new version of the compiler. This is a common issue with clear solutions.

I deleted the Carthage folder and started from scratch (fetch, build, etc.), still getting this error...?

Silly me, I forgot to update the command line tools that Carthage uses to build Alamofire, from:

Screen Shot 2020-09-15 at 16 48 23

...to:

Screen Shot 2020-09-15 at 16 48 41

_(it always gets me, because it's once a year and I forget...)_

I did not find this command line tools option in Xcode 12. How can I find?

@emrdgrmnci

Xcode > Preferences... > Locations:

Screen Shot 2020-09-28 at 16 53 55

It really hasn't changed since Xcode 11 (or quite in a while, for that matter).

Was this page helpful?
0 / 5 - 0 ratings