tristanhimmelman / ObjectMapper

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

Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3 compiler #1109

Open gabibibi opened 3 years ago

gabibibi commented 3 years ago

When I want to compile my project on XCode 12.0 version I got this error:

Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3 compiler: /Users/admin/Projekty/viscaios/Carthage/Build/iOS/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/arm64-apple-ios.swiftmodule

ObjectMapper version: 4.2.0

Rashidium commented 3 years ago

Try importing using Swift Package Manager as a workaround

gabibibi commented 3 years ago

unfortunately I have now this errors:

Undefined symbol: ObjectMapper.Map.subscript.getter : (Swift.String) -> ObjectMapper.Map

Undefined symbol: protocol descriptor for ObjectMapper.BaseMappable

Undefined symbol: protocol descriptor for ObjectMapper.Mappable

Undefined symbol: ObjectMapper.<- infix(inout A?, ObjectMapper.Map) -> ()

Laban1 commented 3 years ago

I have the same issue with XCode 11.5: /Users/joe/Desktop/Ybor/CcTransactionResponse.swift:10:8: Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3.1 compiler: /Users/joe/Desktop/Ybor/Carthage/Build/iOS/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/arm64-apple-ios.swiftmodule

This is quite urgent, so any help would be appreciated!

gabibibi commented 3 years ago

I have to remove ObjectMapper from my solution, I couldn't build my solution because of that.

smelloftime commented 3 years ago

I also encountered the same problem. Solve it by the following way: comment out ObjectMapper from pod.file and import it directly into the project. Compilation is successful!