Building a Responsive Camera App in iOS 27

Apple’s camera performance team cut camera launch time in half by deferring everything except the preview output: a launch that ran close to a second drops to roughly half that, a two-times improvement measured on a lab lightboard1. The lever is the Deferred Start API, available in iOS 26 and refined for iOS 27, and the principle behind it is blunt. The single most important factor in making a camera launch feel fast is how quickly the preview frame appears on the display1.

The frame for this post is “what an AVFoundation app has to do to feel instant,” because the gap between a camera that is technically running and one that feels ready to use is exactly the gap a falling domino slips through. Two WWDC26 sessions cover the surface: session 303 on responsive launch and sustained capture, and session 341 on the new square Center Stage front camera. The two connect through the same capture-session architecture, so adopting one makes the other cheaper.

TL;DR

  • The four-stage launch sequence (app launch, session configure/start, output init, preview streaming) spends most of its time initializing outputs. Deferred Start postpones every output except the one rendering preview, halving launch in Apple’s lab measurement1.
  • AVCaptureVideoPreviewLayer-based apps recompiled against iOS 26+ get automatic Deferred Start for free; video-data-output apps must adopt the manual mode to claim the same gain1.
  • Deferring the photo output speeds preview but not first capture, so pair it with isResponsiveCaptureEnabled on AVCapturePhotoOutput to buffer the shot until processing is ready1.
  • Pro Video Storage, new in iOS 27, pre-allocates a system-wide storage pool so high-data-rate ProRes writes stay deterministic instead of stuttering under file-system contention1.
  • The Center Stage front camera (iPhone 17, iPhone Air, iPhone 17 Pro) is a square sensor exposed as the front .builtInUltraWideCamera; dynamicAspectRatio crops any aspect ratio out of the square without rebuilding the session, and AVCaptureSmartFramingMonitor drives Auto Zoom and Auto Rotate2.

The Launch Sequence Has Four Stages

Watch on Apple Developer ↗

Jake, an engineer on Apple’s camera performance team, walks the four launch stages in session 303.

A camera launch runs through four stages, and Apple’s engineer Jake breaks them down in order1. First the app launches: the linker loads the binary, static initializers run, UI scenes get created. Second the session is configured and started: initializing AVCaptureSession, committing the configuration, and starting the session all consume time and system resources. Third every AVCaptureOutput initializes, and that time scales with the number of outputs and their quality settings. Fourth preview begins streaming and frames flow to the app1.

The work to make this fast starts in the UI. Split launch into two phases: resources critical for displaying preview, and resources that can wait until after preview runs1. In AVCam, AVFoundation’s classic sample camera app, the camera preview and shutter button are the only elements someone needs the instant they launch; the image well and mode picker can fade in afterward. The principle generalizes past UI. Any resource created before preview renders adds to launch time1.

The session itself is the next pressure point. Because AVCaptureSession coordinates every capture object, Jake creates it first, as soon as the main thread finishes UI setup. But creating the session blocks the main thread, so dispatch its creation off the main thread to run in parallel with UI scene setup and avoid a hang1. The same caution applies to startRunning() and stopRunning(): both are blocking calls, and calling them on the main thread will hang the app1. Commit a single configuration up front rather than committing several, since each reconfiguration extends launch1.

Deferred Start: The Two-Times Win

Initializing outputs is the most expensive part of launch, and most outputs are dead weight at that moment. To render preview, the app needs only a preview layer or a single output; the movie file output and photo output contribute nothing to the first frame1. Deferred Start exploits that. It postpones output initialization until launch has finished, so only the preview output initializes before the first frame displays1.

Every AVCaptureOutput and the AVCaptureVideoPreviewLayer carry an isDeferredStartEnabled property; set it to true to defer that output, and defer everything except the one rendering preview1. There are two modes for deciding when deferred work runs. In automatic mode, the system picks the best time, shortly after preview appears, and fires two delegate callbacks so the app can track it: sessionWillRunDeferredStart before initialization begins, and sessionDidRunDeferredStart after it completes1. Apps recompiled against the iOS 26 or later SDK get automatic mode by default, with automaticallyRunsDeferredStart already set to true1.

