Compatibility#
What the browser build of an app supports today, area by area. Foundation, the other frameworks and Swift packages are covered in more depth in the CLI reference.
| Area | Supported | Not yet |
|---|---|---|
| Views | Text (and Text(AttributedString): Markdown's emphasis, code, strikethrough and links, and the SwiftUI attributes font (a run's own size, weight and design), foregroundColor, backgroundColor, underlineStyle, strikethroughStyle, kern, tracking and baselineOffset), Image(systemName:), Image("asset") (PNG, JPEG, SVG and PDF image sets, from the app's and its packages' catalogs, and Xcode's generated ImageResource / ColorResource members), VStack, HStack, ZStack, Spacer, Divider, ScrollView, List (incl. selection:; a NavigationLink row with a tag or value selects in edit mode), Section (incl. isExpanded:, collapsing in a sidebar-style list as on iOS), DisclosureGroup (in a List, an outline: its content as rows under its label, a level further in each), Form, ForEach, Button, TextField, SecureField, Toggle, Picker (segmented, menu, inline), Menu (a Menu among its items is a submenu, opened as a panel over the menu as on iOS), TabView, GeometryReader (and onGeometryChange), Label (+ LabelStyle), Gauge (linear and circular styles), ProgressView, Grid/GridRow, LazyVGrid/LazyHGrid (pinnedViews: section headers and footers held at the scroll view's edge while their section passes), TimelineView, PhaseAnimator, ViewThatFits, custom Layout (with layoutValue), Chart (Charts module: bar, line, area, point, rule and rectangle marks, axes, legends), AsyncImage, Image(uiImage:) and Image(_:scale:label:) (a CGImage), Color, shapes (with fill/stroke/strokeBorder), custom Shapes drawn from path(in:) (with InsettableShape and animatableData), gradients, Group, AnyView, EmptyView, Slider, Stepper, DatePicker, TextEditor (plain, and over an AttributedString with each run's weight, slant, lines and colors; both with a bound selection:, which the editor reports and the app moves), EditButton, ContentUnavailableView, ShareLink (Web Share API, else a download; a file item shares the file), draggable / dropDestination and onDrag / onDrop (drag and drop within the app, and text, links and files dropped in from outside the page), Table (drawn as a list: the first column in a compact width, all columns under sortable titles in a regular one), Canvas (its GraphicsContext recorded and drawn as SVG: a text in its own font, weight and color; resolved texts, images and symbols with their sizes, which the page measures and the renderer gets on its next drawing; symbols resolved by tag), LazyVStack / LazyHStack (rows built as they near the screen; pinnedViews, as for the grids) |
|
| Navigation and presentation | NavigationStack (destination- and path-based, nested stacks flatten), NavigationSplitView (two columns from the regular size class), NavigationPath, NavigationLink (destination and value), navigationDestination(for:), navigationTitle, navigationBarTitleDisplayMode, toolbar/ToolbarItem/ToolbarItemGroup (iOS 26: bar items on Liquid Glass, a bottom bar's items floating in glass capsules split by ToolbarSpacer, .secondaryAction items in the bar's More menu, .largeTitle items in the large title row), toolbar(_:for:) / toolbarVisibility for the navigation bar and the bottom bar (and navigationBarHidden), navigationBarBackButtonHidden, statusBarHidden, searchable, dismiss, sheet(isPresented:), sheet(item:), presentationDetents, fullScreenCover, alert (with TextFields among its actions), confirmationDialog, swipe-back, popover (a sheet, as on an iPhone), inspector (a NavigationStack in it is its own, with its bar in the column, as in a sheet), iOS 26's scroll edge effects (lists and scroll views run under the navigation bar, the tab bar and a bottom toolbar or search field, which blur and fade the content under them; scrollEdgeEffectStyle, scrollEdgeEffectHidden) |
|
| State and concurrency | @State, @Binding, @Observable, @Bindable, @StateObject, @ObservedObject, @EnvironmentObject, ObservableObject, @Environment (including colorScheme, dynamicTypeSize, horizontalSizeClass, dismiss, scenePhase, editMode, timeZone (the viewer's; a DatePicker shows and edits in it), undoManager (one UndoManager per app, with NSUndoManager's registration and grouping rules; the page's ⌘Z and ⇧⌘Z reach it outside text inputs), the accessibility flags), @ScaledMetric, onChange(of:), Task, .task, .task(id:), Task.sleep, clocks, Timer.publish + onReceive, Timer.scheduledTimer, @FocusState, @Environment(Type.self) + .environment(_:), @AppStorage (kept in localStorage), @SceneStorage (as @AppStorage, the page being one scene) |
|
| 3D (RealityKit, experimental) | RealityView, entities, your own components and systems, generated meshes, simple and physically based materials, directional (with shadows), point and spot lights, a perspective camera or one that frames the content, .realityViewCameraControls, taps and drags targeted at entities, raycasts against collision shapes, move(to:) animations, rigid-body physics (bodies, forces, impulses, joints, collision events), custom meshes (MeshDescriptor), PBR textures (base color, normal, roughness, metallic, emissive, occlusion, opacity), models from USDZ, USDC and USDA files with their animations, animations built in code (FromToByAnimation, OrbitAnimation, sequences, groups), and the simd types; drawn by three.js (RealityKit) |
.reality files, game controllers, AR |
Control flow in body |
if/else, if let, switch, optionals, ForEach |
for |
| Modifiers | padding, font, bold, fontWeight, foregroundStyle (any ShapeStyle), foregroundColor, background (colors, styles, shapes, views), overlay, frame, cornerRadius, clipShape, clipped, opacity, hidden, mask (gradients and colors), disabled, layoutPriority, lineLimit, multilineTextAlignment, fixedSize, aspectRatio, offset, position, rotationEffect, scaleEffect, shadow, badge, tint, imageScale, animation(_:value:), transition, buttonStyle (.automatic, .plain, .borderless, .bordered, .borderedProminent, .glass), textFieldStyle, listStyle, pickerStyle, toggleStyle (.switch, .button), labelStyle, textSelection (.enabled lets the text below be selected; none is otherwise, as on iOS), gaugeStyle, tabItem, tag, environment, dynamicTypeSize, onAppear, onDisappear, onTapGesture (with the tap's location; count: 2 for a double tap, a single tap beside it delayed as iOS does), task, gesture, highPriorityGesture (asked before the gestures inside it) and simultaneousGesture (never claims the pointer) with DragGesture (coordinateSpace: .local, .global, or .named with coordinateSpace(name:) on an ancestor), LongPressGesture, TapGesture (with count:), SpatialTapGesture (its location), MagnifyGesture and RotateGesture from two fingers or a trackpad pinch, onLongPressGesture, onTouches (a SwiftBrowser addition: every finger on the view, for chords and glissandi), allowsHitTesting, contentShape (the view takes input across its whole area; every shape as its rectangle), swipeActions, contextMenu, onDelete, onMove (edit-mode grips and long-press reordering), moveDisabled, deleteDisabled, refreshable, rotation3DEffect, blur, blendMode, drawingGroup and compositingGroup (the view composited as one: one shadow for it all), ignoresSafeArea, ViewModifier via modifier, focused, onSubmit, submitLabel, keyboardType, textContentType, textInputAutocapitalization, autocorrectionDisabled (the input's inputmode, autocomplete, autocapitalize, autocorrect), preferredColorScheme, scrollTargetBehavior (.paging pages under a finger as iOS does), scrollTargetLayout, scrollPosition(id:anchor:) (set to scroll there; set by the viewer's scrolling once it settles), scrollPosition(_:anchor:) with ScrollPosition (ids as for id:; scrollTo(x:y:), scrollTo(point:) and scrollTo(edge:) set the content offset, and read back as the id at the anchor), onScrollGeometryChange(for:of:action:) (ScrollGeometry from the renderer after each layout and once per frame while scrolling; the action runs when the transformed value changes), scrollDisabled (scroll views stay put; a TextEditor grows with its lines), onScrollVisibilityChange(threshold:_:) (against the scroll view's area below the bar), defaultScrollAnchor (initial offset and size changes), containerRelativeFrame, visualEffect (static), alignmentGuide (in stacks, ZStack, frames and overlays), colorMultiply, zIndex, contentMargins, scenePadding, phaseAnimator, scrollTransition (its three phases, drawn by the renderer as the view scrolls), matchedGeometryEffect (the shared-element move of an animated pass that swaps one layout for another) |
view masks |
| Types | Font (text styles scale with Dynamic Type; Font.custom draws and measures in the font files the app bundles, the system font for a name it has none for; italic()), Color, ShapeStyle (hierarchical, gradients, materials, fills, an app's own resolve(in:)), Animation (withAnimation, with a completion and its AnimationCompletionCriteria, springs, repeatCount/repeatForever, Binding.animation), AnyTransition (incl. asymmetric, modifier(active:identity:)), Alignment, EdgeInsets, Angle, UnitPoint, StrokeStyle, Shapes, Path, CGAffineTransform, FillStyle (eoFill), EnvironmentValues, ColorScheme, LayoutDirection (always left to right), DynamicTypeSize, UserInterfaceSizeClass, PresentationDetent, LocalizedStringKey (looked up in the app's string catalogs and .strings tables, with plural rules), ScenePhase, EditMode, ButtonRole, IndexSet, CharacterSet and Foundation's FormatStyles, FocusState, SubmitLabel, TextSelection, AttributedTextSelection, ScrollTargetBehavior, VisualEffect, Transaction (accepted; withTransaction), URLSession, URLRequest, HTTPURLResponse, URLError (over the browser's fetch), UIImage (from data, a CGImage or CIImage, a symbol or a catalog name: UIImage(named:) has the catalog file's bytes, the size and scale of the file iOS picks on a 3x iPhone and a set's dark image in dark mode, and finds loose bundle images; pngData() and jpegData for PNG and JPEG files, pixel buffers, their crops and images drawn into a renderer scaled, clipped or tinted), NSDataAsset (data sets of the catalog), CGImage (cropping(to:)), GraphicsContext (paths, gradients, images, text, layers, clips and the common filters), Measurement.formatted() |
|
| SwiftData | @Model, @Attribute (.unique), @Relationship (delete rules, inverses), @Transient, ModelContainer, ModelConfiguration (named, in memory), ModelContext (insert, delete, fetch, fetchCount, save, rollback, autosave), FetchDescriptor, @Query, #Predicate, SortDescriptor, .modelContainer, .modelContext, \.modelContext, @ModelActor (on the main actor), kept in IndexedDB |
history, CloudKit sync, undo |
| Files | URL.documentsDirectory, .applicationSupportDirectory, .cachesDirectory, .libraryDirectory, FileManager and Data / String file reading and writing in the app's home, kept in IndexedDB; /tmp; Bundle.main resources (read only); fileImporter (the browser's file chooser; the files are copied to the temporary directory; for a React app a picked or dropped folder's files, named by path, stay where the browser or the native app holds them and are read by range), fileExporter and FileDocument (a save dialog, a download, or the Files app natively), file attributes (size, dates, type); natively (@swiftbrowser/react's fileManager) the app's iCloud Drive container with file coordination, downloads and change notifications |
iCloud Drive from Swift (the shim has no ubiquity container), file coordination from Swift |
| Other frameworks | StoreKit's requestReview (a no-op), Core Location's CLLocationCoordinate2D and CLLocation, WeatherKit's types (every request throws permissionDenied, as for an app without the capability), passkey and password requests (ASAuthorizationController, AuthorizationController: each ends in .notHandled), LocalAuthentication's LAContext (always succeeds), MapKit's SwiftUI Map (Annotation, Marker, MapPolyline, MapPolygon, MapCircle, the iOS 14 Map(coordinateRegion:), and MapReader to convert a tap's location to a coordinate: the region drawn without map data, a surface with latitude and longitude lines; UIKit's MKMapView draws the same map at its region, so representables and SwiftUI-Introspect's Map support work), UserNotifications (Notification API, while the page is open; remote notifications over Web Push through the site's service worker, with the subscription as the device token), the CodeScanner package (its own sources over AVFoundation capture sessions: the camera with BarcodeDetector, else a typed code), Swift packages from the Xcode project (pure Swift, or SwiftUI packages built against the shim; their macro targets too, so the Composable Architecture and its packages build and run), DispatchQueue (main, global(), async, asyncAfter, sync: all on the main actor), DispatchWorkItem, DispatchGroup, OperationQueue, the frameworks under SwiftUI that packages build on (UIKit's UIImage, UIColor and UIScreen; UIKit views in SwiftUI through UIViewRepresentable and UIViewControllerRepresentable, translated into SwiftUI views on each pass: labels, image views, text views, buttons, spinners, scroll views (zooming too), a hosting controller's view, AVPlayerLayer, and any view's subviews at their frames with its background, corner radius, clipping, border and alpha; Core Graphics contexts that draw, scale and clip images; Image I/O sources, an animated GIF's frames among them, which real Gifu 4 animates with CADisplayLink; Combine (OpenCombine); CryptoKit's hashes; os's locks and logs), AVFoundation's players (AVPlayer, AVAudioPlayer; with no view, from a timer too once the viewer has tapped the page) and AVAudioEngine (player nodes, files, buffers, reverb, delay, distortion and EQ on Web Audio) and AVKit's VideoPlayer (the page's <video>), MediaPlayer's now-playing info and remote commands (the Media Session API: the lock screen and the media keys), Quick Look previews (a new tab), Transferable and ShareLink with any transferable item, UIPasteboard (the system clipboard for writes), UIActivityViewController, saving to Photos (a download), which real Nuke 13 builds against unchanged, Core ML's Create ML tabular models (GLMs, tree ensembles and their pipelines, compiled from the target's .mlmodel files), PhotosUI's PhotosPicker, PhotosPickerItem (loadTransferable for Data and Image), PHPickerFilter and .photosPicker(isPresented:) (the browser's file chooser), UniformTypeIdentifiers' UTType, Core Image: CIImage (cropped, clampedToExtent, applyingFilter, applyingGaussianBlur), CIContext.createCGImage, CIFilter (by name or CIFilterBuiltins: sepia tone, crystallize, edges, Gaussian blur, pixellate, unsharp mask, vignette, QR code generator) |
in-app purchases, weather data, passkeys (WebAuthn answers only for the page's own domain), live activities (ActivityKit), map tiles, panning and zooming a map, search and directions (MKLocalSearch, MKDirections), location services, real biometrics, neural network, image and text models, the photo library itself (PHAsset, PhotosPicker styles), other Core Image filters, custom kernels, notification actions (a click is the default action), Dispatch semaphores, encoding images Swift cannot decode (GIF, WebP, HEIC) or that only the page draws (filtered or Core Graphics bitmaps), Core Graphics fills and strokes, UIKit views' shadows, transforms, sublayers and draw(_:), UIKit controls (UISwitch, UISlider, … draw as plain views), reading the photo library, video thumbnails and re-encoding, dragging out of the page to other apps, copyable / pasteDestination (the browser's own copy and paste act on the page's text) |
| App | @main, App, WindowGroup |
multiple scenes |
Anything outside the matrix is a compile error in the browser build, never a silent misrender. The example apps are type-checked against Apple's SwiftUI in CI, so everything in the "Supported" column is known to be source-compatible.