Work with Xcode projects from inside Visual Studio Code.
Feedback is highy appreciated! Let me know if this works for you? Are there any showstopping bugs? Any features missing?
Caveats
- Visual Studio Code (VSCode) is a cross-platform text and source code editor from Microsoft. It’s one of the most exciting open source projects today, with regular updates from hundreds of contributors.
- Introducing Xcode 12. With an all-new design that looks great on macOS Big Sur, Xcode 12 has customizable font sizes for the navigator, streamlined code completion, and new document tabs. Xcode 12 builds Universal apps by default to support Mac with Apple Silicon, often without changing a.
Visual Studio Code is ranked 4th while Xcode is ranked 10th. The most important reason people chose Visual Studio Code is: Visual Studio Code comes fairly complete out of the box, but there are many plug-ins available to extend its functionality.
- First release, my first non-trivial TypeScript/JavaScript program - expect bugs, problems, and non-idiomatic code.
- Only useful for macOS apps at this point.
- Managing the project (adding files, changing settings, etc.) has to be done using Xcode itself.
Features
- Build/Clean/Debug/Run Xcode workspsaces from within vscode.
- Switch between configurations (Debug/Release)
- Debug directly from vscode - easily define debug configuration.
- Status bar items that make it easy to build, debug, switch build and debug configurations.
macOS Example
Visual Studio Xcode Support
The subdirectory examples/helloworld
contains a working example. Open VScode there.
Alternatively, in a new directory:
Create a new Xcode command line project, with the original name
project
.Create a new Xcode workspace named
workspace
in the same directory. Add the project to the workspace.Create a new scheme named
build
inside the workspace and addproject
to the scheme.Create a configuration as a file named
.vscode/xcodebuild-tools.json
:
Use
xcodebuild-tools
command to build, debug, run, clean, switch build configuration, and switch debug configurations.Use the status bar to build, debug, switch configurations or kill the build.
How To Use Visual Studio Code
iOS Example
The subdirectory examples/helloworld-ios
contains a working example. Open VScode there.
Alternatively, in a new directory:
Create an iOS example similar to above, but for iOS.
Install
ios-sim
usingnpm
:
- Use a configuration file similar to the following one:
Visual Studio Code Download
- Use
xcodebuild-tools
commands to build and run the project in the simulator.
Visual Studio Xcode Path
Credits
Visual Studio For Mac: A Bunch Of New Features But Xcode And ...
- Heavily influenced by the great CMake-Tools extension.
- Code derived from the basic extension generated by
yo code
.