// Automatic mode — defer everything but the preview layer
session.beginConfiguration()
session.automaticallyRunsDeferredStart = true      // true by default on iOS 26+ SDK

photoOutput.isDeferredStartEnabled = true           // defer the photo output
// videoPreviewLayer renders preview, so it is NOT deferred

session.commitConfiguration()
session.startRunning()                              // call off the main thread

Manual mode hands control back to the app. Set automaticallyRunsDeferredStart to false, do whatever startup work needs to come first (reading preferences, building non-critical UI), then call runDeferredStartWhenNeeded() to tell the system it may proceed1. Manual mode matters for one architecture in particular: apps that render preview with AVCaptureVideoDataOutput. Deferred Start does not apply automatically to a data output, so those apps adopt manual Deferred Start to claim the same launch gain, typically triggering it once the first frame has been presented (Jake tracks presentation through a CAMetalLayer)1.

Apple verified the result on a lab lightboard, comparing two phones capturing an expanding LED pattern. The phone with Deferred Start enabled caught the pattern while both red and green LEDs were lit; the phone without it finished launching only after the green LEDs had nearly faded1. Timed, the launch without Deferred Start ran close to a second; with it, launch was cut in half, a two-times improvement, with complex capture sessions seeing even more1.

Fast Preview Is Not Fast Capture

Deferring the photo output has a catch worth stating plainly: preview starts much sooner, but time to first capture stays the same, because the system still has to finish initializing the deferred photo output before a capture can begin1. Preview is up, the user taps the shutter, and the shot is still gone.

The fix is isResponsiveCaptureEnabled on AVCapturePhotoOutput. The property adds buffering between starting a capture and when processing begins, so someone can capture the moment even if the photo output is not fully ready1. In Apple’s domino demo, the phone running responsive capture alongside Deferred Start got a clean shot of the falling dominoes while the control phone missed it entirely1. The pairing is the recommended pattern: adopt Deferred Start with the quality photo output, keep launch fast, and let responsive capture cover the window before the photo output finishes initializing1.

Rendering Preview: Layer Versus Data Output

Two outputs can drive preview, and the choice determines how much else you have to do. AVCaptureVideoPreviewLayer shows exactly what the camera sees with no per-frame work in the app: it handles HDR tone mapping automatically, keeps CPU and GPU overhead low, and tunes for low-latency display1. The trade-off is that it offers no per-frame access1. (For the HDR side of that automatic tone mapping, the AVFoundation HDR and Apple Log post covers the capture and display pipeline in depth.)

AVCaptureVideoDataOutput is the alternative when per-frame processing is the priority. It takes the preview layer’s place as the primary display output and gives the app control over the frame flow: custom UI overlays per frame, Metal integration, frame analysis1. The cost is the manual Deferred Start adoption noted above, plus a discipline rule: keep per-frame work short to avoid frame drops and keep the experience fluid1. Use the preview layer when you only need to show the feed; reach for the data output when you genuinely process frames.

Sustaining Performance Under Pressure

Most camera development happens at a desk in a controlled environment, but people use the app on a hot sunny day, and the system throttles as the device heats up1. Two cost APIs let an app see that coming. Hardware cost returns a value between 0 and 1 representing the share of the session’s hardware in use; above 1 means the system cannot support the configuration1. The cost rises with the number of cameras, the active formats (1080p versus 4K), the frame rate, and whether the format is binned. Hardware cost assumes a format’s maximum frame rate, so an app running at 30 fps on a 60 fps format should set the frame-rate override to lower the reported cost1.

System pressure cost also returns 0 to 1, representing the cost of the current state, and crossing 1 makes the configuration unsustainable1. The adoption pattern: after committing the configuration, check hardware cost stays at or below 1, then observe AVCaptureDevice’s systemPressureState and register a handler for changes1. As pressure rises, the handler reduces the capture device’s frame rate, throttles GPU or Apple Neural Engine work, and minimizes UI work1.

Pro Video Storage: Deterministic ProRes Writes

Watch on Apple Developer ↗

