In daily development, VSCode has become the default editor for many people. Writing front-end, scripts, or even back-end services can almost all be done in the same environment. However, when it comes to iOS development, things become different—Swift can be written, but project building, running, and debugging still rely on a complete toolchain.

Recently, while working on a small feature validation, I attempted to complete the entire process of writing Swift in VSCode, not only writing code but also running it on an iPhone. During this process, I used an iOS development IDE called KuaiXie, which offers an editing experience similar to VSCode while having built-in compilation and debugging capabilities.


Creating a Swift Project in a VSCode-like Environment

After opening KuaiXie IDE, the interface structure is quite similar to common code editors. The left side shows the project directory, and the middle is the editing area.

When creating a project, you can choose different types:

  • Swift
  • Objective-C
  • Flutter

After selecting Swift and entering the project name, the IDE automatically generates the project structure. The directory already includes entry files and basic configurations.

One difference here is that there is no need to manually configure project files. Once the project is created, you can directly open the code files and start writing Swift.

If you are used to writing code in VSCode, the learning curve for this step is relatively low.
New Project


Writing Swift in a VSCode-like Editor

During the code editing phase, the experience is essentially writing Swift in an enhanced VSCode environment.

I created a simple page:

  • A button
  • A text label

Clicking the button updates the text content.

While typing code, the editor provides auto-completion suggestions. For example, when entering UIKit-related classes, it automatically lists available methods. After saving the code, the IDE performs syntax checking.

If you need to use an AI code assistant, you can directly install VSCode plugins, which is consistent with the daily development environment.

For developers accustomed to keyboard shortcuts and plugin systems, this editing experience feels quite natural.


Running Code on an iPhone

After writing the code, the key question becomes: Can it be directly run on a phone?

After connecting the iPhone to the computer, execute the build process.

This process completes:

  • Compiling Swift code
  • Building the application
  • Installing it on the device

Within seconds, the app icon appears on the phone’s desktop. Clicking the icon launches the application.

In the test project, clicking the button successfully updates the text content, indicating that the code has been executed correctly.
Running on Phone


Modifying Code and Quickly Validating

During development, code needs constant adjustments.

I added some processing logic to the button click, then saved the file and clicked run again. The IDE recompiles the application and installs the new version.

Opening the phone app shows the modified effects.

The rhythm of this process is quite clear:

Write code → Run → Modify → Run again

The entire process does not require switching tools or additional export steps.


How Compilation and Running Are Completed

In this workflow, no external development environment is used.

KuaiXie IDE has a built-in compilation tool suite. When clicking run, the IDE calls internal tools to complete Swift code compilation and application building.

This is why iOS development can be done in a VSCode-like environment.

When writing Swift, developers do not need to install Xcode separately or manually configure the compilation environment.


Handling Different Projects in the Same Environment

To verify the IDE’s capabilities, I created a Flutter project.

After writing the Flutter page, connecting the device and clicking run, the IDE can complete the build and install the application.

Subsequently, I tested an Objective-C project, which also compiled and ran normally.

In the same environment, you can handle:

  • Swift projects
  • Objective-C projects
  • Flutter projects

For developers who need to switch between different technology stacks, this approach is quite convenient.


Building Installation Packages

After the application development is complete, installation packages need to be generated.

In KuaiXie IDE, you can generate application installation files through the build function. The IDE executes compilation and outputs the installation package.

Build logs are displayed in the output panel; if issues arise, you can view detailed information here.

The generated installation files can be used for test distribution or submission to the app store.
Building


The focus of this test was to verify whether it is feasible to complete Swift development in a VSCode-like environment.

In KuaiXie IDE, the entire workflow is seamless:

Create project → Write Swift → Connect device and run → Modify code → Recompile → Build installation package

The code-writing experience is similar to VSCode, while also having iOS application compilation and running capabilities.

For developers accustomed to VSCode, this development approach offers a different choice.

Reference link: https://kxapp.com/blog/14