Turbo SwiftUI

A dream that might be coming true

Apple dropped the SwiftUI WebKit API at WWDC 2025, which might mean my dream of Turbo SwiftUI could come true.

A few years ago, I made the source code for the Legible News iOS app available on Github as the world’s first Turbo SwiftUI app.

The snippet I like the most is the TabView:


struct ContentView: View {
    var body: some View {
        TabView {
            TurboNavigationStack(initialUrl: URL(string: "https://legiblenews.com/")!)
                .tabItem {
                    Image(systemName: "newspaper")
                    Text("Today")
                }
            TurboNavigationStack(initialUrl: URL(string: "https://legiblenews.com/week")!)
                .tabItem {
                    Image(systemName: "calendar")
                    Text("Week")
                }
            TurboNavigationStack(initialUrl: URL(string: "https://legiblenews.com/time-machine")!)
                .tabItem {
                    Image(systemName: "clock")
                    Text("Time Machine")
                }
        }
    }
}

Here’s what it looks like in the app.

wallpaper

Not much to it, but I was hoping I could better tie in Turbo hybrid apps with SwiftUI components to build a more compelling app.

I didn’t take it beyond those basics because I didn’t know what I was doing, didn’t have the time to learn more about SwiftUI, heard there were a lot of problems with SwiftUI wrapping UIKit apps, and had a huge list of other excuses.

Tons of new Swift WebKit APIs in the docs

Fortunately, the SwiftUI WebKit appears to have features that might make it possible to create a Turbo SwiftUI app that works on macOS, iPadOS, and iOS with the same API.

Additionally, SwiftUI WebKit has a ton of APIs that tie into the navigation of the WebKit container, something that’s reminiscent of Turbo’s Visitable protocol.

There’s also a URLScheme and URLSchemeHandler protocol that lets you open external URLs in the default browser depending on whatever you want, such as authenticating via Google OAuth or opening a third-party website.

Watch the video

The WWDC 2025 video on SwiftUI WebKit is a decent overview if you don’t feel like digging into the docs.

What will we build?

I need to keep digging into these docs, but it looks like there are a ton of new APIs that could make the dream of Turbo SwiftUI a reality.

Do you want to learn Phlex 💪 and enjoy these code examples?

Support Beautiful Ruby by pre-ordering the Phlex on Rails video course.

Pre-order the video course for $379 $249