I’d like to post my first question here. As usual with me, the answer might be something deceiptively simple.
I’m migrating Cork to Swift 6. However, I can’t get Tuist to generate the project with the right Swift version for my targets.
The Swift version for the project itself is 6, but all my targets still have Swift 5.
I have tried setting SWIFT_VERSION=6.0 in my Project.xcconfig, as well and the xcconfig for my target. Moreover, I have set the Swift version in my Config like so:
@buresdv that property is not used (we need to remove it). The version of Swift is a build setting in your project, so you can edit it with tuist edit and set it there:
If it works by setting it in the configuration’s settings, shouldn’t it also work when it is set by Project.xcconfig? or was the issue that it was only set in one of the Project.xcconfig files when it was necessary to also set it in the other files in this folder?
I thought this is what you wanted. Here are the various places where you can set it and when you might want to set it in those places:
Target settings: When you want it to be applied only to a particular target.
Project settings: When you want it to be applied to all the targets of a project. Note that this can be overriden by the target.
Scheme variable: You can also pass an environment variable from a scheme, which is then read from a project or target setting. This is in case you want the value to be dynamic and change based on the selected scheme. For example, you might want to have a scheme “App Swift 6” that you can use while migrating your app.