Use VSCode for iOS (Swift) Development on macOS

Because Xcode sometimes sucks…

Rio Weber
riow
2 min readDec 7, 2021

--

NOTE: In order to do this you must be running macOS
- Also this has only been tested on macOS Montery (12.0.1)

./START

  1. Install VS Code:
    https://code.visualstudio.com/
  2. Install Xcode:
    https://apps.apple.com/us/app/xcode/id497799835?mt=12
  3. Install Node:
    https://nodejs.org/en/
  4. (If you’ve never opened Xcode before make sure you open Xcode to accept the Service Agreement)
  5. Open Visual Studio Code
  6. then press Ctrl+Shift+P
  7. Install “code” command in PATH
Shell command ‘code’ successfully installed in PATH.

8. QUIT VS Code

9. Open Terminal

10. Enter command

NOTE: Assuming that you don’t see any output this is normal and means it works as expected. Hit Ctrl+C to end the process.

11. Get and Build the SourceKit-LSP extension

The following instructions taken from:
https://github.com/apple/sourcekit-lsp/tree/main/Editors/vscode)

Success! You should see output shown below…

Extension ‘sourcekit-lsp-development.vsix’ was successfully installed.

12. Reopen VS Code

./DONE

--

--