I have a project written in Swift 3.2.2 and compiled using XCode 9.1
I have a dependency which is built using Carthage using this command:
carthage update --platform iOS
The issue is that Carthage builds the dependency using Swift 4.0 (instead of Swift 3.2.2)
Module compiled with Swift 4.0 cannot be imported in Swift 3.2.2
How do I tell Carthage to build my dependency using Swift 3.2.2 so that it can be used in my project?
I don't want to upgrade my project to Swift 4.0 quite yet.
Xcode 9.1 has support for both Swift 3 and Swift 4. So how do I tell Carthage to use Swift 3 when compiling the dependency? I don't want to tell it to use an earlier version of XCode (which I don't have anymore)
You say:
with those conditions will be impossible for you resolving the issue: you can't mix Swift 3 and 4 due to this: https://github.com/Carthage/Carthage/issues/1978
The only thing you can do, for (eventually) fixing the situation is:
Scenario 1
on your Cartfile you specify that specific version, eg:
github "yourDependency" == x.y.z
Scenario 2
carthage update --platform iOS
Carthage/Checkouts/yourDependency
) and open the .xcodeproj in order to modify manually this option:if you have solved the dependencies, then launch:
carthage build --platform iOS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With