CommentComment

I’ve been meaning to check out the Swift for Visual Studio Code plugin by Adam Fowler and other members of the Swift Server Workgroup since I read this post on the Swift.org blog published a couple of weeks ago. I finally made some time to do it this week.

Adam goes through the extension’s features in his post, and they all sound great! Auto-configuration for Debug and Release builds in SwiftPM projects, a view that shows package dependencies, LSP support, LLDB support, test explorer and multi-project workspaces.

But the post doesn’t do the experience of opening up VS Code, installing an extension with a couple of clicks, and instantly having it understand your Swift project. Syntax highlighting and code completion just work, of course, but then you’ll dive a little deeper and notice quick help popping up as you hover over symbols. You might right-click and wonder if the temptingly titled “Go to Definition” menu option works. Yep, it does. It’ll even navigate into your dependencies. This shouldn’t be surprising. VS Code supports many different languages, but it feels unusual with Swift, which until now has been the domain of Xcode or Swift Playgrounds.

I ran the project’s tests and watched hundreds of ticks turn green in a sidebar. Then, I launched my project, which dropped me into an interactive debugging session with everything I could have wished for from Xcode. Watch variables, a sensible call stack, conditional breakpoints, and access to the LLDB console. It’s impressive.

Incredibly, all of this came without any custom configuration. I just installed the extension and opened my project.

Of course, Xcode also supports all these features! So why should you care? First, it’s interesting to see how initiatives like SourceKitLSP take Swift to new places. But this development environment can also do things that would be significantly more challenging with Xcode. Take a look at the docs for “remote development”. If you’re developing code on Linux, you’ll want to run your code on Linux, too! With remote development, you can add a small config file and switch between running your code locally and executing it inside a Docker container running Linux in a couple of clicks. If you want to try this out, Sven A. Schmidt recently wrote a simple tutorial covering this feature. That’s really fiddly to set up without a tool like this.

None of this is a replacement for Xcode, and it’s not intended to be! However, if you’ve been holding off on trying Swift on Linux until the tooling improved. It has. Drastically. Even if you’ve only a passing interest in Swift on other platforms, the experience is so good I’d recommend checking it out.

Dave Verwer

News

Code




Jobs

MacOS/iOS Developer @ DeepL – DeepL is hiring! Want to join the team behind the internet's most powerful translation engine? We are seeking an experienced MacOS/iOs developer to join our Native Apps team, on a fully remote basis. – Remote (within European timezones)

Senior iOS Software Engineer @ Cambridge Mobile Telematics – Cambridge Mobile Telematics (CMT) is on a mission to make the world’s roads and drivers safer. We measure driving quality, incentivize safer driving, assist users in crashes in real-time, and improve safety for millions of drivers every day around the world. – Remote (within US timezones) or on-site (United States in MA)


There may only be a couple of featured jobs from iOS Dev Jobs above, but there are plenty more over on the site itself. They’re in the apps, too!

And finally...

Ever wanted to see what the Apple Store at the Infinite Loop campus looked like after its redesign in 2015 or how the first ever Apple Store in Stanford looked in 2001? Shop different. 😍


I don’t usually write much in the And Finally… I love the power of saying, “Trust me, click this. It’s worth your time”, but I had such a visceral reaction to this app that I had to say more. I bought my first Mac in San Diego in 2006, but as soon as I loaded up the Stanford store from 2001 in this app, I was transported back in time. I walked straight over to the left-hand side where I bought my Mac, and there were the PowerBook machines. They also had the exact coffee mug that I still drink coffee out of in the Infinite Loop store. I couldn’t help wishing it had the Infinite Loop store before the modernisation, where the shirts and other clothing were in a special section on the left-hand side as you walked in. It wasn’t as pretty as the newer stores, but it had charm.

This project from Michael Steeber has incredible attention to detail. Trust me, click this. It’s worth your time.