Agent skills for iOS, iPadOS, Swift, SwiftUI, and modern Apple framework development.
71
89%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
WKWebView wrappersSFSafariViewController is still the right choiceASWebAuthenticationSession is requiredWKWebView remains justifiedFor SwiftUI apps targeting iOS 26+, the default should be native SwiftUI WebKit
APIs (WebView, WebPage) instead of a custom UIViewRepresentable wrapper
around WKWebView.
The goal is not "delete every WKWebView immediately." The goal is to move
routine embedded web content to the new native surface and keep legacy fallback
paths only where they are still justified.
| Use case | Best default |
|---|---|
| Embedded app-owned web content in a SwiftUI screen | WebView + WebPage |
| OAuth or third-party sign-in | ASWebAuthenticationSession |
| External public site with Safari behavior | SFSafariViewController |
| Back-deploying below iOS 26 or missing required capability | WKWebView fallback |
WKWebView wrappersFor SwiftUI apps targeting iOS 26+, start from WebView and WebPage instead
of a UIViewRepresentable wrapper around WKWebView.
Typical mapping:
| Older pattern | Modern default |
|---|---|
UIViewRepresentable wrapper for WKWebView | WebView(url:) or WebView(page) |
WKNavigationDelegate policy handling | WebPage.NavigationDeciding |
KVO for title, url, or loading state | observable WebPage properties |
evaluateJavaScript | callJavaScript |
custom WKWebViewConfiguration usage | WebPage.Configuration |
Migrate first when the app is already SwiftUI-native and only kept WKWebView
because there was no native view before.
A clean migration is usually screen-by-screen, not all-at-once.
If the current wrapper mixes:
split those concerns first. Once page logic is no longer trapped inside the
wrapper, moving to WebPage gets much easier.
Best first migrations:
Leave these for later:
Use availability and architecture boundaries instead of mixing two approaches in one view body.
struct HelpCenterScreen: View {
let page = WebPage()
var body: some View {
WebView(page)
.task {
try? await page.load(URLRequest(url: helpCenterURL))
}
}
}If a fallback is still needed, isolate it in a separate type rather than
sprinkling if #available checks through the screen's core logic.
SFSafariViewController is still the right choiceUse SFSafariViewController when the app just needs to show an external site
with Safari behavior and does not need page-level control.
Good fits:
Do not use SFSafariViewController when the app needs to:
ASWebAuthenticationSession is requiredUse ASWebAuthenticationSession for OAuth and third-party sign-in.
This remains true even if the rest of the app uses WebView for embedded
content.
Do not replace auth sessions with embedded web views. The authentication skill owns that flow because the product requirement is secure sign-in, not generic web content.
WKWebView remains justifiedA fallback WKWebView path can still make sense when:
When you keep WKWebView, treat it as a deliberate fallback, not the default
architecture for a modern iOS 26+ SwiftUI feature.
For each migrated screen, verify:
ASWebAuthenticationSession to an
embedded viewWKWebView screens stay isolated instead of spreading wrapper logic
back into new screensWebView and WebPageSFSafariViewController used only for browse-out Safari-style flowsASWebAuthenticationSession retained for OAuth and sign-inWKWebView kept only where back-deployment or capability gaps justify itUIViewRepresentable wrapper by defaultskills
accessorysetupkit
references
activitykit
references
adattributionkit
references
alarmkit
references
app-clips
app-intents
references
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
references
audioaccessorykit
references
authentication
references
avkit
references
background-processing
references
browserenginekit
references
callkit
references
carplay
references
cloudkit
references
contacts-framework
references
core-bluetooth
references
core-data
core-motion
references
core-nfc
references
coreml
references
cryptokit
references
cryptotokenkit
references
debugging-instruments
device-integrity
references
dockkit
references
energykit
references
eventkit
references
financekit
references
focus-engine
gamekit
references
healthkit
references
homekit
references
ios-accessibility
ios-localization
ios-networking
ios-simulator
references
mapkit
metrickit
references
musickit
references
natural-language
references
paperkit
references
passkit
references
pdfkit
references
pencilkit
references
permissionkit
references
photokit
push-notifications
realitykit
references
relevancekit
references
scenekit
references
sensorkit
references
speech-recognition
spritekit
references
storekit
swift-api-design-guidelines
swift-architecture
swift-charts
references
swift-codable
swift-concurrency
swift-formatstyle
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-uikit-interop
swiftui-webkit
tabletopkit
references
tipkit
references
vision-framework
weatherkit
references
widgetkit
references