SwiftUI Is Apple’s Flutter

Dave Glassco
The Startup
Published in
5 min readSep 29, 2020

Swift In the News.

It has been a big year for Swift and SwiftUI starting with Apple’s announcements at WWDC, and culminating in the release this week of Swift 5.3. Among the many interesting new features Swift.org announced that Swift is ”notably adding support for Windows and additional Linux distributions”.

Working at a company that is building apps for Apple’s platforms, Android, and Windows my interest was obviously piqued. What does Windows support really mean? And why no names on the Linux distros list?

Before I tell you what I think the answers to those questions are let’s take a brief look back at the history of any coder’s holy grail, Write Once, Run Anywhere.

To Dream the Impossible Dream

The first time I recall hearing the siren’s call of Write Once, Run Anywhere (WORA) was from the Java community in the 90s. It was a seductive pitch and still is. And Java was not the only one to make this promise. Flash and Flash AIR did, along with Mozilla’s XUL Runner and others. But the reality of these solutions always fell short of the promises.

Adding a development layer over a 3rd party OS adds an enormous amount of complexity, both from a technical standpoint and from a UI perspective. Users of supported platforms would end up with a slower app than normal, with an unfamiliar UI that didn’t adhere to the standards of the platform. It was now Write Once, Bug Hunt Everywhere to devs who were moving more and more to HTML5 to solve the cross platform problem.

But as always these ideas never really go away. Facebook pioneered a more web dev like approach to native apps with React Native, and Microsoft has dabbled in this area with Xamarin.

But the project getting the most attention these days is Flutter. This article from last year gives a good introduction to Flutter, and even makes the promise!

Flutter everywhere is the promise

Flutter is a framework allowing you to build cross-platform apps. It started off as a toolkit allowing you to build consistent apps for both IOS and Android. Now … Google released a technical preview for flutter web, allowing you to run the same application natively on Mobile, Web, Desktop and even embedded devices. Using Google’s UI that has been ported to all the listed platforms, you can write the code once and run it everywhere!

It is obvious why Google would want its own cross platform app framework, they are a services company. But isn’t that what Apple is supposed to be turning into?

Swift Has Left Building

Apple has always been known as a walled garden platform, and for good reason. Whether that is a good thing or not is a separate debate. However Apple does has apps for other platforms, and have been expanding in that regards. The benefits of supporting other platforms became apparent when Apple release iTunes for Windows. Sales of the iPod skyrocketed and set the stage for the iPhone. What also became apparent was that Apple was not nearly as good making easy to use software on other platforms.

In the following years they haven’t gotten much better honestly. That seems to be changing with their recent pivot on AppleTV. As of today the best I could determine is that Apple is currently offering Apple Music, AppleTV, and iCloud as native apps on 3rd party platforms. While they have expanded their web based versions of some of their apps I don’t believe Apple thinks that is the future.

If Apple is truly to become a services company won’t they need those services on as many platforms as possible? In addition here are 5 other Apple apps or services that would also benefit from being available on other platforms.

  • Messages
  • Books
  • Maps
  • News
  • Home

So it is clear that Apple needs to have more of their apps on other platforms just like Google and Microsoft. But what would be the best approach for Apple? Hire programmers familiar with each platform? Or create your solution for those platforms?

Swift Everywhere

From the beginning Apple said it wanted the Swift language to be everywhere. Most devs did not believe them, but Apple’s actions since seem committed to that path. And while SwiftUI and Swift are not the same thing, I believe we are seeing the foundations laid for the Swift/SwiftUI combination to become a true cross platform solution.

Let’s go back to that note about additional supported OSs in Swift 5.3, Windows and additional Linux distributions. What struck me as odd was why not name some Linux distros? If Swift were coming to known distros like Fedora or Mint wouldn’t they be listed? Then it clicked. Almost all modern smartTVs run a Linux variant. And what did Apple just do? Release the AppleTV app on LG, Samsung and other smart TVs.

While I have no knowledge of how Apple coded those apps for the TV platforms my guess is that it was internal implementation of Swift and SwiftUI running on top of Linux (side note what is Android based on? Linux). In addition the first step towards bringing that combo of Swift and SwiftUI to Windows is the release of Swift on Windows in 5.3.

So it might not be long until Apple can develop apps with one codebase that can be deployed to not only their own platforms but Windows, Android, smart TVs and more. The obvious question is will they release this tech to outside devs? I believe the answer is yes.

Why? Because Apple has seen Electron apps and what that means to native experiences. If there is going to be a cross platform framework that finally solves the WORA formula you can bet Apple wants to be behind it. That way Apple has far more influence on the technologies that are adapted. Keeping a truly cross platform dev tool to themselves would only encourage developers to switch to Flutter or something similar.

Given the explosion of consumer devices and the move towards subscriptions Apple and other tech giants must deliver their services to competing platforms. It seems to me the only way to do that and not be at the mercy of your competitors is to have your only solution. In Apple’s case that will be Swift and SwiftUI.

SwiftUI Banner Image courtesy of Jeroen

--

--

Dave Glassco
The Startup

CEO of Neone, President of the Participatory Culture Foundation, and Board Member of Progress Texas.