1

I have a SDK named 'MapmyIndiaAPIKit' in my project, after updating to Xcode 10.0, I am getting a error:

"Module compiled with Swift 4.1.2 cannot be imported by the Swift 4.2 compiler"

enter image description here

enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
hussain
  • 769
  • 2
  • 7
  • 24
  • Possible duplicate of [Module compiled with Swift 4.0 cannot be imported in Swift 3.2.1](https://stackoverflow.com/questions/46659988/module-compiled-with-swift-4-0-cannot-be-imported-in-swift-3-2-1) – Cœur Oct 22 '18 at 03:59
  • Possible duplicate of [Module compiled with Swift 4.1.2 cannot be imported in Swift 4.1.50: Xcode 10 Error](https://stackoverflow.com/questions/50709377/module-compiled-with-swift-4-1-2-cannot-be-imported-in-swift-4-1-50-xcode-10-er) – Cœur Oct 22 '18 at 04:02
  • Possible duplicate of [Module compiled with Swift 4.1.2 cannot be imported by the Swift 4.2 compiler](https://stackoverflow.com/questions/52413437/module-compiled-with-swift-4-1-2-cannot-be-imported-by-the-swift-4-2-compiler) – Cœur Oct 22 '18 at 04:03

1 Answers1

-1

You need to compile the module in Swift 4.2.

In the Xcode project navigator, select the project. Then in the main view select the target for MapmyIndiaAPIKit and go to the build settings tab.

In the build settings, do a search for "Swift Language Version" and it should bull up the setting you need to change to 4.2.

A picture is worth a thousand words so...

Setting the Swift Version

If the API was supplied by a third party in compiled form, you'll need to get them to give you a copy for Swift 4.2. You can't link frameworks and apps that were compiled with different versions of Swift because the ABI is not yet stable.

JeremyP
  • 84,577
  • 15
  • 123
  • 161