Figment.so
Mac hostingWebsite hostingGuidesHow to usePricing

Connect VS Code Tunnel to a Remote Mac for Swift

VS Code Remote Tunnels let you edit a project in the browser or in a local VS Code window while every compiler, language server and simulator runs on a Mac you rent. For Swift and iOS work that remote machine must be a Mac: the iOS SDK, Simulator and Apple signing tools are macOS-only. Rent a Mac, register a tunnel, and a Chromebook, Windows laptop or iPad becomes a working Swift IDE.

Our direct recommendation: if you only build Swift packages or AppKit targets that still support Intel toolchains, start with the Figment virtual Intel macOS environment at $29/mo and run the tunnel from its browser-console desktop terminal. If you need iOS, visionOS, Xcode 27 or an Apple-silicon toolchain, request a Figment M-series Mac from $95/mo and confirm chip, RAM, disk and remote-access method in the quote. Start at figment.io/mac-hosting/start.

Why Swift and iOS Development Needs a Real Mac

SourceKit-LSP ships with the Swift toolchain on macOS, Linux and Windows, so pure Swift Package Manager projects without Apple-platform targets can be edited anywhere. The moment an iOS, watchOS, tvOS or visionOS target enters the project, that breaks down:

  • The Xcode SDKs for iOS/watchOS/tvOS/visionOS ship only for macOS.
  • The iOS Simulator is a macOS process; it does not run on Linux or Windows.
  • xcodebuild, codesign and notarytool link against macOS frameworks.
  • Per Apple's porting guide, if you need to run Xcode on an Intel processor use Xcode 26 or earlier; Xcode 27 requires Apple silicon. visionOS targets need Apple silicon regardless.

The tunnel solves the UI side so you can edit from anywhere; the remote Mac does everything only macOS can do.

Install the VS Code CLI and Register a Named Tunnel

On the remote Mac, open a terminal. On a Figment Intel VM that terminal is inside the browser-console desktop session; on a physical M-series Mac it is whichever shell access was configured in your quote. Install VS Code.app and use its bundled code binary, or download the standalone CLI from the VS Code downloads page.

Register a named tunnel. The CLI will ask you to authenticate once with a GitHub or Microsoft account (both are supported per the tunnels docs):

code tunnel --name figment-mac --accept-server-license-terms

The CLI prints a device-auth URL. Approve the login, and the terminal confirms the tunnel is active with a URL of the form https://vscode.dev/tunnel/<machine_name>/<folder_name>.

Connect from Windows, Linux or a Chromebook

Open https://vscode.dev/tunnel/figment-mac in any modern browser, sign in with the same account, and the full workspace loads: file explorer, integrated terminal, extensions. No local install is required.

To use a local VS Code window instead:

  1. Install the Remote - Tunnels extension.
  2. Open the Command Palette and run Remote Tunnels: Connect to Tunnel.
  3. Sign in with the same account and select figment-mac.

Both paths give you a terminal running on the Mac, so xcodebuild, swift test and xcrun simctl work exactly as they would locally.

Turn On SourceKit-LSP in the Tunnel Session

Install the Swift community extension (swiftlang.swift-vscode) inside the connected session. It manages SourceKit-LSP on the remote Mac and delivers completions, diagnostics and go-to-definition. Confirm the server is reachable:

swift --version
xcrun sourcekit-lsp --version
ps aux | grep -v grep | grep sourcekit-lsp

If nothing is running after you open a .swift file, make sure Xcode (or the standalone Swift toolchain) is installed and selected with xcode-select -p. For exact toolchain pairings, check the extension's README and Apple's Xcode release notes rather than guessing a version.

Run xcodebuild from the Tunnel Terminal

The integrated terminal runs on the Mac, so build commands need nothing extra. Replace the scheme and destination with values from xcodebuild -list in your own project; do not copy a scheme name you have not verified:

set -euo pipefail
SCHEME="$(xcodebuild -list -json | python3 -c 'import json,sys;print(json.load(sys.stdin)["project"]["schemes"][0])')"
xcodebuild \
  -scheme "$SCHEME" \
  -destination "platform=iOS Simulator,name=iPhone 16" \
  -configuration Debug \
  build

set -euo pipefail ensures a failed build stops the script; piping into grep would mask the exit code and let a broken build look successful. Time the command only after it finishes green.

Keep the Tunnel Alive Across Reboots

Prefer the built-in service installer. It writes and loads the launchd agent for you and the command set is stable:

code tunnel service install --name figment-mac --accept-server-license-terms
code tunnel service log
code tunnel service uninstall

Authenticate interactively with code tunnel once before installing the service so the stored credential is in place; the service cannot complete the device-code flow on your behalf. If the Mac is rebooted or the process crashes, launchd restarts it.

A Quick Price Worksheet

Entry price for an M-series Mac varies by vendor and term. Figures below are retail list prices from each vendor's current pricing page; the exact Figment M-series chip, RAM and disk are confirmed in your quote, so treat $95 as an entry price, not an equivalent spec.

OptionTermPublished priceEffective $/mo
Figment virtual Intel macOS (2 vCPU, 8 GiB, 80 GiB)monthly$29$29.00
Figment M-series (entry; spec quoted)monthly$95$95.00
CloudMac M4/16 GB/256 GBmonthly$99.99$99.99
CloudMac M4/16 GB/256 GB annualannual$999/yr$83.25
MacStadium M4.S 16 GB/256 GBmonthly$149$149.00

CloudMac's annual bundle is lower than 12 × Figment's $95 entry, but availability on its larger disk tiers is marked as fully reserved; confirm the exact tier when you order. MacStadium publishes a 99.99% uptime commitment and includes support on its listed plans. Figment's distinct managed plans add configured CI and ongoing support hours: Managed Build Mac $249/mo (one M-series Mac, CI setup, backups, monitoring, 30 minutes of monthly support) and Managed Mac Team $999/mo (two M-series Macs, two CI runners, team setup, backups, monitoring, one hour of monthly support).

Where to Start

For Swift Package work on Intel-compatible Xcode, the $29 virtual Intel macOS environment is the cheapest working tunnel host. For iOS, visionOS or Xcode 27, request an M-series Mac and specify chip, RAM, disk, and whether your workflow needs inbound SSH or only the browser console.

Request your Mac at figment.io/mac-hosting or begin a configuration at figment.io/mac-hosting/start.


Related guides:


Subscribe for Figma design and website publishing guides.


Figment.so

Contact

Twitter

Website pricing

Compute index

About

Privacy

Terms