Native WebView in SwiftUI — iOS 26 WebView & WebPage (no WKWebView)

Опубликовано: 23 Июль 2026
на канале: SwiftUI Studio
34
0

iOS 26 brings a native WebView to SwiftUI, driven by an observable WebPage — no WKWebView wrapper, no UIViewRepresentable. You bind a WebPage to the view and read its title, progress, and URL straight from SwiftUI.

To put it to work, we build a transit service-alert reader: a notice card that pushes a full in-app browser with a live navigation title, a loading bar, a trusted-host chip, reload, and share.

What you'll learn:
• WebView(page) bound to a @State WebPage
• Loading local HTML with page.load(html:baseURL:)
• Observing page.title, estimatedProgress, isLoading, and url
• A toolbar with ShareLink, reload, and a lock/host chip

Chapters:
0:00 Intro — Native WebView
0:21 The Notice model
0:38 App shell
0:52 WebView + WebPage
1:14 Load HTML
1:32 Observe page.title
1:48 Observe progress
2:03 Observe isLoading
2:17 Observe url
2:32 In-app browser
2:53 Full project on Patreon

Full Xcode project (iOS 26):   / native-webview-160739561  

#SwiftUI #iOS26 #iOSDev #Xcode