Session 303 introduces Pro Video Storage, new in iOS 27, for high-data-rate video capture.

Traditional file-system I/O is non-deterministic: the system juggles competing operations, memory fragmentation, and storage wear, so write timing varies1. High-data-rate captures like ProRes need sustained high-bandwidth I/O to record without dropping frames, and variable timing is exactly the wrong property. Pro Video Storage, new in iOS 27, addresses the problem by tracking and managing pre-allocated storage for high-data-rate captures. It is a system-wide resource that all apps share, and it plugs into the existing movie-recording APIs1.

Apps opt in by setting usesProVideoStorage on AVCaptureMovieFileOutput, or on AVAssetWriter when recording from a video data output1. Storage then handles allocation and file I/O, keeping write performance consistent for high-data-rate codecs. The adoption sequence: Pro Video Storage is a singleton, so obtain it through its shared accessor and confirm support; build the movie file output, session, connections, and chosen format; check isProVideoStorageSupported on the movie file output; confirm the storage is not busy resizing or servicing file creation or deletion; then enable it and start recording1. During capture the recording writes to the pre-allocated pool and moves to the final location once the capture finishes1. Camera settings now lets people control how much storage to allocate, the remainingCapacity method reports what is left, and an open-settings method takes the user to that UI from the app1.

The Center Stage Front Camera Is Square

Watch on Apple Developer ↗

Tracy, an engineer on Apple’s Camera Software team, introduces the square Center Stage front camera in session 341.

Traditional front-camera sensors have a 4x3 aspect ratio that locks framing to phone orientation. The Center Stage front camera on iPhone 17, iPhone Air, and iPhone 17 Pro uses a square image sensor paired with a 95-degree lens, the widest field of view on any iPhone front camera2. Apple’s engineer Tracy frames the payoff: the square shape lets the user choose any aspect ratio, shooting a portrait or landscape selfie without rotating the phone, which keeps a secure one-handed grip and a centered, natural-eye-contact image2.

The session setup is conventional AVFoundation3. Create an AVCaptureSession, find the camera as an AVCaptureDevice with the front .builtInUltraWideCamera device type, wrap it in an AVCaptureDeviceInput, add an AVCaptureVideoPreviewLayer for preview and an AVCapturePhotoOutput for photos; the session forms AVCaptureConnections implicitly between compatible media types2.

The building block is dynamicAspectRatio on AVCaptureDevice, available starting in iOS 26. Setting the property crops the chosen aspect ratio out of the square sensor without rebuilding the session or interrupting preview, so the switch is seamless2. The property supports five aspect ratios (3x4, 4x3, 9x16, 16x9, and 1x1) on square formats from 1280 up to 4032, with one constraint: the 4032 photo format supports only 3x4 and 4x3, because those preserve the highest resolution2.

// Tap to Rotate using dynamicAspectRatio
let discovery = AVCaptureDevice.DiscoverySession(
    deviceTypes: [.builtInUltraWideCamera],
    mediaType: .video,
    position: .front
)
guard let device = discovery.devices.first else { return }

// Find a format that supports the desired ratio
guard let format = device.formats.first(where: {
    $0.supportedDynamicAspectRatios.contains(.ratio4x3)
}) else { return }

try device.lockForConfiguration()
device.activeFormat = format
let timestamp = device.setDynamicAspectRatio(.ratio4x3)  // returns first-buffer timestamp
device.unlockForConfiguration()

Each format advertises its supportedDynamicAspectRatios, and setting the ratio returns the timestamp of the first buffer where the change takes effect2. The returned timestamp is not decoration: for video recording it is the seam that lets you end one clip and start the next at the new aspect ratio.

Auto Zoom, Auto Rotate, and Sensor Compensation

AVCaptureSmartFramingMonitor (iOS 26 and later, obtained from the camera) sits on top of dynamicAspectRatio and powers Auto Zoom and Auto Rotate2. The monitor gives periodic framing recommendations from automatic face and gaze detection, each carrying an aspect ratio and a zoom factor the app can apply or ignore; because it targets photo capture, it only recommends when the 4032 photo format is active2. By default it recommends nothing, so set enabledFramings (to all supportedFramings, or a chosen subset), then key-value observe recommendedFraming and apply each recommendation. Order matters for a smooth transition: set the aspect ratio first, then the zoom factor2. The monitor can start while the session runs; turning automatic framing off means unregistering the KVO and calling stopMonitoring2.

