tristanhimmelman / ObjectMapper

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

Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler. #1077

Closed sanoj00b closed 4 years ago

sanoj00b commented 4 years ago

I just updated to the non-beta version of Xcode 11.2. I opened a project I was working on and Xcode threw the error Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler. for ObjectMapper. I’m using Carthage as my package manager.

Since Swift 5.1, which has module stability, this shouldn’t be happening. Frameworks compiled with Swift 5.0 should work no problem with newer versions of Swift.

I am getting an error Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler. for ObjectMapper.

Screenshot 2019-11-07 at 12 35 25 PM

ObjectMapper version: 3.5.1 Xcode version: 11.2 (11B52) Swift version: 5 Platform(s) running Alamofire: iOS macOS version running Xcode: 10.14.6 (18G103)

To reproduce: run carthage update --platform iOS on a project with Xcode 11.1 and then open the project in Xcode 11.2.

sanoj00b commented 4 years ago

run the Carthage update command again, its working now.