📦VSCode Marketplace | 🐞 Github Issues
You can support this project by giving a star on GitHub ⭐️
Develop/Build/Debug/Test your xCode projects in VS Code with your favorite extensions.
Before use it make sure you've installed all dependencies required for this extension.
Instead of xCode preview you can use hot reloading InjectionIII which works great with this extension:
Before an extension is activated, there's a automatic check if those dependencies are installed and if not, it's ask a user to install them automatically. Use the following guide to install them manually if any it doesn't work for you:
Required Dependencies:
Xcode and simulators. Make sure that your Xcode is installed in /Application/Xcode/
folder
homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
xcbeautify tool to prettify the building log output and :
brew install xcbeautify
xcodeproj gem library to make possible to add/delete/rename files in your Xcode project directly from vs code.
brew install ruby
gem install xcodeproj
Note: As sourcekit-lsp updates indexes while building, If you want to have indexes updating even if you have compile errors, you need to give a full disk control to Visual Studio Code in Security Settings which allows to install a proxy service for Apple XCBBuildService automatically when an extension is activated. This's just needed to override the continueBuildingAfterError property when you build the app and gives you all errors in the project and compile flags possible used by sourcekit for indexing.
Once you installed all the dependencies, you can open a folder which contains the iOS project, it project or workspace is located in the local folder then an extension will ask you if you want to configure it otherwise you need to perform command "Xcode: Select Project/Workspace" and pick the right project/workspace to work with. You can also switch between multiple projects if they are located in the same folder/subfolders
There's ios launch configuration that can be added to launch.json file to run and debug ios project (there's also "Xcode: Run App & Debug" snippet)
"configurations": [
{
"type": "xcode-lldb",
"name": "Xcode: Run App & Debug",
"request": "launch",
"target": "app",
"isDebuggable": true,
"buildBeforeLaunch": "always"
}
]
Also there're automatically added build tasks which can be used by pressing standard "Cmd+Shift+B" shortcut.
To make autocompletion to work you may need to clean the project and build it entirely for the first time.
This extension contributes the following settings:
vscode-ios.watcher.singleModule
: Enable/disable the autocomplete watch build to update indexes whenever a you modified a file.vscode-ios.xcb.build.service
: if Enabled, it will ask a user sudo password to replace XCBBuildService with a proxy service which would enhance the Autocomplete feature. This's used to continue compile a project even if there's multiple errors, so all flags are updatedIf Generating of project is not working as expected or generates some kind of errors if Xcode opens the same project file, you simply need to update xcodeproj lib and ruby library to the latest
gem install xcodeproj
It's still under development, so you can face some bugs