1

I have a project I am trying out which is fine in Xcode 8. However, in Xcode 9 the RxSwift framework won't import into the playground. I get the following error

Module compiled with Swift 3.1 cannot be imported in Swift 4.0: /Volumes/HGST3tb/CloudStation/Development/Frameworks/GuideView/GuideView/Carthage/Build/tvOS/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule

All frameworks apart from RxSwift are swift 3.2 but the error seems to imply that the playgrounds are compiled with 4.0. I can't see any settings to be able to change this.

christopher.online
  • 2,614
  • 3
  • 28
  • 52
Ajaxharg
  • 2,974
  • 2
  • 18
  • 19

1 Answers1

0

From how I interpret Apple's documentation, it should be possible. I believe that Xcode 9 compiles in Swift 4.0 regardless though and just supports the backwards compatibility.

One compiler for Swift 4 and Swift 3, Swift 4 and Swift 3 targets can be compiled together in the same project.

Referencing this similar question you should try Shift+Command+K to clean your project. Unfortunately, I've been having cross-compatibility issues on things that should work too, though.

Bryan
  • 43
  • 1
  • 5