One correctness trap comes with the new sensor. Earlier iPhone front cameras mounted the sensor in Landscape Left, so a portrait selfie arrived in native sensor orientation carrying an EXIF tag asking for a 270-degree rotation on playback. The Center Stage sensor is mounted in Portrait, so apps relying on the old rotation values would render photos sideways or upside down2. AVCapturePhotoOutput handles this by default through sensor orientation compensation: it physically rotates HEIC, JPEG, and uncompressed processed photos and updates EXIF metadata so output lands in Landscape Left like before, letting existing rotation logic keep working2. Two caveats: compensation never applies to Bayer RAW or Apple ProRAW, and Apple recommends testing with compensation off (via cameraSensorOrientationCompensationEnabled) for best performance, confirming orientation stays correct2.

Center Stage for Video and Calls

For video recording, dynamicAspectRatio works the same, but QuickTime movie tracks require all samples to share dimensions, so changing the ratio mid-capture stops the recording2. With AVCaptureMovieFileOutput, recording stops automatically on the change; with AVCaptureVideoDataOutput plus AVAssetWriter, the setDynamicAspectRatio completion timestamp is the cut point to end one recording and begin another at the new ratio2. Recordings also gain two face-aware cinematic stabilization modes on this camera, cinematicExtended and cinematicExtendedEnhanced, which prioritize keeping the subject stable over the background2.

Video calls have the simplest path. Center Stage is already active for conferencing apps that use the Voice over IP background mode, toggled by the user from Control Center’s Video Effects menu2. Apps without that background mode adopt the Center Stage API directly: it is enabled per process (like Portrait, Studio Light, and Gestures), so set a control mode (cooperative to allow an in-app button, or app), then set isCenterStageEnabled to true, and framing keeps everyone centered2. One more video-call upgrade ships off by default: a real-time low-latency stabilization mode, enabled by setting the connection’s preferredVideoStabilizationMode to lowLatency2.

Adoption Guidance

The two sessions reward a layered adoption.

For every AVFoundation camera app: Adopt Deferred Start first. If you render preview with AVCaptureVideoPreviewLayer and recompile against the iOS 26+ SDK, automatic mode is on for free; verify it by confirming automaticallyRunsDeferredStart is true and that every non-preview output has isDeferredStartEnabled = true1. Pair it with isResponsiveCaptureEnabled on the photo output so a fast preview is also a usable shutter1.

For data-output and Metal pipelines: You opt out of the free win. Adopt manual Deferred Start, trigger runDeferredStartWhenNeeded() after the first frame presents, and keep per-frame work short1. Wire up systemPressureState observation so the pipeline degrades gracefully on a hot device1.

For ProRes and high-data-rate video: Adopt Pro Video Storage on iOS 27 to make sustained writes deterministic, gating on isProVideoStorageSupported and the busy check before recording1.

For front-camera and selfie apps on iPhone 17 / Air / 17 Pro: Discover the front .builtInUltraWideCamera, expose Tap to Rotate through dynamicAspectRatio, and layer AVCaptureSmartFramingMonitor for Auto Zoom and Auto Rotate. Leave sensor orientation compensation on unless you have measured a reason to turn it off, and remember it never touches RAW2.

FAQ

How much faster does Deferred Start actually make launch?

Apple measured roughly two times faster on a lab lightboard: a launch running close to a second dropped to about half that with Deferred Start enabled, and complex capture sessions can improve more1. The gain comes from initializing only the preview output before the first frame, deferring every other output until after preview appears1.

Do I get Deferred Start automatically?

If your app renders preview with AVCaptureVideoPreviewLayer and recompiles against the iOS 26 or later SDK, yes: automatic mode is on and automaticallyRunsDeferredStart defaults to true1. Apps that render preview with AVCaptureVideoDataOutput do not get it automatically and must adopt manual Deferred Start to claim the same launch gain1.

