tristanhimmelman / ObjectMapper

Simple JSON Object mapping written in Swift
MIT License
9.13k stars 1.03k forks source link

[Carthage][4.2.0] Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.3.1 compiler #1115

Closed FarziaAfroze closed 3 years ago

FarziaAfroze commented 3 years ago

I recently updated my Xcode 11.3 (Swift 5.1.3) to Xcode 12.2 (Swift 5.3.1). Since my ObjectMapper framework was outdated, I updated it to version 4.2.0 using Carthage. But even after updating I am getting the following error:


Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.3.1 compiler: .../ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/arm64-apple-ios.swiftmodule```
FabiolaRamirez commented 3 years ago

The same issue.

FarziaAfroze commented 3 years ago

The problem, in my case, was the wrong Xcode Command line tools was selected by default. Although I was using Xcode 12.2, my command line tools was selected 11.3. Once I changed it from 'Command Line Tools' in Xcode/Preferences/Locations, and then updated carthage again, my problem was resolved.