1
votes

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.

1
I appreciate the module is 3.1 vice 3.2 but I am curious about the 4.0 error in the playground.Ajaxharg

1 Answers

0
votes

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.