Why is my first photo still slow even with Deferred Start?

Deferring the photo output speeds preview but not first capture, because the system still finishes initializing the deferred photo output before a capture can begin1. Set isResponsiveCaptureEnabled on AVCapturePhotoOutput to buffer the capture so the moment is recorded even before the photo output is fully ready1.

How do I find the Center Stage front camera in code?

Use an AVCaptureDevice.DiscoverySession requesting the .builtInUltraWideCamera device type at .front position; the Center Stage front camera is surfaced as that ultra-wide front device on iPhone 17, iPhone Air, and iPhone 17 Pro2. From there, set dynamicAspectRatio to crop any supported aspect ratio out of the square sensor without rebuilding the session2.

Will old front-camera rotation logic break on the new sensor?

It can, because the Center Stage sensor is mounted in Portrait rather than the historical Landscape Left, so uncompensated buffers would appear sideways or upside down2. AVCapturePhotoOutput applies sensor orientation compensation by default for HEIC, JPEG, and uncompressed processed photos (never RAW), so existing rotation values keep working unless you disable cameraSensorOrientationCompensationEnabled2.

The Apple Ecosystem Cluster

This post sits in the camera and capture lane: the AVFoundation HDR and Apple Log workflow for pro-video capture and display; the three surfaces of an iOS app for where capture fits in app architecture; what SwiftUI is made of for the UI layer that hosts the preview; and the Apple platform matrix for which features land where. The hub is the Apple Ecosystem Series. For iOS-with-AI-agents context, see the iOS Agent Development guide.

References


  1. Apple, “Build a responsive camera app that launches quickly,” WWDC26 Session 303. Presented by Jake of Apple’s camera performance team. Covers the four-stage launch sequence, the Deferred Start API (automatic and manual modes, isDeferredStartEnabled, automaticallyRunsDeferredStart, runDeferredStartWhenNeeded(), and the sessionWillRunDeferredStart / sessionDidRunDeferredStart callbacks), isResponsiveCaptureEnabled, preview rendering via AVCaptureVideoPreviewLayer versus AVCaptureVideoDataOutput, hardware cost and system pressure APIs, and Pro Video Storage (usesProVideoStorage, isProVideoStorageSupported, remainingCapacity) new in iOS 27. 

  2. Apple, “Support the Center Stage front camera in your iOS app,” WWDC26 Session 341. Presented by Tracy of Apple’s Camera Software team. Covers the square Center Stage front-camera sensor on iPhone 17, iPhone Air, and iPhone 17 Pro accessed as the front .builtInUltraWideCamera; dynamicAspectRatio and supportedDynamicAspectRatios; AVCaptureSmartFramingMonitor (enabledFramings, supportedFramings, recommendedFraming, stopMonitoring) for Auto Zoom and Auto Rotate; sensor orientation compensation (cameraSensorOrientationCompensationEnabled); cinematic stabilization modes; and the Center Stage video-call API (isCenterStageEnabled, control modes) plus lowLatency video stabilization. 

  3. Apple Developer Documentation: AVFoundation. The framework reference covering capture, editing, and playback APIs (AVCaptureSession, AVCaptureDevice, AVCaptureDeviceInput, AVCaptureVideoPreviewLayer, AVCapturePhotoOutput, AVCaptureMovieFileOutput, AVCaptureVideoDataOutput, AVAssetWriter, and AVCaptureConnection) referenced throughout both sessions. 

関連記事

What's New in SwiftUI for iOS 27

iOS 27 reworks SwiftUI lists, documents, toolbars, and errors: drag-to-reorder, a readable/writable document model, tool…

23 分で読める

What's New in Swift (2026): The WWDC26 Update

Swift 6.3 and 6.4 from WWDC26: anyAppleOS availability, module selectors, borrow/mutate accessors, the Iterable protocol…

18 分で読める

Your Agent Has Two Untrusted Inputs

AI agents have two untrusted inputs: code the model writes and tool output it reads. One now has a real WASM sandbox; th…

12 分で読める