TL;DR⚓︎
VS Code + Docker. Especially useful on Windows, but can be handy on MacOS too. For a step-by-step guide, see VS Code-Docker for editing Swift on Win10 .
Here is Tianle Yuan’s own summary from Slack.
-
Install the extensions of the swift, docker, and dev containers in vs code.
-
run docker
-
run vs code and click the docker logo on the left sidebar.
-
run the image in vscode terminal and open the swift image in the container as u did in the docker desktop
For testing ur swift code:
-
ctrl
+shift
+p
-
in command window at the top, enter: docker containers: attach shell
-
swift test in your terminal
For example:
Moreover, you can even get the following instead, which looks more like what you get in Xcode:
See VS Code - Docker for a nice Swift edition on Windows10 for more details.