Enterprise

Apple just announced a new tool that makes it way easier to write software in Swift, it's mega-popular programming language. Here's why developers are so excited about it.

WWDC 2019 Tim Cook
Apple CEO Tim Cook Justin Sullivan/Getty Images
Read in app

For many programmers, the most exciting announcement from Apple's annual WWDC developer conference wasn't its new Apple Watch features or its $1,000 monitor stand. Instead, it was a tool they could use for building iPhone apps.

This new tool that Apple announced at WWDC is called SwiftUI. It builds on Swift, Apple's popular programming language that has been used to build some 450,000 apps, by the company's own arithmetic, and plugs into Xcode, the software used to build iOS and iPad apps. 

SwiftUI includes special features that allow developers to quickly and easily build user interfaces, or what the app looks like and how users interact with it, using Swift. It even supports Apple's new Dark Mode, which darkens the whole interface to make it more visible in low-light settings. 

In some ways, this is Apple's answer to popular tools like React Native, which was originally created by Facebook, or Flutter, which is from Google. Both have found lots of success in Silicon Valley and beyond for helping developers create user interfaces. 

Still, developers all over the world are very excited to see what Apple has in store with SwiftUI. Indeed, of all the announcements at the WWDC keynote on Monday, it was SwiftUI that got the loudest applause. 

"The first thought is that it's like magic," Martin Lasek, an independent developer, told Business Insider. "They were literally showing how much less code you were writing...This is really promising. I want to start digging into it."

SwiftUI's special features

What's special about SwiftUI is that it uses declarative syntax, which means that developers can just state what they want the app to do, rather than having to type an entire set of instructions. For example, developers can just type what fonts, colors, and even animation effects they want to use for their app, without having to go into the nitty-gritty of describing each aspect in detail. This means that Swift code written with SwiftUI is much simpler and more concise.

"The level of detail and polish they wrote into their applications is something that doesn't exist in any competing framework," Orta Therox, an engineer on TypeScript at Microsoft, told Business Insider. "SwiftUI represents a different kind of programming mentality. SwiftUI is definitely the most polished developer experience for all of them so far."

In addition, with SwiftUI, as programmers work on their app, they can see the changes they make in real-time. It also works in reverse — developers can drag and drop features like buttons, fonts, and colors into new places, and the code will move itself around to match. 

Before, developers would have to wait for the code to build before they can see the changes in preview.

"This is the moment every developer is waiting for," Hemanth Alluri, an iOS engineer at Infosys, told Business Insider. "Even though Apple provides the best tools and powerful languages for their developers, it lags in auto generation output without building every time and writing a lot of code modules...These are all complexities that can be eliminated using the SwiftUI framework."

How developers plan to use it

Ignacio Segovia, chief enterprise architect at Altimetrik, predicts that SwiftUI will expand adoption of Swift. Currently, iOS apps are typically written in either Swift or an older language called Objective-C. However, he says, SwiftUI will be easier for both entry level and veteran programmers to use.

Read more: Here's why companies like Google, Square, and Atlassian are sprinting to use Kotlin, the fastest-growing programming language according to GitHub

Segovia already plans to "aggressively" adopt SwiftUI.

"Building apps used to be an undertaking of several months," Segovia told Business Insider.  "With SwiftUI, I think this will lower the bar even further and make coding more universally available to people. As a developer, I'm just excited to use it. It will make Apple platforms more fun to use."

Shannon Potter, senior iOS engineer at WeTransfer, says that even though he does not think he will use SwiftUI in his day-to-day job, he plans to play around with it to see if there's anything new he can build. Before SwiftUI, he said that it was sometimes easy to lose track of where things were happening in the code, while this framework makes it easier to track.

"It's encouraging that Apple is forward thinking and making a framework that mirrors more sustainable ways for engineers to build their user interfaces," Potter told Business Insider. "I was impressed that they're trying to build something new from the ground up that represents trending technologies that some engineers are starting to use in their projects, especially on web."

Even non-iOS engineers were impressed. Sam Debruyn, technical lead at 3factr, typically uses Microsoft's Xamarin to build mobile apps, but says that his interest was piqued. 

"The main thing when you develop an app is the time when you write code and when you see it on the screen," Debruyn told Business Insider. "With Xamarin, it takes about a minute to see what you've written. New frameworks like SwiftUI try to tackle that issue...It's shortening the time between when you code an app and when you see what it's doing.

Got a tip? Contact this reporter via email at rmchan@jkmperu.com, Telegram at @rosaliechan, or Twitter DM at @rosaliechan17. (PR pitches by email only, please.) Other types of secure messaging available upon request. You can also contact Business Insider securely via SecureDrop.

Read next

Rosalie Chan headshot
Rosalie Chan
Rosalie Chan is a senior editor for Business Insider's tech team. Previously, she covered cloud computing and enterprise tech, reporting on companies like Google Cloud, Amazon Web Services, Microsoft, Intel, Alibaba Cloud, Atlassian, GitHub, VMware, Broadcom, and more. She has written extensively on topics including cloud computing, developer companies, open source, and sexism and sexual harassment in the tech industry. She has received the San Francisco Press Club award for continuing coverage for her reporting on sexism and sexual harassment in Silicon Slopes and the Excellence in Business / Consumer / Tech Reporting award from the Asian American Journalists Association for her investigation into the coding boot camp Holberton School. Most recently, she was an editor on the Business Insider investigative package, The True Cost of Data Centers, which received a George Polk Award and an honorable mention from SABEW.Rosalie joined Business Insider after working as a software engineer and freelance journalist. She studied journalism, computer science, and technology and business law at Northwestern University. Her work has previously appeared in TIME, the Huffington Post, VICE, Pacific Standard, Inverse, Chicago magazine, the Chicago Reporter, and more. She's based in San Francisco.