- Add “app” target support
- Add ios framework support
- Build the sourcekit-lsp extension
- Configure the extension
- Enable swift language support
- Experimenting out in the open
- Getting started
- Supported features
- Visual studio code alternatives for ipad | alternativeto
- Visual studio code runs well in safari on ipad with cursor support
Add “app” target support
So far we added iOS support but only for Swift packages. What if you want to work on a typical app target. Trying to open the root folder gives this error:
What if you want to work on an iOS app and not on a Swift Package? SourceKit-LSP always looks for a package.json in root folder assuming that it always deals with a Swift package. An iOS app is not a Swift package and for that reason we need to trick SourceKit-LSP by adding a dummy Package.swift. Add this file to the root of your project (same level as .xcodeproj)
import PackageDescriptionlet packageName = "PROJECT_NAME" // <-- Change this to yourslet package = Package(
// platforms: [.iOS("9.0")],
.library(name: packageName, targets: [packageName])
Don’t forget to set packageName to your own one.
Restart VSCode one last time and voila! Proper UIKit auto-completion
Add ios framework support
What is we achieved so far is to enable Swift development but VSCode has no idea about iOS frameworks. If you try to import UIKit you will get an error.
Insert this JSON in settings.json. You might need to update the x86_64-apple-ios13.6-simulator line based on the current version that you have installed.
This will work for Swift packages that reference iOS frameworks like UIKit.
Build the sourcekit-lsp extension
Now it is time to build the SourceKit-LSP extension. There is an unofficial SourceKit-LSP — Unofficial CI build but this did not work for me. Building it from source is not that hard. Just make sure you have node.js installed and then run:
Configure the extension
You need to let the plugin know the location of the sourcekit-lsp executable. Open settings.json from VSCode using Cmd Shift P and enter “Preferences: Open Settings (JSON)”.
Insert this JSON as the last entry in the existing JSON. Remember to add a comma in the previous line.
Enable swift language support
Make sure you have Xcode and VSCode installed. This is the easiest way to hit the ground running since sourcekit-lsp comes prebundled with Xcode. Open a terminal and run:
$ xcrun sourcekit-lsp
Assuming that you don’t see any output this is normal and means it works as expected. Hit Ctrl C to end the process.
Experimenting out in the open
Our new iOS Web Debugger is a public experiment and this means we are releasing it to the public to find out if integrated script debugging for iOS are valuable for developers, so please let us know what you think.
To get started, open the Extensions view (⇧⌘X (Windows, Linux Ctrl Shift X)).
In this release, we support the following features:
The iOS Web debugger has been deprecated and we now recommend that you use the RemoteDebug iOS WebKit Adapter together with Visual Studio Code. To learn more, see this introductory guide to the RemoteDebug iOS WebKit Adapter.
Visual studio code alternatives for ipad | alternativeto
Visual studio code runs well in safari on ipad with cursor support
A developer successfully tried out Visual Studio Code in Safari with iPadOS 13.4 and its new cursor support. Visual Studio Code was deployed and run remotely from a server, all setup from an iPad. Despite a few minor issues, this experiment showed that the iPad can be a great tool for development now that it has cursor and trackpad support.
George B. the developer who attempted to use VS Code on iPad, shared his experience on Twitter. He tested the whole setup on iOS 13.4 GM, and the mouse support allowed him to use the IDE without many issues.
George shared that although he could use the IDE and its debugger, there were a few issues. However, he found workarounds to these issues as well:
1. Custom fonts installed via iFont don’t work in Safari (fixed by loading them via CSS)
2. Scrolling wheel doesn’t work in editor (arrow keys and scrollbar to the rescue)
3. Lack of escape key (ctrl [ works)
The whole setup was made possible through the use of code-server, which allows developers to deploy Visual Studio Code on a server and use it remotely. It is an amazing tool to code remotely from anywhere, while utilizing the power of your server and preserving battery life on your device. Code-server can be set up on Linux and macOS, while Windows support is not available yet.
If you are interested in replicating this setup, you can check out the instruction on Github for code-server. The server requirements are as following:
A server with these requirements can be acquired for as low as $3/month.
Before you think that the setup would require a “real computer” which means you would have to use a Windows PC or Mac to set up the server, here is another interesting tidbit. George set up Visual Studio Code using apps like Termius (for SSH) and WorkingCopyApp. Even GitHub’s official app is available on iPad now, which should make things even easier.
Despite such experimentations, Apple still needs to show seriousness and allow developers to create fully-functional and native development environments for iPad, which take full advantage of the performance that A-series chips have to offer. The iPad is already a popular tool for writers, artists and content creators. Maybe iPadOS 14 might be the update where Apple makes it happen.