VXCode
VXCode is a VS Code extension for building and running iOS Simulator apps with Xcode on macOS.
Requirements
- macOS with Xcode installed and configured.
- VS Code 1.85 or newer.
- An iOS project with a shared application scheme.
Install
npm install
npm run package
Install the generated vxcode-*.vsix file from Extensions → … → Install from VSIX….
Or build and install in one step (requires the code command in your PATH):
npm run install:local
Then run Developer: Reload Window (or Developer: Restart Extension Host) from the Command Palette. VS Code does not
prompt for a reload when the reinstalled version number is unchanged, so open windows keep running the old copy until
reloaded.
Use
- Open an iOS project folder in VS Code.
- Open the VXCode view from the Activity Bar.
- Select a project, scheme, and simulator.
- Choose Build & Run, Build only, or Run tests.
Clean build folder runs xcodebuild clean for the selected scheme and simulator. Archive for device builds a
generic/platform=iOS archive with the scheme's Archive configuration and saves it under
~/Library/Developer/Xcode/Archives, where Xcode's Organizer lists it for distribution. Archiving needs working code
signing for the scheme.
The same actions are available from the Command Palette with the VXCode: prefix.
Development
npm test
npm run check
Press F5 (Run VXCode) to compile in watch mode and open an Extension Development Host. After saving changes,
press Cmd+R in that window to reload it.
Set VXCode.developerDirectory in VS Code settings if multiple Xcode installations are present.
VXCode is independent of Apple and Microsoft and is MIT licensed.